security-scan

A command for checking a codebase for common security weaknesses. The audit uses the OWASP Top 10, a widely used list of major web-application security risks.

In plain words
What is it for?
Use it for repository-wide checks or focused reviews of APIs, authentication, file uploads, database access, and other selected areas.
Why use it?
It helps uncover insecure patterns such as injection flaws, exposed secrets, and authentication or file-upload problems before they cause harm.

Command 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 commands/ivangrynenko/cursorrules/security-scan
Clone the repo
git clone --depth 1 https://github.com/ivangrynenko/cursorrules

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 638 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.00000 $0.00638
Opus 5 $0.00000 $0.00319
Sonnet 5 $0.00000 $0.00128
Haiku 4.5 $0.00000 $0.00064

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

Security

Grade A, and why

security-scan 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 2d 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.

.cursor/commands/security-scan.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.

Custom Command: Security Scan

Command Usage

/security-scan [scope]

Use scope to target a subdirectory or component; omit it for a repository-wide audit.

Security Audit

Perform a comprehensive security audit of the codebase to identify potential vulnerabilities, insecure patterns, and security best practice violations. Validate against OWASP Top-10, check file in the project codebase named owasp_top10_2021.csv with vulnerabilities.

Usage Examples

Basic Usage

"Run a security audit on this project" "Check for security vulnerabilities in the authentication module" "Scan the API endpoints for security issues"

Specific Audits

"Check for SQL injection vulnerabilities" "Audit the file upload functionality for security risks" "Review authentication and authorization implementation" "Check for hardcoded secrets and API keys"

Instructions for the agent

When performing a security audit:

  1. Systematic Scanning: Examine the codebase systematically for common vulnerability patterns
  2. Use OWASP Guidelines: Reference OWASP Top 10 and other security standards
  3. Check Multiple Layers: Review frontend, backend, database, and infrastructure code
  4. Prioritize Findings: Categorize issues by severity (Critical, High, Medium, Low)
  5. Provide Remediation: Include specific fixes for each identified issue

Security Checklist

Authentication & Authorization
  • Password storage and hashing methods
  • Session management security
  • JWT implementation and validation
  • Access control and permission checks
  • Multi-factor authentication support
Input Validation & Sanitization
  • SQL injection prevention
  • XSS (Cross-Site Scripting) protection
  • Command injection safeguards
  • Path traversal prevention
  • File upload validation
Data Protection
  • Encryption in transit (HTTPS/TLS)
  • Encryption at rest
  • Sensitive data exposure
  • API key and secret management
  • PII handling compliance
Common Vulnerabilities
  • CSRF protection
  • Clickjacking prevention
  • Security headers configuration
  • Dependency vulnerabilities
  • Insecure direct object references

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. 2d ago First seen · 110 lines · 0 tokens per session scan A d4ee81d77127

Subscribe to this mod's changes

security-scan is a command published in the GitHub repository ivangrynenko/cursorrules (87 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 638 tokens. 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.