@josecarlos61/pi-security-scanner1.0.4
Runtime protection and static security scanning for Pi coding agent
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
Pi Security Scanner
A Pi extension that combines runtime guardrails with static scanning for JavaScript and TypeScript extensions.
The scanner uses pattern-based checks to highlight potentially risky code. It does not execute scanned code and is not a substitute for a full security review.
Install
Install the published package from Pi:
pi install npm:@josecarlos61/pi-security-scanner
Commands
/security-scan
Scan extensions and packages configured for the current Pi setup:
/security-scan
To include another local file or directory in the scan:
/security-scan path\to\extension
The scan also includes the configured Pi extension/package locations. It
checks JavaScript and TypeScript files (.js, .cjs, .mjs, .jsx, .ts,
and .tsx), skips node_modules and .git, and does not execute the files.
Findings are listed by severity with file and line information.
Scan a public GitHub repository's default branch:
/security-scan https://github.com/owner/repository
Or scan a single-segment branch or tag:
/security-scan https://github.com/owner/repository/tree/ref
GitHub scans use the read-only GitHub API and download source files without cloning or executing repository code. Private repositories are not supported. To avoid reporting partial scans as clean, a scan fails if GitHub truncates the file listing or a repository exceeds any of these limits:
- 5,000 source files
- 1 MiB per file
- 256 MiB total source
Download progress and results appear in the status line and scanner widget.
/security-shield
Toggle runtime confirmations for suspicious operations. The shield is enabled
by default, and its setting is saved in ~/.pi/agent/security-scanner.json.
When enabled, it asks before:
- Using
curlorwgetwith unencryptedhttp:// - Running
git push - Running
ncorncat - Redirecting shell output into
/etc/or~/.ssh/ - Writing or editing
.envfiles,.ssh/,.git/config, orpackage-lock.json
If Pi cannot show a confirmation prompt, the suspicious operation is blocked.
Development
Run the extension directly from this checkout:
pi -e .\src\index.js
Run the test suite:
npm test
UI
The extension displays shield state and scan progress in the status line. Detailed scan findings appear in a widget. It does not show startup or successful-scan toast notifications.