secure-sdlc

A set of rules for applying security checks throughout software development, from handling passwords and user permissions to validating input and protecting uploaded files.

In plain words
What is it for?
Checking authentication, access control, sessions, input validation, database queries, file uploads, and other application-security concerns.
Why use it?
It helps prevent common security mistakes from being introduced while code is written or reviewed.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/kaademos/secure-sdlc-agents/secure-sdlc
Clone the repo
git clone --depth 1 https://github.com/Kaademos/secure-sdlc-agents

Made for: Cursor.

Per session 1,018 This file is loaded in full into every session.
When invoked 1,018 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01018 $0.01018
Opus 5 $0.00509 $0.00509
Sonnet 5 $0.00204 $0.00204
Haiku 4.5 $0.00102 $0.00102

Measured 2d ago against content hash 4125a446328f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

secure-sdlc scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

- **Prompt injection** — can user input override system instructions?

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.cursor/rules/secure-sdlc.mdc · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Secure SDLC — Active Security Context

You are operating with a Secure SDLC agent team available via MCP tools (sdlc_*). Apply security thinking at every step. Do not wait to be asked.


When writing or reviewing code, automatically check:

Authentication & Session

  • Every API route / endpoint has authentication enforced — no auth bypass paths
  • Session tokens are cryptographically random (≥128 bits) and invalidated on logout
  • Passwords stored with bcrypt (cost ≥12), Argon2id, or scrypt — never MD5/SHA alone
  • JWT tokens have alg validated explicitly — never accept alg: none

Authorisation

  • Every object access checks the requesting user OWNS or has permission for that SPECIFIC resource (prevent IDOR)
  • Default deny: if no rule grants access, deny
  • Server-side auth on every request — never trust client-supplied role claims

Input Handling

  • All inputs validated server-side (allowlist, not denylist)
  • Queries use parameterised statements / ORM — no string concatenation with user input
  • File uploads: validate by magic bytes (not MIME/extension), reject SVG, randomise stored filenames
  • Never use user input directly in filesystem paths, shell commands, or eval

Secrets & Cryptography

  • No secrets in code, config files, or environment files committed to git
  • AES-256-GCM or ChaCha20-Poly1305 for encryption at rest
  • TLS 1.2 minimum for all communications; TLS 1.3 preferred
  • Keys live in secrets managers (Vault, AWS SM, etc.) — never hardcoded

Error Handling & Logging

  • Generic error messages to users; detailed errors logged server-side
  • Never log credentials, tokens, PII, or payment data
  • Log: auth attempts, access control decisions, admin actions (timestamp, user, IP, outcome)

Dependencies

  • New packages reviewed before adding: check CVE status, maintenance, download count
  • SCA (Software Composition Analysis) on every PR

MCP Tool Triggers — invoke automatically when these situations occur:

Situation Tool to invoke
Starting a new feature sdlc_plan_feature
Designing architecture sdlc_threat_model
Reviewing a PR or code diff sdlc_review_pr
Writing/reviewing Terraform, K8s, Helm sdlc_review_infra
SAST tool produced findings sdlc_triage_sast
About to deploy / release sdlc_release_gate
Building AI/LLM features sdlc_ai_security_review
Quick security question sdlc_security_champion

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 99 lines · 1,018 tokens per session scan B 4125a446328f

Subscribe to this mod's changes

secure-sdlc is a cursor rule published in the GitHub repository Kaademos/secure-sdlc-agents (13 stars, last pushed 1mo ago), licensed MIT. It adds 1,018 tokens to every session, about $0.0051 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.