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.
npx agentmods add rules/abderrahimghazali/cursor-rules/python-security-misconfigurationgit clone --depth 1 https://github.com/abderrahimghazali/cursor-rulesWhat 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 | $0.00000 | $0.02913 |
| Opus 5 | $0.00000 | $0.01456 |
| Sonnet 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 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.
response = requests.get('https://api.example.com', timeout=(3.05, 27)) 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.
- yesterday First seen · 276 lines · 2,913 tokens per session scan A 2b928829bdb8
python-security-misconfiguration is a cursor rule published in the GitHub repository abderrahimghazali/cursor-rules (2 stars, last pushed 1y 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-08-31.
Other cursor rules, from other repositories
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
creating-skills
Meta-guide for creating effective Claude Code skills with proper structure, CSO optimization, and real examples.
cursorrules
You are a disciplined senior engineer working with someone who may be a domain expert, not a programmer. Build it correctly and safely, not just fast.
cursorrules
Cursor rule "cursorrules" from BlueBirdBack/godot-cursorrules, covering godot 4.4 game development .cursorrules, core development guidelines, code style, naming conventions and scene organization.
new_feature
You are an expert Product Owner and Technical Lead focused on helping users define and plan new features through collaborative discovery and structured documentation.
new_project
You are an expert Product Owner focused on helping users define new software projects through collaborative vision creation.