codebase-security-audit
Skill3 starsChanged 25 days agoMITView on GitHub
Automated static security analysis (SAST) and secrets audit engine. Use this skill whenever scanning code for leaked API keys, tokens, private keys, SQL injections, command injections, eval execution, XSS vulnerabilities, insecure CORS, or prior to committing code and creating pull requests.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- d-padmanabhan/agent-engineering-handbooktheir own version, first seen Sep 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- d-padmanabhan/agent-engineering-handbook★ 17same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ai-mind-mapSkill
- git-diffSkill
- testsprite-onboardSkill
- testsprite-verifySkill
- ai-mind-mapSkill
- git-diffSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Run automated static security scans across files and repositories to eliminate exposed credentials, unparameterized queries, command …
- Distinctive: line 21
Pre-Commit Scan: Never report a feature or fix complete without running a security scan on all modified files.
- Very specific: line 24
No Raw Shell Interpolation: Avoid child_process.exec(...) or os.system(...) with concatenated strings.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codebase Security & Secrets Audit Skill
Run automated static security scans across files and repositories to eliminate exposed credentials, unparameterized queries, command injections, and common web security vulnerabilities before code is merged.
🛡️ The 5 Non-Negotiable Security Rules
- Pre-Commit Scan: Never report a feature or fix complete without running a security scan on all modified files.
- Zero Hardcoded Secrets: Secrets, JWT keys, API keys, and database passwords must NEVER be committed to source code—always verify environment variable extraction (
process.env.*,os.environ[*]). - Always Parameterize Queries: Raw string concatenation or template literals in database queries (
query(...),execute(...),raw(...)) are prohibited. - No Raw Shell Interpolation: Avoid
child_process.exec(...)oros.system(...)with concatenated strings; useexecFileorspawnwith argument arrays. - Sanitize Dynamic HTML: Prohibit unsanitized
innerHTMLordangerouslySetInnerHTML. UsetextContentorDOMPurify.
⚡ Quick Scan Workflows
Method A: Via AI Mind Map MCP Tool
// Scan the entire indexed project for vulnerabilities
mindmap_security_scan({
"severity": "high" // 'critical' | 'high' | 'medium' | 'all'
})
// Or scan a specific edited file
mindmap_security_scan({
"filePath": "src/controllers/auth.ts",
"severity": "all"
})Method B: Via Standalone CLI Scanner
# Scan whole repository
node .agents/skills/codebase-security-audit/scripts/security-audit.mjs
# Scan specific file
node .agents/skills/codebase-security-audit/scripts/security-audit.mjs --file src/auth.ts
# Filter by severity
node .agents/skills/codebase-security-audit/scripts/security-audit.mjs --severity critical🔍 Vulnerability Checks & Detection Rules
| Severity | Vulnerability Rule | Typical Pattern Detected | Safe Remediation |
| CRITICAL | google_api_key | AIza[0-9A-Za-z-_]{35} | Move to GOOGLE_MAPS_API_KEY env var. |
| CRITICAL | openai_api_key | sk-[a-zA-Z0-9]{48} | Move to OPENAI_API_KEY env var. |
| CRITICAL | anthropic_api_key | sk-ant-[a-zA-Z0-9_-]{32,} | Move to ANTHROPIC_API_KEY env var. |
| CRITICAL | aws_access_key | AKIA[0-9A-Z]{16} | Use IAM instance roles or AWS_ACCESS_KEY_ID. |
| CRITICAL | github_token | ghp_* / github_pat_* | Revoke token and inject via CI/CD secrets. |
| CRITICAL | private_key | BEGIN RSA/EC PRIVATE KEY | Store private keys in Secrets Manager or Vault. |
| CRITICAL | jwt_secret_token | jwt.sign(..., 'secret123') | Use process.env.JWT_SECRET. |
| HIGH | sql_injection | query("SELECT " + input) | Use parameterized queries: query("SELECT $1", [input]). |
| HIGH | command_injection | exec("git " + branch) | Use execFile('git', [branch]). |
| HIGH | eval_usage | eval(code) / new Function() | Use JSON.parse or safe AST parser. |
| HIGH | xss_inner_html | element.innerHTML = input | Use element.textContent or DOMPurify.sanitize(input). |
| HIGH | insecure_cors | origin: '*', credentials: true | Specify explicit allowed origins. |
| HIGH | unvalidated_redirect | res.redirect(req.query.url) | Validate redirect against allowed URL whitelist. |
See references/vulnerability-patterns.md for full regex details and attack vectors.
✅ Self-Verification Checklist Before Merging Code
- Did you run
mindmap_security_scanon all edited files? - Are any new API keys or credentials extracted into
.env.example? - Are all database operations parameterized?
- Are shell command executions isolated to argument arrays?
- Are CORS headers restricted to trusted origins?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

