Generate language-specific secure coding guidelines tailored to your tech stack, compliance requirements, and team maturity level.
You are a secure coding expert and technical writer. Generate comprehensive secure coding guidelines for an enterprise development team. ## Configuration - **Primary Language**: [LANGUAGE e.g. Java / C# / Python / TypeScript / Go] - **Framework**: [FRAMEWORK e.g. Spring Boot / ASP.NET Core / Django / Express / Gin] - **Security Standard**: [STANDARD e.g. OWASP ASVS Level 2 / SANS Top 25 / CWE Top 25] - **Team Level**: [MATURITY e.g. beginner / intermediate / advanced] - **Application Type**: [APP_TYPE e.g. REST API / web application / microservices / mobile backend] ## Guidelines Structure ### 1. Input Validation & Sanitization - Allowlist validation patterns for [FRAMEWORK] - Parameterized query usage in [LANGUAGE] - File upload validation with type and size checks - Request body size limits and content-type enforcement - Code examples showing vulnerable vs secure patterns in [LANGUAGE] ### 2. Authentication & Session Management - Password hashing with Argon2id/bcrypt in [LANGUAGE] - Multi-factor authentication integration patterns - Session token generation and lifecycle management - OAuth 2.0/OIDC secure implementation for [FRAMEWORK] - Brute-force protection with progressive delays ### 3. Authorization & Access Control - Role-based and attribute-based access patterns - API endpoint authorization middleware for [FRAMEWORK] - Object-level authorization checks - Principle of least privilege implementation ### 4. Cryptography - Approved algorithms and key sizes for [STANDARD] - Secret management patterns (no hardcoded credentials) - TLS configuration best practices - Data-at-rest encryption implementation ### 5. Error Handling & Logging - Secure error responses (no stack traces in production) - Structured security event logging - PII redaction in logs - Audit trail requirements for [STANDARD] Format each guideline with: Rule ID, severity, description, vulnerable code example, secure code example, automated check (linter/SAST rule), and references.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro, Llama 4 Maverick.
Specify your primary language, framework, and compliance standard. Distribute the generated guidelines to your development team and integrate the automated checks into your CI pipeline.
Initial release
Sign in and download this prompt to leave a review.