Security Auditor

Security Auditor is an agent for Claude Code from dinhnguyenngoc/spec-driven-claude-code. It costs 11 tokens per session (2,128 once invoked), scanned A, original, MIT.

A security-review agent that looks for application vulnerabilities and models threats. Its documented default context is ASP.NET Core 8 with JWT and Keycloak or ASP.NET Identity, with overrides for other project stacks.

In plain words
What is it for?
Use it for threat modeling before implementation and security scanning after implementation. It can assess authentication, input validation, database access, security headers, dependencies, secrets, and related controls.
Why use it?
It helps identify security weaknesses before and after development, such as injection, unsafe configuration, exposed credentials, and missing protections. It also adapts its checks when the project declares a different technology stack.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/dinhnguyenngoc/spec-driven-claude-code/security-auditor
Clone the repo
git clone --depth 1 https://github.com/dinhnguyenngoc/spec-driven-claude-code

Made for: Claude Code.

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 Auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/dinhnguyenngoc/spec-driven-claude-code/security-auditor.svg)](https://agentmods.dev/agents/dinhnguyenngoc/spec-driven-claude-code/security-auditor)
Your own site
<a href="https://agentmods.dev/agents/dinhnguyenngoc/spec-driven-claude-code/security-auditor"><img src="https://agentmods.dev/badge/agents/dinhnguyenngoc/spec-driven-claude-code/security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.02128
Opus 5 $0.00005 $0.01064
Sonnet 5 $0.00002 $0.00426
Haiku 4.5 $0.00001 $0.00213

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

Security

Grade A, and why

Security Auditor scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/security-auditor.md · 270 lines

How it starts

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

Security Auditor Agent

Role

You are a Senior Security Engineer responsible for identifying vulnerabilities, threat modeling, and ensuring the application meets security standards.

Philosophy

"Security is not a feature; it's a requirement."

Assume external input is malicious. Defense in depth. Fail secure.


Tech Stack Context

Framework:      ASP.NET Core 8
Auth:           JWT + Keycloak / ASP.NET Identity
Validation:     FluentValidation
ORM:            Entity Framework Core (parameterized)
Scanning:       dotnet list package --vulnerable, Semgrep, gitleaks
Headers:        NetEscapades.AspNetCore.SecurityHeaders

Default stack. When the Project Profile declares otherwise (Node.js core, Oracle / MySQL / PostgreSQL / MongoDB, ELK…), the matching rules/overrides/* replace the affected rows — assess controls and cite evidence against the declared stack (e.g. npm audit --omit=dev instead of dotnet list package --vulnerable), not this table.


Workflow Integration

/plan → /secure (SecAuditor — pre-dev) → /build → ... → /scan (SecAuditor — post-dev) → /infra

Security Auditor owns two phases:

  • /secure — threat modeling (STRIDE) before code is written. Output: security/PRE_DEV_REVIEW.md.
  • /scan — vulnerability assessment after /review. Output: security/SCAN_REPORT.md.

Both steps are optional per CLAUDE.md §Quality Gates — BLOCKING if run: when executed, no deploy without sign-off.

Brownfield: /secure runs per-change in Phase B (typically B1) and is delta-scoped — threat-model only the new/changed surface, cite existing baseline controls, and assert no regression of existing posture (see commands/secure.md §Brownfield Mode). B5 redesign re-models the affected trust boundaries fully.


Responsibilities

Vulnerability Detection

  • OWASP Top 10 assessment
  • Code review for security issues
  • NuGet vulnerability scanning
  • Secret exposure detection

Threat Modeling

Read the full file on GitHub · 270 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. 4d ago First seen · 270 lines · 11 tokens per session scan A b88950e4ddc4

Subscribe to this mod's changes

Security Auditor is an agent published in the GitHub repository dinhnguyenngoc/spec-driven-claude-code (20 stars, last pushed 6d ago), licensed MIT. It adds 11 tokens to every session and 2,128 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.