DevSecOps, SSDLC, and AppSec

DevSecOps, SSDLC, and AppSec

Sets always-on security rules for coding agents: secret handling, input validation, parameterized queries, auth, dependency hygiene, SAST/SCA in CI and compliance docs.


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.

Public domain (CC0 1.0) · by awesome-cursorrules contributors · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,382 prompts

More by @OpenSourceBuffGuy

See all
Close up beauty portrait with damp hair prompt image

Close up beauty portrait with damp hair

Draws a close-up luxury beauty portrait of a woman with green eyes and damp black hair in golden-hour window light, with an 85mm lens look.

image-prompt, gpt-image, portrait, woman, close-up, beauty, reference-image, face-reference, photorealistic, golden-hour, soft-lighting, natural-light, bokeh, luxury, editorial, hairstyles, headshot, cinematic, for-photographers, long-form, muted-colors

POV gloved hands swap a woman's outfit prompt image

POV gloved hands swap a woman's outfit

Plans a ten-second luxury fashion commercial from a storyboard, where gloved first-person hands swap a woman's outfit with timed beats and strict anti-morphing rules.

video-prompt, reference-image, timed-beats, pov, video-ad, fashion, visual-effects, transformation, multi-shot, camera-movement, photorealistic, studio-lighting, dramatic-lighting, luxury, woman, full-body, negative-prompt, guardrails, structured-output, for-filmmakers, for-marketers, gemini, long-form, product-video

Woman winking with peace sign in orange tee prompt image

Woman winking with peace sign in orange tee

Draws a sunny street-fashion portrait of a woman in an orange tee winking and making a peace sign, with outfit, hair and wall details spelled out.

image-prompt, nano-banana, portrait, woman, reference-image, face-reference, fashion, summer, photorealistic, cinematic, vibrant-colors, natural-light, golden-hour, vertical-format, jewelry, hairstyles, negative-prompt, cityscape, street-photography, editorial, medium-shot, text-rendering, for-photographers, long-form

Reviews

Loading reviews…

Discussion

Loading comments…