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.
git clone --depth 1 https://github.com/ivangrynenko/cursorrulesWrote 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.
[](https://agentmods.dev/rules/ivangrynenko/cursorrules/python-security-misconfiguration)<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/python-security-misconfiguration"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/python-security-misconfiguration/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.
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/python-security-misconfiguration"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/python-security-misconfiguration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02913 |
| Opus 5.5 | $0.00000 | $0.01165 |
| Sonnet 5.5 | $0.00000 | $0.00583 |
| Haiku 4.5 | $0.00000 | $0.00291 |
Grade A, and why
python-security-misconfiguration 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 1mo 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.
response = requests.get('https://api.example.com', timeout=(3.05, 27)) Copies of this mod
1 near-identical copy found in the catalogue:
- python-security-misconfiguration — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Security Misconfiguration Standards (OWASP A05:2021)
This rule enforces security best practices to prevent security misconfigurations in Python applications, as defined in OWASP Top 10:2021-A05.
actions:
-
type: enforce conditions:
Pattern 1: Debug mode enabled in production settings
- pattern: "DEBUG\s*=\sTrue|debug\s=\strue|"debug"\s:\strue|debug:\strue" message: "Debug mode appears to be enabled. This should be disabled in production environments as it can expose sensitive information."
Pattern 2: Insecure cookie settings
- pattern: "SESSION_COOKIE_SECURE\s*=\sFalse|session_cookie_secure\s=\sfalse|"session_cookie_secure"\s:\sfalse|session_cookie_secure:\sfalse" message: "Insecure cookie configuration detected. Set SESSION_COOKIE_SECURE to True in production environments."
Pattern 3: Missing CSRF protection
- pattern: "CSRF_ENABLED\s*=\sFalse|csrf_enabled\s=\sfalse|"csrf_enabled"\s:\sfalse|csrf_enabled:\sfalse|WTF_CSRF_ENABLED\s*=\s*False" message: "CSRF protection appears to be disabled. Enable CSRF protection to prevent cross-site request forgery attacks."
Pattern 4: Insecure CORS settings
- pattern: "CORS_ORIGIN_ALLOW_ALL\s*=\sTrue|cors_origin_allow_all\s=\strue|"cors_origin_allow_all"\s:\strue|cors_origin_allow_all:\strue|Access-Control-Allow-Origin:\s*\*" message: "Overly permissive CORS configuration detected. Restrict CORS to specific origins rather than allowing all origins."
Pattern 5: Default or weak secret keys
- pattern: "SECRET_KEY\s*=\s*['"]default|SECRET_KEY\s*=\s*['"][a-zA-Z0-9]{1,32}['"]|secret_key\s*=\s*['"]default|"secret_key"\s*:\s*"default|secret_key:\s*default" message: "Default or potentially weak secret key detected. Use a strong, randomly generated secret key and store it securely."
Pattern 6: Exposed sensitive information in error messages
- pattern: "DEBUG_PROPAGATE_EXCEPTIONS\s*=\sTrue|debug_propagate_exceptions\s=\strue|"debug_propagate_exceptions"\s:\strue|debug_propagate_exceptions:\strue" message: "Exception propagation in debug mode is enabled. This can expose sensitive information in error messages."
Pattern 7: Insecure SSL/TLS configuration
- pattern: "SECURE_SSL_REDIRECT\s*=\sFalse|secure_ssl_redirect\s=\sfalse|"secure_ssl_redirect"\s:\sfalse|secure_ssl_redirect:\sfalse" message: "SSL redirection appears to be disabled. Enable SSL redirection to ensure secure communications."
Pattern 8: Missing security headers
- pattern: "SECURE_HSTS_SECONDS\s*=\s0|secure_hsts_seconds\s=\s0|"secure_hsts_seconds"\s:\s0|secure_hsts_seconds:\s0" message: "HTTP Strict Transport Security (HSTS) appears to be disabled. Enable HSTS to enforce secure communications."
Pattern 9: Exposed sensitive directories
- pattern: "@app\.route\(['"]/(admin|console|management|config|settings|system)['"]" message: "Potentially sensitive endpoint exposed without access controls. Ensure proper authentication and authorization for administrative endpoints."
Pattern 10: Default accounts or credentials
- pattern: "username\s*=\s*['"]admin['"]|password\s*=\s*['"]admin|password\s*=\s*['"]password|password\s*=\s*['"]123|user\s*=\s*['"]root['"]" message: "Default or weak credentials detected. Never use default or easily guessable credentials in any environment."
Pattern 11: Insecure file permissions
- pattern: "os\.chmod\([^,]+,\s0o777\)|os\.chmod\([^,]+,\s777\)" message: "Overly permissive file permissions detected. Use the principle of least privilege for file permissions."
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.
- 1mo ago First seen · 276 lines · 2,913 tokens per session scan A 2b928829bdb8
python-security-misconfiguration is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,913 tokens. 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-09-03.
Other cursor rules, from other repositories
django
Django: models, views, ORM best practices.
python
Python best practices: type hints, pathlib, pytest, clean error handling.
pydantic
Pydantic: BaseModel, validators, Field, Settings.
pytest
You are an expert in pytest testing. Follow these rules.
pytorch
PyTorch: neural networks, model training, GPU optimization.
ruff
Ruff: linting, formatting, rule selection, configuration.