From grimoire
Integrates security requirements, threat modeling, and security testing into each SDLC phase to catch vulnerabilities early when they cost 10x less to fix.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grimoire:design-secure-sdlcThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Integrate security requirements at design, threat modeling in sprint planning, SAST/DAST in CI, and security acceptance criteria in definition of done — finding vulnerabilities at 10× lower cost than post-deployment remediation.
Integrate security requirements at design, threat modeling in sprint planning, SAST/DAST in CI, and security acceptance criteria in definition of done — finding vulnerabilities at 10× lower cost than post-deployment remediation.
Adopted by: OWASP Top 10 Proactive Controls C04 (Address Security from the Start) and OWASP SAMM v2.0 are the primary references. Microsoft's Security Development Lifecycle (SDL) has been mandatory for all Microsoft products since 2004 and documented a 50% reduction in security vulnerabilities post-SDL. NIST SP 800-218 (Secure Software Development Framework) is the US federal mandate for software supply chain security. Google, AWS, and GitHub all publicly describe security-integrated SDLC as core to their engineering practice. Impact: IBM Systems Science Institute's research (confirmed by NIST) found that fixing a security defect in requirements costs $0.1×, in design $0.3×, in development $1×, in testing $3×, and in production $30×. Gartner (2022) estimates that organizations integrating security into SDLC reduce security incidents by 70% compared to bolt-on security testing. Microsoft's SDL reduced critical vulnerabilities by 50% in Windows Vista vs. Windows XP across the same codebase by adding security requirements, threat modeling, and mandatory security review. Why best: Penetration testing at the end of a release cycle (the alternative) finds vulnerabilities too late — they've already been designed, coded, and deployed. Retrospective security testing cannot change architecture decisions that create entire classes of vulnerabilities. Shifting security left means decisions like "use parameterized queries" are made in sprint 1, not discovered as a critical finding post-launch.
Sources: OWASP Top 10 Proactive Controls C04; OWASP SAMM v2.0; Microsoft Security Development Lifecycle documentation; NIST SP 800-218; IBM Systems Science Institute (defect cost research)
Define security requirements at project start using abuse cases:
# Security Requirements Template
For each user story, add corresponding abuse cases:
User story: "As a user, I can reset my password via email link"
Abuse cases:
- Attacker requests password reset for victim's email (enumeration)
- Attacker reuses an expired reset link
- Attacker brute-forces the reset token
- Attacker intercepts the reset email (phishing)
Security acceptance criteria:
- Reset tokens must be cryptographically random (128-bit entropy)
- Reset tokens expire after 15 minutes
- Reset tokens are single-use (invalidated after first use)
- Old token invalidated when new reset requested
- Password reset doesn't confirm whether email exists (generic message)
- Rate limit: 3 reset requests per email per hour
Run threat modeling in sprint planning for new features:
# Sprint Threat Model (STRIDE per component)
Feature: Add payment processing
Session: 45 minutes, security champion + lead developer
## Data Flow Diagram
Browser → API Gateway → Payment Service → Stripe API
→ Payments DB
## STRIDE Analysis
| Component | Threat | Mitigation |
|---|---|---|
| API Gateway | Spoofing: forged user ID | JWT validation, IRSA |
| Payment Service | Tampering: amount manipulation | Server-side amount from order, not request |
| Stripe API | Info Disclosure: card data in logs | Never log card numbers; use Stripe tokens |
| Payments DB | Privilege Escalation | Separate DB user with SELECT/INSERT only |
## Security Stories (added to sprint backlog)
- [ ] Validate payment amount server-side from order record (not request body)
- [ ] Implement idempotency key for duplicate payment prevention
- [ ] Add PCI-required logging (exclude card numbers)
Integrate SAST and dependency scanning in CI:
# GitHub Actions: security gates in CI
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# SAST: static analysis
- name: Run Semgrep SAST
uses: semgrep/semgrep-action@713efdd345f3035192eaa63f56867b88e63e4e5d
with:
config: "p/owasp-top-ten p/security-audit"
fail_on: error
# SCA: dependency vulnerabilities
- name: Audit dependencies
run: |
pip install pip-audit
pip-audit --fail-on-vuln --severity high
# Secrets detection
- name: Detect secrets
uses: gitleaks/gitleaks-action@cb7149a9b57195b609c63e8518d2c6ef96efa375
# DAST: dynamic testing on staging (separate job)
- name: OWASP ZAP baseline scan
if: github.ref == 'refs/heads/main'
uses: zaproxy/action-baseline@73d8a505fb288291e668f9d9930ae05cb7b2da21
with:
target: https://staging.app.company.com
Security in Definition of Done:
# Definition of Done — Security Checklist
Before marking any story complete:
Code:
□ No new HIGH/CRITICAL SAST findings (Semgrep, Bandit, ESLint-security)
□ No new vulnerable dependencies (pip-audit / npm audit)
□ No hardcoded secrets (Gitleaks clean)
□ Security acceptance criteria from abuse cases met
Review:
□ Security champion reviewed changes touching auth, payments, PII, or admin
□ Threat model updated if new external integrations added
Testing:
□ Security test cases written for each abuse case
□ OWASP Top 10 relevant checks verified (SQLi, XSS, IDOR, etc.)
Documentation:
□ Sensitive data flows documented
□ New permissions/access changes documented
Designate security champions per team:
# Security Champion Program
Role: One developer per squad acts as security liaison
Time commitment: ~10% of sprint time
Responsibilities:
- Facilitate threat modeling sessions for new features
- Review security-sensitive PRs (auth, payments, PII handling)
- Triage SAST/SCA findings and create backlog items
- Attend monthly security champion sync with AppSec team
- Spread security knowledge within their squad
Training: OWASP Top 10, Secure Code Review, Threat Modeling
(AppSec team provides training; security champions provide scale)
npx claudepluginhub jeffreytse/grimoire --plugin grimoire2plugins reuse this skill
First indexed Jun 11, 2026
Guides structured security design reviews to identify architecture flaws early, before code is written. Use when starting a new feature or system design.
Provides cross-cutting security guidance covering OWASP standards, threat modeling, authentication, cryptography, supply chain security, and AI security. Use for application security strategy and secure development lifecycle.
Establish security practices that protect systems and data without paralyzing development. Use when scaling security or responding to threats.