security-scan
Skill61 starsChanged 46 days agoApache-2.0View on GitHub
Scan your Claude Code configuration (.claude/ directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Checks CLAUDE.md, settings.json, MCP servers, hooks, and agent definitions.
- Reads credentials
- Installs packages
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 74 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
After modifying .claude/settings.json, CLAUDE.md, or MCP configs
- Distinctive: line 15
Before committing configuration changes
- Distinctive: line 16
When onboarding to a new repository with existing Claude Code configs
- Very specific: line 48
Run against the current project's .gemini/ directory:
- Distinctive: line 88
Never modify manual-only suggestions
- Distinctive: line 92
Run the adversarial three-agent pipeline for deeper analysis:
- Distinctive: line 120
Add to your CI pipeline:
“Common” is measured: kept by at least 6 in 10 of the 74 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Scan Skill
Audit your Claude Code configuration for security issues using AgentShield.
When to Activate
- Setting up a new project with your AI coding tool
- After modifying
.claude/settings.json,CLAUDE.md, or MCP configs - Before committing configuration changes
- When onboarding to a new repository with existing Claude Code configs
- Periodic security hygiene checks
What It Scans
| File | Checks |
GEMINI.md | Hardcoded secrets, auto-run instructions, prompt injection patterns |
settings.json | Overly permissive allow lists, missing deny lists, dangerous bypass flags |
mcp.json | Risky MCP servers, hardcoded env secrets, npx supply chain risks |
hooks/ | Command injection via interpolation, data exfiltration, silent error suppression |
agents/*.md | Unrestricted tool access, prompt injection surface, missing model specs |
Prerequisites
AgentShield must be installed. Check and install if needed:
# Check if installed
npx egc-agentshield --version
# Install globally (recommended)
npm install -g egc-agentshield
# Or run directly via npx (no install needed)
npx egc-agentshield scan .Usage
Basic Scan
Run against the current project's .gemini/ directory:
# Scan current project
npx egc-agentshield scan
# Scan a specific path
npx egc-agentshield scan --path /path/to/.gemini
# Scan with minimum severity filter
npx egc-agentshield scan --min-severity mediumOutput Formats
# Terminal output (default): colored report with grade
npx egc-agentshield scan
# JSON: for CI/CD integration
npx egc-agentshield scan --format json
# Markdown: for documentation
npx egc-agentshield scan --format markdown
# HTML: self-contained dark-theme report
npx egc-agentshield scan --format html > security-report.htmlAuto-Fix
Apply safe fixes automatically (only fixes marked as auto-fixable):
npx egc-agentshield scan --fixThis will:
- Replace hardcoded secrets with environment variable references
- Tighten wildcard permissions to scoped alternatives
- Never modify manual-only suggestions
Opus 4.6 Deep Analysis
Run the adversarial three-agent pipeline for deeper analysis:
# Requires ANTHROPIC_API_KEY
export ANTHROPIC_API_KEY=your-key
npx egc-agentshield scan --gemini-2.5-pro --streamThis runs:
- Attacker (Red Team): finds attack vectors
- Defender (Blue Team): recommends hardening
- Auditor (Final Verdict): synthesizes both perspectives
Initialize Secure Config
Scaffold a new secure .gemini/ configuration from scratch:
npx egc-agentshield initCreates:
settings.jsonwith scoped permissions and deny listGEMINI.mdwith security best practicesmcp.jsonplaceholder
GitHub Action
Add to your CI pipeline:
- uses: Fmarzochi/agentshield@v1
with:
path: '.'
min-severity: 'medium'
fail-on-findings: trueSeverity Levels
| Grade | Score | Meaning |
| A | 90-100 | Secure configuration |
| B | 75-89 | Minor issues |
| C | 60-74 | Needs attention |
| D | 40-59 | Significant risks |
| F | 0-39 | Critical vulnerabilities |
Interpreting Results
Critical Findings (fix immediately)
- Hardcoded API keys or tokens in config files
Bash(*)in the allow list (unrestricted shell access)- Command injection in hooks via
${file}interpolation - Shell-running MCP servers
High Findings (fix before production)
- Auto-run instructions in GEMINI.md (prompt injection vector)
- Missing deny lists in permissions
- Agents with unnecessary Bash access
Medium Findings (recommended)
- Silent error suppression in hooks (
2>/dev/null,|| true) - Missing PreToolUse security hooks
npx -yauto-install in MCP server configs
Info Findings (awareness)
- Missing descriptions on MCP servers
- Prohibitive instructions correctly flagged as good practice
Links
Other versions83 projects use a version of this.
Word for word · 0
None found.
Edited · 25
- loulanyue/awesome-claude-notes★ 27276% same
- jiten-singh-shahi/salesforce-claude-code★ 1514% same
- woxiangyangzhimao/skills★ 1472% same
- FaisalAlqarni/sp-ecc★ 942% same
- gongyijie85/dsh-ecc★ 874% same
- jdanigo/hydraia★ 876% same
- chadixearth/graphyloop★ 364% same
- ronmkr/PromptBook★ 273% same
- devcon-plus-member-platform/devconplusClaudeCode★ 176% same
- junimnjw/everything-claude-code★ 116% same
15 more not listed
Wrote their own version · 58
- openai/codex-security★ 11ksame name
- openai/plugins★ 7.4ksame name
- zereight/gitlab-mcp★ 2.1ksame name
- heartleo/zlib★ 1.2ksame name
- bagofwords1/bagofwords★ 463same name
- Resgrid/Core★ 229same name
- GoogleCloudPlatform/cloud-solutions★ 138same name
- drvoss/everything-copilot-cli★ 49same name
- simoncorry/foundry★ 39same name
- chaenmasahiro0425/claude-security-scan★ 37same name
48 more not listed
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.
Used alongsideProjects with it also use dependency-check.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DonTiziSkilldependency-check
Analyze project dependencies for outdated packages, security vulnerabilities, and licensing issues. Use for dependency audits and maintenance.
Also in 3 projects that use this
In this repository319 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/common-agents.mdCursor rule
- .cursor/rules/common-auto-intuition.mdCursor rule
- .cursor/rules/common-coding-style.mdCursor rule
- .cursor/rules/common-development-workflow.mdCursor rule
- .cursor/rules/common-git-workflow.mdCursor rule
- .cursor/rules/common-hooks.mdCursor rule
- .cursor/rules/common-patterns.mdCursor rule
- .cursor/rules/common-performance.mdCursor rule
- .cursor/rules/common-security.mdCursor rule
- .cursor/rules/common-testing.mdCursor rule
- .cursor/rules/egc-context.mdcCursor rule
- .cursor/rules/golang-coding-style.mdCursor rule
- .cursor/rules/golang-hooks.mdCursor rule
- .cursor/rules/golang-patterns.mdCursor rule
- .cursor/rules/golang-security.mdCursor rule
- .cursor/rules/golang-testing.mdCursor rule
- .cursor/rules/kotlin-coding-style.mdCursor rule
- .cursor/rules/kotlin-hooks.mdCursor rule
- .cursor/rules/kotlin-patterns.mdCursor rule
- .cursor/rules/kotlin-security.mdCursor rule
- .cursor/rules/kotlin-testing.mdCursor rule
- .cursor/rules/php-coding-style.mdCursor rule
- .cursor/rules/php-hooks.mdCursor rule
- .cursor/rules/php-patterns.mdCursor rule
- .cursor/rules/php-security.mdCursor rule
- .cursor/rules/php-testing.mdCursor rule
- .cursor/rules/python-coding-style.mdCursor rule
- .cursor/rules/python-hooks.mdCursor rule
- .cursor/rules/python-patterns.mdCursor rule
- .cursor/rules/python-security.mdCursor rule
- .cursor/rules/python-testing.mdCursor rule
- .cursor/rules/swift-coding-style.mdCursor rule
- .cursor/rules/swift-hooks.mdCursor rule
- .cursor/rules/swift-patterns.mdCursor rule
- .cursor/rules/swift-security.mdCursor rule
- .cursor/rules/swift-testing.mdCursor rule
- .cursor/rules/typescript-coding-style.mdCursor rule
- .cursor/rules/typescript-hooks.mdCursor rule
- .cursor/rules/typescript-patterns.mdCursor rule
- .cursor/rules/typescript-security.mdCursor rule
- .cursor/rules/typescript-testing.mdCursor rule
- agent-introspection-debuggingSkill
- agent-sortSkill
- api-designSkill
- article-writingSkill
- backend-patternsSkill
- brand-voiceSkill
- bun-runtimeSkill
- coding-standardsSkill
- content-engineSkill
- crosspostSkill
- deep-researchSkill
- dmux-workflowsSkill
- documentation-lookupSkill
- e2e-testingSkill
- The first 60 shown.
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.

