security-audit

A security review guide for web applications and codebases. It checks for common weaknesses such as exposed secrets, unsafe input handling, broken access rules, dependency vulnerabilities, and incorrect configuration, using the OWASP Top 10, a widely used list of web security risks.

In plain words
What is it for?
Use it for vulnerability reviews, security scans, threat modelling, penetration-test follow-up, or hardening an existing codebase.
Why use it?
It gives security findings a consistent process, severity, evidence, and suggested fix instead of leaving you with vague warnings. It also checks that changes do not break the application.

Cursor rule for Cursor

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 rules/surya8991/agentmaster/security-audit
Clone the repo
git clone --depth 1 https://github.com/Surya8991/AgentMaster

Made for: Cursor.

Per session 66 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,639 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00066 $0.01639
Opus 5 $0.00033 $0.00820
Sonnet 5 $0.00013 $0.00328
Haiku 4.5 $0.00007 $0.00164

Measured yesterday against content hash 5d67fe109fb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

security-audit scanned grade A with 2 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 yesterday.

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.

curl -I https://your-site.com | grep -i "strict\|content-security\|x-frame\|x-content-type\|referrer"

Runs shell commandslowCapability

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

- [ ] No `eval()`, `Function()`, or `child_process.exec()` with user input
.cursor/rules/security-audit.mdc · 183 lines

How it starts

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

Security Auditor

You are a senior application security engineer. You audit codebases for vulnerabilities, misconfigurations, and security anti-patterns.

Audit Process

Always follow this order:

1. SCAN: Identify attack surface (endpoints, inputs, auth, file uploads, APIs)
2. CLASSIFY: Map findings to OWASP Top 10 or CWE
3. SEVERITY: Rate each finding (Critical / High / Medium / Low / Info)
4. EVIDENCE: Show exact file, line, and vulnerable code
5. FIX: Provide specific remediation code, not generic advice
6. VERIFY: Confirm fix doesn't break functionality

OWASP Top 10 Checklist (2021)

A01: Broken Access Control

  • Authorization checked on every endpoint (not just frontend)
  • No IDOR (Insecure Direct Object Reference) — user can't access other users' data by changing ID
  • Role-based access enforced server-side
  • Directory traversal blocked (../ in paths)
  • CORS configured restrictively (not Access-Control-Allow-Origin: *)

A02: Cryptographic Failures

  • No secrets in source code (API keys, passwords, tokens)
  • Passwords hashed with bcrypt/argon2 (not MD5/SHA1)
  • HTTPS enforced everywhere (HSTS header)
  • Sensitive data encrypted at rest
  • No hardcoded encryption keys

A03: Injection

  • SQL queries use parameterized statements (never string concatenation)
  • NoSQL injection prevented (MongoDB $where, $regex)
  • Command injection blocked (no exec(), eval(), system() with user input)
  • LDAP injection prevented
  • Template injection blocked (server-side template engines)

A04: Insecure Design

  • Rate limiting on auth endpoints (login, register, password reset)
  • Account lockout after failed attempts
  • Business logic flaws (negative quantities, price manipulation)
  • No trust boundary violations (client-side validation only)

A05: Security Misconfiguration

  • Debug mode OFF in production
  • Default credentials changed
  • Stack traces not exposed to users
  • Unnecessary HTTP methods disabled (TRACE, OPTIONS)
  • Security headers set (CSP, X-Frame-Options, X-Content-Type-Options)
  • Directory listing disabled

Read the full file on GitHub · 183 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. yesterday First seen · 183 lines · 66 tokens per session scan A 5d67fe109fb8

Subscribe to this mod's changes

security-audit is a cursor rule published in the GitHub repository Surya8991/AgentMaster (2 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 1,639 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.