security-audit

security-audit is a command for Claude Code from ShaheerKhawaja/ProductionOS. It costs 60 tokens per session (7,844 once invoked), scanned C, original, MIT.

A security audit workflow covering application security, attack techniques, security-management practices, secrets, dependencies, containers, and delivery pipelines.

In plain words
What is it for?
Checking code against OWASP, MITRE ATT&CK, and NIST CSF, finding exposed secrets, auditing the software supply chain and containers, and reviewing DevSecOps pipelines.
Why use it?
It provides evidence-based findings with severity and framework mappings while limiting the work to detection rather than exploitation.

Command for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: mentions subagents.

Part of the productionos plugin — 4 skills, 41 commands, 11 agents shipped together

Good fit Checking code against OWASP, MITRE ATT&CK, and NIST CSF, finding exposed secrets, auditing the software supply chain and containers, and reviewing DevSecOps pipelines.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/shaheerkhawaja/productionos/security-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ShaheerKhawaja/ProductionOS

Made for: Claude Code.

Or install productionos, the plugin that ships this one along with the rest of its 4 skills, 41 commands, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/security-audit.svg)](https://agentmods.dev/commands/shaheerkhawaja/productionos/security-audit)
Your own site
<a href="https://agentmods.dev/commands/shaheerkhawaja/productionos/security-audit"><img src="https://agentmods.dev/badge/commands/shaheerkhawaja/productionos/security-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,844 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 5 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.07844
Opus 5 $0.00030 $0.03922
Sonnet 5 $0.00012 $0.01569
Haiku 4.5 $0.00006 $0.00784

Measured 8d ago against content hash fc0dbbf4a508, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

security-audit scanned grade C with 5 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| TA0004 | Privilege Escalation | Role assignment from user input, sudo without password, setuid binaries |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- `curl ... | sh` or `wget ... | bash` — pipe-to-shell pattern in CI

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- Cloud metadata access: `169.254.169.254`, `metadata.google`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- URL from user input: `requests.get(.*request`, `fetch(.*req.body`

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Command injection: `subprocess.*shell=True`, `os.system(`
.claude/commands/security-audit.md · 612 lines

How it starts

The opening of the file, as written. The whole thing — 612 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Audit — 7-Domain Security Hardening

You are the Security Audit orchestrator. You invoke the security-hardener agent to run a comprehensive 7-domain security assessment mapped to industry frameworks. All findings must cite file:line evidence, map to at least one framework (OWASP/MITRE/NIST), and carry a severity classification.

Core principle: Detection only. Never attempt to exploit vulnerabilities. Never expose actual secret values in output. Every finding must be evidence-backed with file:line citations.

Input

  • Framework: $ARGUMENTS.framework (default: all)
  • Scope: $ARGUMENTS.scope (default: full)

Step 0: Preamble

Follow the shared preamble protocol from templates/PREAMBLE.md:

0A: Environment Check

Detect the ProductionOS version and target stack:

  • Read VERSION file from plugin root (log "SKIP: VERSION file not found" if absent)
  • Count available agents in agents/ directory
  • Detect stack: package.json (Node.js/TypeScript), pyproject.toml or setup.py (Python), go.mod (Go), Cargo.toml (Rust), otherwise Unknown

0B: Prior Work Check

Before running, check for existing security audit output:

  • Read .productionos/AUDIT-SECURITY.md if it exists
  • If prior audit exists, load its findings as baseline and build incrementally
  • Compare new findings against prior findings to track remediation progress

0C: Agent Resolution

Load ONLY the security-hardener agent definition from agents/security-hardener.md. No other agents are needed for this command unless an issue triggers escalation.

0D: Context Budget

Resource Budget
Agents 1 primary (security-hardener) + up to 3 sub-checks
Files scanned Entire codebase (full) or git diff (changed-files)
Grep passes 7 domains x 10-15 patterns each
Time estimate ~10-15 min (full), ~3-5 min (changed-files)

0E: Success Criteria

  • All 7 domains audited with specific pattern searches
  • Every finding mapped to OWASP category + MITRE tactic + NIST function
  • Severity classification (CRITICAL/HIGH/MEDIUM/LOW) for each finding
  • Structured report written to .productionos/AUDIT-SECURITY.md
  • Overall security posture score (1-10) with justification

Read the full file on GitHub · 612 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 612 lines · 60 tokens per session scan C fc0dbbf4a508

Subscribe to this mod's changes

security-audit is a command published in the GitHub repository ShaheerKhawaja/ProductionOS (8 stars, last pushed 4mo ago), licensed MIT. It adds 60 tokens to every session and 7,844 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 5 findings (asks for root, downloads and executes remote code, cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.