audit-nginx

audit-nginx is a command for Claude Code from trumb/claude-nginx-hardening. It costs 20 tokens per session (1,158 once invoked), scanned A, original, MIT.

A command that checks nginx configuration for security requirements such as headers, encryption settings, request limits, and blocking rules. Nginx is web-server software; a configuration audit checks whether its settings meet the chosen security profile.

In plain words
What is it for?
Use it to inspect local nginx files or test a URL for security headers, modern TLS, restricted methods, rate limits, hidden version details, and configuration conflicts.
Why use it?
It reveals missing, conflicting, duplicated, or ineffective settings before they cause security gaps, and can optionally check how a live website behaves.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/compatibility-checker.py --proposed <config> --current <current> --profile <profile>.

Part of the claude-nginx-hardening plugin — 1 skill, 8 commands, 3 agents shipped together

Good fit Use it to inspect local nginx files or test a URL for security headers, modern TLS, restricted methods, rate limits, hidden version details, and configuration conflicts.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/trumb/claude-nginx-hardening
agentmods
npx agentmods add commands/trumb/claude-nginx-hardening/audit-nginx

Made for: Claude Code.

Or install claude-nginx-hardening, the plugin that ships this one along with the rest of its 1 skill, 8 commands, 3 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 audit-nginx

README.md
[![agentmods](https://agentmods.dev/badge/commands/trumb/claude-nginx-hardening/audit-nginx/github.svg)](https://agentmods.dev/commands/trumb/claude-nginx-hardening/audit-nginx)
Your own site
<a href="https://agentmods.dev/commands/trumb/claude-nginx-hardening/audit-nginx"><img src="https://agentmods.dev/badge/commands/trumb/claude-nginx-hardening/audit-nginx/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for audit-nginx

Your own site · 80×15
<a href="https://agentmods.dev/commands/trumb/claude-nginx-hardening/audit-nginx"><img src="https://agentmods.dev/badge/commands/trumb/claude-nginx-hardening/audit-nginx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00020 $0.01158
Opus 5 $0.00010 $0.00579
Sonnet 5 $0.00004 $0.00232
Haiku 4.5 $0.00002 $0.00116

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

Security

Grade A, and why

audit-nginx scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

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

Use curl to verify:
commands/audit-nginx.md · 110 lines

How it starts

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

Context

  • Nginx configs: !ls /etc/nginx/sites-enabled/ 2>/dev/null || echo "no sites-enabled found"
  • Security snippet: !test -f /etc/nginx/snippets/security-hardening.conf && echo "PRESENT" || echo "MISSING"
  • Profile: !echo "${NH_PROFILE:-auto-detect}"

Operating Mode

DEFAULT: R0 + R1 (Recommendation Mode) With --apply: escalates to W1 With --deploy: escalates to W1 + W2 + X1

Read @skills/nginx-hardening/EXECUTION-POLICY.md for full policy.

Your Task

Audit nginx configuration for security compliance.

Input

The user may provide:

  • A specific config path: /audit-nginx /path/to/nginx.conf
  • A URL for live testing: /audit-nginx https://example.com
  • Nothing (auto-detect configs in /etc/nginx/sites-enabled/)

Analysis Levels

Level 1 — Static Config Analysis (always on) Dispatch the config-auditor agent to check:

  • All 6 security headers present and correct
  • TLS 1.2+ only, ECDHE ciphers
  • server_tokens off, autoindex off
  • client_max_body_size set
  • Method restriction present
  • Rate limiting present
  • security-hardening.conf included
  • Location precedence conflicts
  • Duplicate/shadowed directives
  • Coverage of all 35 attack categories

Level 2 — Log Cross-Reference (if logs available) If nginx logs are found, also run the log analysis pipeline to enrich audit findings with actual traffic data.

Level 3 — Live Verification (opt-in with --live or when URL provided) Use curl to verify:

  • Security headers returned correctly
  • TLS protocol/cipher negotiation
  • Known blocked paths return 404 (sample from each of the 35 categories)
  • Health endpoint responds
  • Do NOT perform intrusive testing (no fuzzing, no brute-force, no high-rate)

Output

Generate artifacts in outputs/<run-id>/:

  • audit-report.md — Human-readable compliance report
  • findings.json — Machine-readable findings
  • proposed-rules/ — Any recommended new rules

Present a summary to the user showing:

  • PASS/FAIL/WARN for each check category
  • Total findings by severity
  • Recommended next steps

Read the full file on GitHub · 110 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. 10d ago First seen · 110 lines · 20 tokens per session scan A 07577744dffe

Subscribe to this mod's changes

audit-nginx is a command published in the GitHub repository trumb/claude-nginx-hardening (2 stars, last pushed 5mo ago), licensed MIT. It adds 20 tokens to every session and 1,158 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.