DevSecOps secure coding Cursor rules
This DevSecOps, SSDLC and AppSec rule file makes Cursor write code with security built in. It is for engineering teams who want the assistant to handle secrets, dependencies, authentication, authorization, security testing and compliance notes safely across Python, JavaScript, TypeScript, Go, Java, Ruby, PHP, C# and shell scripts.
What it does
It bans hardcoded secrets, committed .env files, logging of tokens, eval and exec, and string-built SQL. It asks for parameterized queries, least-privilege database users, approved dependencies with SCA scans, standard auth frameworks, Argon2 or bcrypt password hashes, RBAC, and SAST plus SCA in the CI pipeline.
How to use it
The globs list file types for each of those languages, so the rule applies to source and shell files but not to config or docs.
Requirements and limits
New dependencies need explicit approval under these rules, which may slow quick prototypes.
More in Rules and the Cursor library.
What it covers
- General Security Principles
- Database Security
- Dependency Management
- Authentication & Authorization
- Secure SDLC Practices
- Monitoring & Feedback
- Compliance & Documentation
The full text is in the members library
Book a call and we will give you access to the full Cursor library: every entry in full, search by meaning, copy and download.
Source and license
Source: https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/security-devsecops-ssdls-appsec.mdc
Author: PatrickJS, Awesome cursorrules. License: CC0-1.0.