agent-security-scan
Skill15 starsChanged 32 days agoApache-2.0View on GitHub
Scans the host's settings, hooks, skills, Model Context Protocol config and credential files for exposed secrets, remote fetches and side-effecting shell commands, after any of them changes or governance rules from another project are adopted, or when the user asks to check them.
- Reads credentials
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-verificationSkill
- boundary-contractSkill
- compact-handoffSkill
- merge-companionSkill
- necessity-gateSkill
- session-intent-analyzerSkill
- skill-evolutionSkill
- task-routerSkill
The file
Files
Agent Security Scan
The response model uses this skill for a report-only static review of host settings, hooks, skill text and Model Context Protocol configuration. The default scanner reads local files and reports exposed credentials, remote fetches and instructions, shell side effects, package-manager use and broad execution or protocol exposure. External security runtimes are optional.
Scope and trigger
Apply the scan after relevant hooks, skills, server configuration or credential files change, after governance rules from another project are adopted, or when the user asks to inspect suspicious commands. The response model selects the authorized repository and home targets before running the scanner; the table below does not expand the user's scope.
| Surface | Candidate paths |
| Claude Code | ~/.claude/settings.json, ~/.claude/skills/*/SKILL.md |
| Codex | ~/.codex/hooks.json, ~/.codex/config.toml, ~/.agents/skills/*/SKILL.md |
| Repository | <root>/*/SKILL.md, <root>/.mcp.json, <root>/.env |
| Home | ~/.mcp.json, ~/.env |
Procedure
- The response model establishes the repository root and home candidates from authorized context.
- When both the repository and home candidate sets are authorized, it invokes
python3 <loaded-skill-directory>/scripts/scan_agent_security_surface.py --root <absolute-repo> --home <absolute-home> --jsonthrough the host's shell tool. The bundled command scans both sets and has no path allowlist. For a narrower request, read only the named allowed files through the host's file tools and report that limited coverage; do not broaden the request or invent an empty home path to imitate a scope flag. - It reads the exit status and the returned JSON
root,home,finding_countandfindings, then each finding's severity, rule and mitigation. The scanner lists skills under the root by matching immediate*/SKILL.md; do not claim from that command that it covers skills nested in a family folder. When an observation is unavailable, that coverage stays unresolved. - It reports
mitigation=reject, critical and high findings as blockers requiring a separately authorized fix workflow. Scanner output alone does not authorize deletion, edits or disabling servers.
Output
{
"findings": [{
"severity": "high - command can run without protective gate",
"rule": "unprofiled-shell-command",
"path": "/path/settings.json",
"message": "hook command executes through shell without Ghost-ALICE profile gate",
"mitigation": "mitigate"
}]
}The scanner's severity values are:
critical - credential exposure or secret accesshigh - command can run without protective gatehigh - write, install, permission, or destructive side effectmedium - package manager or broad MCP exposuremedium - remote instruction surfacelow - unclear provenance or ownershiplow - hygiene or configuration issue
Warnings
The response model reports paths, rules and redacted messages, never raw secrets. The default scan makes no network call and applies no automatic fix. This skill inspects settings, hooks and skill text that can run commands; adversarial-verification separately evaluates claims and evidence.
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.

