user · always apply · security · user
secure-coding-devsecops
Secure coding, secret handling, dependency hygiene, authz, security testing, and compliance documentation.
rules/secure-coding-devsecops/RULE.md · 4dd36de feat: catalog cursor mcps and rules
Cursor rules for secure coding, secret handling, dependency hygiene, authentication, authorization, security testing, and compliance documentation
--- description: "Cursor rules for secure coding, secret handling, dependency hygiene, authentication, authorization, security testing, and compliance documentation." globs: ["/*.py", "/.js", "**/.ts", "/*.go", "/.java", "**/.rb", "/*.php", "/.cs", "**/.sh"] alwaysApply: true --- # DevSecOps + SSDLC + AppSec Cursor Rule ## General Security Principles - Never hardcode secrets, credentials, or API keys. Use environment variables or secure vaults for sensitive data. - Prohibit the inclusion of .env, secret config files, or unknown tokens in source control. - Never log sensitive data, secrets, or session tokens in application logs. - Validate and sanitize all user input. Escape output in HTML, JS, and SQL contexts. - Avoid unsafe functions such as exec, eval, or similar dynamic code execution. ## Database Security - Use parameterized queries or ORM for all database access. Do not use string concatenation for query building. - Ensure database users have the least privilege required for their tasks. - Regularly review and update database access policies. ## Dependency Management - Only use packages from verified sources. - Do not add new dependencies without explicit approval and security review. - Regularly update dependencies and scan for known vulnerabilities (SCA). ## Authentication & Authorization - Use secure authentication frameworks; never implement custom authentication. - Store passwords using strong, salted hashes (e.g., Argon2, bcrypt). - Implement Role-Based Access Control (RBAC) for sensitive operations. - Enforce the principle of least privilege for APIs and UI actions. ## Secure SDLC Practices - Integrate Static Application Security Testing (SAST) and Software Composition Analysis (SCA) into the CI pipeline. - Scan all code for secrets before merging (Secret Scanning). - Use Infrastructure as Code (IaC) scanning for all infrastructure code. - Integrate Dynamic Application Security Testing (DAST) in the CD pipeline for deployed applications. - Enforce Policy as Code (PaC) for automated, version-controlled security policies. ## Monitoring & Feedback - Enable continuous vulnerability monitoring and alerting. - Integrate Runtime Application Self-Protection (RASP) and Web Application Firewall (WAF) as appropriate. - Encourage regular vulnerability assessments and penetration testing. - Maintain a feedback loop to update rules and prompts based on recurring vulnerabilities. ## Compliance & Documentation - Align with industry standards (e.g., OWASP Top 10, NIST, ISO 27001). - Document all security controls and decisions for auditability.
Changelog
- 4dd36defeat: catalog cursor mcps and rulesErbil Nas · 11/23/2026
Used with
- mcpsbaklava-design-systemsse: https://baklava-mcp-server.mars.tgointernals.com/sse
- mcpsbaklavuestdio: bunx @baklavue/mcp
- mcpsconsole-ninjastdio: node .console-ninja/mcp/
- mcpsevoxstdio: npx add-mcp https://evox.mintlify.site/mcp
- mcpsexpohttp: https://mcp.expo.dev/mcp
- mcpsfigmahttp: https://mcp.figma.com/mcp
- mcpsgithubhttp: https://api.githubcopilot.com/mcp/
- mcpsigdbstdio: uvx igdb-mcp-client
Related rules
- anti-slop-design-lawFollow this design law every time you design or build an interface. Avoid AI-slop patterns; craft uniqueness instead.
- gherkin-style-testingCreate structured test scenarios in Gherkin (Given-When-Then) for web and mobile apps.
- git-commit-message-guidelinesFormat all git commit messages with Conventional Commits.
- ponytail-lazy-senior-dev-modeEfficient senior defaults: YAGNI, reuse, stdlib first, shortest correct diff.