config-security-audit
Skill0 starsChanged 54 days agoMITArchived repositoryView on GitHub
Audit an agent-harness configuration directory (.claude/, ~/.claude.json, MCP servers, hooks, settings, CLAUDE.md) for security risks — hardcoded secrets, prompt-injection surface, overly permissive allow-lists, unpinned npx supply-chain, dangerous bypass flags, and hook command-injection. Standalone, no external dependencies.
1 other project uses a version of this.
Other versions1 project uses a version of this.
Word for word · 1
- zorahrel/claude-harness★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository8 other files it gives its agents.
- domain-modelSkill
- gauntlet-loopSkill
- graphifySkill
- grill-meSkill
- senior-passSkill
- tool-forgeSkill
- ubiquitous-languageSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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 16
After editing settings.json, CLAUDE.md, .mcp.json, or ~/.claude.json
- Very specific: line 17
Before committing config changes or sharing a repo with .claude/ committed
- Distinctive: line 32
Run the bundled scanner. Default target is the user-global config.
- Distinctive: line 58
After running, summarize findings grouped by severity (HIGH → MEDIUM → LOW).
- Distinctive: line 60
Never auto-edit config to "fix" a finding without explicit confirmation — secrets and permission changes are the user's call.
- Distinctive: line 67
Treat output as a triage list, verify before acting.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Config Security Audit
Static security audit of a Claude Code / agentic-harness configuration. Pure
bash + grep + python3 — no npm package, no network, no API key. Portable
across any machine that has a .claude setup.
When to Activate
- User says "security audit", "scan my config", "audit .claude", "check my MCP servers"
- After editing
settings.json,CLAUDE.md,.mcp.json, or~/.claude.json - Before committing config changes or sharing a repo with
.claude/committed - Periodic hygiene check on a setup with many MCP servers / hooks
What It Checks
| Target | Risk class |
~/.claude.json + .mcp.json | hardcoded secrets in MCP env, unpinned npx @latest supply-chain, untrusted remote MCP urls |
settings.json / settings.local.json | bypassPermissions / dangerous-skip flags, wildcard Bash(*) allow-lists, missing deny-list, broad WebFetch/Write grants |
hooks (settings + scripts) | command injection via unquoted interpolation, secret exfiltration (curl/nc to remote), silent error suppression |
CLAUDE.md / AGENTS.md | hardcoded secrets, auto-run / "always run X" injection instructions |
router config.yaml (if present) | secrets in plaintext, channels exposed without auth |
Usage
Run the bundled scanner. Default target is the user-global config; pass a path to scan a project.
CLAUDE_PLUGIN_ROOT is set for you when the skill is loaded as a plugin. If you
cloned this repo by hand instead, cd into the skill directory first — the
scanner reads no state from its own path, so either way works.
# As a plugin: scan user-global config (~/.claude + ~/.claude.json)
bash "$CLAUDE_PLUGIN_ROOT/scan.sh"
# From a clone
cd agent-harness/skills/config-security-audit && bash scan.sh
# Scan a specific project's .claude dir
bash scan.sh /path/to/project/.claude
# Only show medium+ findings
bash scan.sh --min-severity mediumThe script exits 0 if no HIGH findings, 1 if any HIGH finding exists — usable
in a pre-commit hook or CI gate.
How To Report
After running, summarize findings grouped by severity (HIGH → MEDIUM → LOW). For each HIGH: quote the file + line, explain the risk in one sentence, give the fix. Never auto-edit config to "fix" a finding without explicit confirmation — secrets and permission changes are the user's call.
Heuristics, Not Proof
This is static pattern-matching: it flags candidates, not confirmed exploits. A flagged secret may be a placeholder; a wildcard allow-list may be intentional. Treat output as a triage list, verify before acting.
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.

