@lowyshin/security-scan
APerforms a rapid security sweep for secrets, API keys, and common vulnerabilities using cross-platform platform tools.
Install
agr install @lowyshin/security-scan --target claudeWrites 1 file into .claude/skills/, pinned to git-a24e6265.
- .claude/skills/security-scan/SKILL.md
Document
name: security-scan description: Performs a rapid security sweep for secrets, API keys, and common vulnerabilities using cross-platform platform tools. triggers: security scan, 보안 점검, 취약점 점검, scan for secrets, check keys
security-scan Skill
This skill performs a fast, grep-based security scan of the repository. It focuses on identifying hardcoded secrets and common misconfigurations.
🛠️ Usage
Trigger this skill before any git push or after significant code changes.
Scan Patterns
The following patterns are scanned using the grep_search platform tool:
| Category | Pattern | Description |
|---|---|---|
| Secrets | sk-[a-zA-Z0-9]{48} | OpenAI API Keys |
| Secrets | ghp_[a-zA-Z0-9]{36} | GitHub Personal Access Tokens |
| Secrets | AKIA[0-9A-Z]{16} | AWS Access Key IDs |
| Config | \.env$ | Unencrypted environment files |
| Vulnerability | eval\( | Dangerous eval usage |
| Vulnerability | dangerouslySetInnerHTML | Potential XSS (React) |
💻 Cross-Platform Implementation
This skill uses the platform-native grep_search API, which is optimized for Windows, Mac, and Linux. No extra binary installation (like rg) is required.
Example Scan Execution
// Step 1: Detect current OS (via env-check)
// Step 2: Use grep_search with absolute path
grep_search({
Query: "sk-[a-zA-Z0-9]{48}",
SearchPath: "/absolute/path/to/project",
IsRegex: true
});
🛡️ Response Actions
If a match is found:
- Stop: Do not proceed with the task until the vulnerability is addressed.
- Alert: Report the exact file and line number to the user.
- Fix: Recommend moving the secret to an environment variable or using a secret manager.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-a24e6265e8832026-07-31