Audit a coding agent's permissions
Reviews a coding agent's tool, permission and sandbox configuration for shell, network, secrets and write-scope risk, and proposes least privilege. Use before giving an agent more autonomy.
A coding agent acts with whatever the configuration lets it touch, and it reads untrusted text all day: issue bodies, web pages, dependency READMEs, test output, files in the repository. Any of that text can carry instructions (prompt injection). The real risk is the combination of three things in one session: access to private data or secrets, exposure to untrusted content, and a way to send data out or cause effects (network, pushing, posting, deploying). Broad shell access is the usual way all three meet, because a shell command can read any file and call any host. The audit judges the configuration against what the agent actually needs for its intended use.
Audit this configuration:
Only if [INTENDED_USE] is given: Intended use:
- Identify the tool or tools the configuration belongs to and the format. If you do not recognise a key, say so instead of guessing its meaning.
- Build an exposure map along six axes and rate each none, scoped or broad:
- Shell: which commands run without approval; wildcards that let an allowed prefix chain into anything (for example a command allowed by prefix that can take
&&,;,$(...)or-c); interpreters and package managers that execute arbitrary code (python,node,npx,npm install, scripts fetched from the network and piped into a shell). - File write scope: inside the workspace only, or also home directory, dotfiles, shell profiles, git hooks, CI configuration and the agent's own settings (an agent that can edit its own permissions has every permission).
- Network: outbound access, allowed domains, fetch and browser tools, and whether data can leave through them.
- Secrets: environment variables, tokens, cloud credentials, SSH keys and
.envfiles readable by the agent or its subprocesses; token scopes (a CI token that can push to the default branch or publish packages). - External effects: git push, pull request and issue comments, package publishing, deploys, messages, payments, MCP servers with write tools.
- Approval and sandbox: approval mode, whether a container or OS sandbox is on, and whether any "skip permissions" or "yolo" style flag is set.
- Check where untrusted content enters for the intended use, and mark every path where untrusted content, secrets and an outbound channel meet in one session.
- Write findings ranked by risk, each with a concrete abuse scenario (what injected text could make the agent do), and the smallest change that removes it.
- Write a least-privilege configuration in the same format as the input: explicit allow rules for what the intended use needs, deny rules for secrets paths and the agent's own config, approval for anything external, network limited to required hosts, and the sandbox on. If you are unsure of a key's exact syntax for this tool, write it and mark it "check against the tool's documentation".
- Judge against the intended use. Do not strip a permission the use clearly needs; say how to scope it instead.
- Never print secret values that appear in the config. Refer to them by name and recommend rotating any that were committed.
- Do not claim the proposed config makes the agent safe; list what remains in Residual risks.
- If the intended use is missing, assume the agent may read untrusted content, say so, and ask for the use under Questions.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
Exposure summary
A table: axis, current level (none, scoped, broad), what drives it.
Findings
Numbered, highest risk first. Each: severity (critical, high, medium, low), the setting, the abuse scenario, the fix.
Least-privilege config
One fenced block in the input's format, then a short list of what changed and why.
Residual risks
Bullets of risks the configuration cannot remove, with the process control that covers each (review before merge, short-lived tokens, separate CI job).
Questions
What you need to know to tighten further, or "None".
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Software engineering
- category
- Coding-agent operations
- level
- Intermediate
- made for
- Security engineer, DevOps / platform engineer, Tech lead / staff engineer, Software engineer
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-03
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md, ChatGPT, claude.ai
use in
npx @hermes-hq/hodios install audit-agent-permissions --target claude-codenpx skills add hermes-hq/hodios-dist --skill audit-agent-permissions -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-software-engineering@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of Coding-agent operationsSecurity auditor
Reviews code for exploitable weaknesses and reports only issues with a concrete attack path. Use as a reviewer persona or subagent for security-sensitive changes.
security-auditorWrite an AGENTS.md
Writes or updates a repository's AGENTS.md with the verified commands, layout, conventions and boundaries a coding agent needs, and nothing generic. Use when setting up a repo for coding agents.
write-agents-mdReview an LLM app for security
Reviews an LLM app for prompt injection, data exfiltration through tools, excessive agency and unsafe output handling, mapped to the OWASP LLM Top 10. Use before shipping an agent or RAG feature.
review-llm-app-securityReview a coding agent transcript
Reviews a coding agent session transcript for where it went wrong (bad assumptions, skipped verification, scope creep, looping) and turns each failure into an instruction-file or prompt change.
review-agent-transcriptWrite an agent handoff
Writes a self-contained handoff note so a fresh agent or a teammate can continue the current task without the conversation history. Use before ending a long session, switching tools or delegating.
write-agent-handoffWrite an agent skill
Writes a reusable agent skill (SKILL.md with frontmatter, steps, scripts and references) from a repeated task, with a trigger description models can match and a test plan. Use to package a workflow.
write-agent-skill