home/roleplay/security-standards-instructions

Security Standards.instructions

GPTClaudeGemini··965 copies·updated 2026-07-14
security-standards-instructions.prompt
# Secure Coding Standards

Always apply these security best practices to all code:

## Input Validation
- Validate and sanitize ALL user input
- Use allowlists over denylists
- Implement proper data type checking
- Limit input length and format

## Authentication & Sessions
- Use strong password hashing (bcrypt, Argon2)
- Implement secure session management
- Use HTTPS for all authenticated routes
- Add CSRF protection
- Implement rate limiting

## Data Protection
- Never store passwords in plain text
- Encrypt sensitive data at rest
- Use HTTPS for data in transit
- Sanitize data before database queries
- Use parameterized queries

## Error Handling
- Don't expose stack traces to users
- Log security events
- Use generic error messages
- Implement proper exception handling

## Dependencies
- Keep dependencies updated
- Audit packages for vulnerabilities
- Use tools like npm audit, Snyk
- Pin dependency versions

## Code Examples

when to use it

Community prompt sourced from the open-source GitHub repo AmadeusITGroup/ai-primitives-hub (Apache-2.0). A "Security Standards.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

AmadeusITGroup/ai-primitives-hub · Apache-2.0