security

security is a cursor rule for Cursor from packtman/AI-Tools-Secure-Configs. It costs 333 tokens per session, scanned C, original, MIT.

A set of security rules for AI coding agents, covering secrets, file access, commands, dependencies, and generated code.

In plain words
What is it for?
Use it to guide safe file handling, secret management, input validation, database queries, dependency choices, and error reporting.
Why use it?
It reduces the chance of exposing credentials, weakening security checks, or running unsafe and destructive operations.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions Cursor.

Good fit Use it to guide safe file handling, secret management, input validation, database queries, dependency choices, and error reporting.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/packtman/ai-tools-secure-configs/security
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/packtman/AI-Tools-Secure-Configs

Made for: Cursor.

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/packtman/ai-tools-secure-configs/security/github.svg)](https://agentmods.dev/rules/packtman/ai-tools-secure-configs/security)
Your own site
<a href="https://agentmods.dev/rules/packtman/ai-tools-secure-configs/security"><img src="https://agentmods.dev/badge/rules/packtman/ai-tools-secure-configs/security/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 security

Your own site · 80×15
<a href="https://agentmods.dev/rules/packtman/ai-tools-secure-configs/security"><img src="https://agentmods.dev/badge/rules/packtman/ai-tools-secure-configs/security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 333 This file is loaded in full into every session.
When invoked 333 The same file — it is already loaded in full.
Security scan C 4 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.00333 $0.00333
Opus 5.5 $0.00133 $0.00133
Sonnet 5.5 $0.00067 $0.00067
Haiku 4.5 $0.00033 $0.00033

Measured 2mo ago against content hash 0bff060d3018, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

security scanned grade C with 4 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 2mo 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.

- When creating Docker configurations, never run as root; use non-root users.

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.

- Never execute `curl | bash`, `wget | sh`, or piped-execution patterns.

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

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Never run `rm -rf /`, `DROP DATABASE`, `FORMAT`, or other destructive commands without explicit user confirmation.

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.

- Never execute `curl | bash`, `wget | sh`, or piped-execution patterns.
cursor/rules/security.mdc · 35 lines

What it actually says

Security Rules

Never Do

  • Never read, display, log, or reference contents of .env, .env.*, or files under secrets/.
  • Never hard-code API keys, passwords, tokens, connection strings, or any credentials.
  • Never execute curl | bash, wget | sh, or piped-execution patterns.
  • Never run rm -rf /, DROP DATABASE, FORMAT, or other destructive commands without explicit user confirmation.
  • Never modify .ssh/, .aws/, .config/gcloud/, or other credential directories.
  • Never disable TLS verification, SSL checks, or certificate validation.
  • Never install packages from unverified sources or arbitrary URLs.

Always Do

  • Use environment variables for all secrets and configuration values.
  • Validate and sanitize all user inputs in generated code.
  • Use parameterized queries for database operations — never string concatenation.
  • Include error handling that does not leak sensitive information.
  • Follow the principle of least privilege for file permissions, IAM roles, and access grants.
  • Use well-maintained, actively-supported dependencies only.

Code Generation Standards

  • Add input validation to all public-facing functions.
  • Use secure defaults (HTTPS, strong encryption algorithms, secure cookie flags).
  • Generate code that passes common SAST tools (Semgrep, CodeQL, Bandit).
  • When creating Docker configurations, never run as root; use non-root users.
  • When generating CI/CD pipelines, never store secrets in plain text; use the platform's secrets mechanism.
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. 2mo ago First seen · 35 lines · 333 tokens per session scan C 0bff060d3018

Subscribe to this mod's changes

security is a cursor rule published in the GitHub repository packtman/AI-Tools-Secure-Configs (4 stars, last pushed 14d ago), licensed MIT. It adds 333 tokens to every session, about $0.0013 per session on Opus 5.5. A static security scan graded it C with 4 findings (asks for root, downloads and executes remote code, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.