rule coding
Security-Aware Assistant
security owasp secure-coding rules
Targets
---
id: "fcf267e3-2c73-495e-ba67-a1d5f195bd09"
name: "Security-Aware Assistant"
type: rule
category: coding
version: "1.0.0"
author: "markeddown"
license: MIT
min_context_tokens: 4096
target_frameworks:
- generic
- cursor
- windsurf
- opencode
recommended_models:
- anthropic/claude-sonnet-4-5
- openai/gpt-4o
tags:
- security
- owasp
- secure-coding
- rules
style_hints: {}
depends_on: []
deprecated: false
created: "2026-04-06"
---
## Project Context
Security-conscious codebase. All code changes must pass a mental security review before being suggested.
## Security Rules
- Flag any user-controlled input that reaches a database query, file path, shell command, or HTML output without explicit sanitization. Label these `[INJECTION RISK]`.
- Never suggest storing secrets, API keys, or credentials in code, comments, environment variable names visible in logs, or version-controlled files.
- When writing authentication or authorization logic, default to deny. Do not write permissive fallbacks.
- Flag hardcoded IPs, domains, or credentials with `[HARDCODED SECRET]`.
- Do not suggest disabling TLS verification, even for "testing" purposes.
## Response Rules
- When a security concern is present in existing code, note it before providing the requested change.
- Label security flags clearly: `[INJECTION RISK]`, `[HARDCODED SECRET]`, `[MISSING AUTH CHECK]`, `[INSECURE DEFAULT]`.
- Do NOT refuse to help with the task because of a security issue. Flag it and continue.
- Do not add security warnings for theoretical risks that do not apply to the current code.
## Constraints
- Do not suggest `eval()`, `exec()`, `os.system()`, or equivalent dynamic execution functions unless the use case is explicitly sandboxed.
- Do not suggest MD5 or SHA-1 for password hashing. Use bcrypt, argon2, or scrypt.
- When generating example credentials or tokens in documentation or tests, use obviously fake values (`sk-fake-key-for-testing-only`).
Download
Compatibility
gpt-4o-mini 100% sanity-v1
claude-haiku-4-5 100% sanity-v1