security-review

v1.5.0

Full-project secure-by-design security audits plus staged, branch/PR, plan, task, follow-up, and apply reviews

Community extension β€” Independently maintained. Use at your own discretion. Learn more

πŸ”’ Security Review

Continuous security governance and OWASP auditing for AI-assisted development.

Version Spec Kit OWASP License: MIT

What Is This?

A Spec Kit extension that performs security reviews at every stage of delivery β€” from plan to implementation β€” and turns findings into structured, trackable remediation tasks.

It answers one question:

Is this work secure, and if not, what exactly needs to be fixed?

The Problem It Solves

AI generates code that works, but it doesn't think about security:

  • It concatenates user input into SQL queries because that's the fastest path
  • It skips authorization checks on admin endpoints because "it's internal"
  • It hardcodes API keys in config files because the test passes
  • It adds dependencies without checking for known CVEs

You discover these issues in code review β€” or worse, in production. By then, fixing them is expensive and disruptive.

Security Review catches these issues early by reviewing your specs, plans, task lists, staged changes, branch diffs, and full codebase against OWASP 2025, secure coding practices, and your project's own security context.

What It Actually Does

Extension Interoperability

This extension acts as a cooperative citizen in the Spec Kit ecosystem by sharing context through explicit handoff artifacts in the specs/<feature>/ directory.

The Governed Delivery Lifecycle:

  1. /specify -> Write initial feature spec.
  2. /speckit.architecture-guard.governed-plan -> Orchestrates memory synthesis, technical planning, and security/architecture validation.
  3. /speckit.architecture-guard.governed-tasks -> Orchestrates task generation with memory, security, and architecture refactor awareness.
  4. /speckit.architecture-guard.governed-implement -> Orchestrates implementation with memory context and post-implementation governance review.

By using explicit markdown files, extensions remain decoupled, and all constraints and decisions are fully reviewable in Git.


Installation

From Registry

specify extension add security-review

From GitHub

specify extension add security-review --from \
  https://github.com/DyanGalih/spec-kit-security-review/archive/refs/tags/v1.5.0.zip

Local Development

specify extension add --dev /path/to/spec-kit-security-review

Recommended Security Lifecycle

Security Review is a governance and audit layer that runs at every phase of Spec Kit delivery to catch vulnerabilities before they reach production.

MilestoneRecommended CommandPhase IntegrationPurpose
Milestone: Designsecurity-review.planAfter /planReview technical design for trust boundaries and insecure patterns.
Milestone: Strategysecurity-review.tasksAfter /tasksEnsure security requirements are sequenced correctly in the task list.
Milestone: Verificationsecurity-review.branchAfter /implementFocused security review of the current changes or branch.
Milestone: Remediationsecurity-review.applyAfter findingsInject approved security fixes into your Plan and Task artifacts.

How to Handle Findings

Security Review generates structured reports with actionable findings. To resolve them:

1. Evaluate the Finding

Review the Exploit Scenario and Remediation provided in the report. Decide if the finding is a valid risk that needs fixing or an accepted project design.

2. Plan the Follow-up

Run /speckit.security-review.followup. The AI will guide you through each finding. You can choose to Fix Now (add to current tasks) or Track as Tech Debt (save for later).

3. Apply the Fixes

Run /speckit.security-review.apply. This will automatically inject the remediation tasks into your plan.md and tasks.md, making security part of your standard delivery flow.


Continuous Security (Out-of-Band)

These commands are ideal for pre-commit hooks or automated PR checks to ensure incremental changes remain secure.

ContextRecommended CommandPurpose
Pre-Commitsecurity-review.stagedReview only files staged with git add.
Pre-Mergesecurity-review.branchReview changes introduced by your branch (auto-detects current).

Key Behavior: Structured, Actionable Output

Every finding includes severity, location, OWASP category, exploit scenario, remediation, and a Spec Kit task ID:

### [CRITICAL] SQL Injection in User Authentication

**Location:** src/auth/login.js:45
**OWASP Category:** A05:2025-Injection
**Description:** User input concatenated directly into SQL query...
**Exploit Scenario:** Attacker could bypass authentication by...
**Remediation:** Use parameterized queries or ORM...
**Spec-Kit Task:** TASK-SEC-001

Benefits

Compared to Spec Kit Alone

Spec Kit OnlySpec Kit + Security Review
Security issues found during code review or productionCaught during planning, before code is written
No structured way to track security debtEvery finding becomes a TASK-SEC-NNN with severity and acceptance criteria
AI generates insecure patterns without feedbackAI output is reviewed against OWASP 2025 and secure coding practices
Security is a vague checkboxSecurity coverage is enumerated: OWASP, supply chain, secrets, DevSecOps

Compared to Traditional Security Tools

Traditional ToolsSecurity Review
Require language-specific scanners per frameworkFramework-agnostic, works across any stack
Run against code onlyReviews plans, tasks, staged diffs, branch diffs, AND code
Produce generic reportsProduces Spec Kit task IDs ready for your backlog
Separate workflow from developmentIntegrated into the Spec Kit delivery lifecycle
Expensive to set up and maintainZero runtime dependencies, prompt-based

Security Coverage

OWASP Top 10 (2025)

CodeCategory
A01Broken Access Control (includes SSRF)
A02Security Misconfiguration
A03Software Supply Chain Failures
A04Cryptographic Failures
A05Injection
A06Insecure Design
A07Authentication Failures
A08Software or Data Integrity Failures
A09Security Logging & Alerting Failures
A10Mishandling of Exceptional Conditions

Additional Coverage

  • Input validation and output encoding
  • Secrets management and cryptographic handling
  • Session and API security
  • Trust boundaries and attack surface review
  • Dependency, build, and CI/CD risk analysis
  • STRIDE threat modeling (Spoofing, Tampering, Repudiation, Info Disclosure, DoS, Elevation of Privilege)

When To Use It

Use it when:

  • Your project handles user input, authentication, or sensitive data
  • You're using AI-assisted development and want security checks on AI output
  • Your team needs structured security tracking (not just "we should fix this")
  • You want pre-commit or pre-merge security gates without blocking tooling
  • You need OWASP coverage documented for compliance or audit purposes

Best fit:

  • Web applications and APIs
  • Projects with authentication, payments, or user data
  • Teams that need security review integrated into their delivery flow
  • Codebases with third-party dependencies to monitor

When NOT To Use It

Don't use it for:

  • Static sites with no backend β€” there's minimal attack surface
  • Internal scripts with no user input β€” no trust boundaries to review
  • Replacing a penetration test β€” this is prompt-based review, not runtime testing
  • Replacing dependency scanners β€” it checks for known patterns, not CVE databases in real-time
  • Projects with no security requirements β€” if security doesn't matter, skip it

The honest test: If your project never handles user input, authentication, or sensitive data, you probably don't need this.


Quick Start

  1. See Installation section for all methods.

  2. Run a security review:

    /speckit.security-review.branch
    
  3. Turn findings into tasks:

    /speckit.security-review.followup
    
  4. Apply approved tasks to your plan:

    /speckit.security-review.apply
    

For normal feature development, prefer branch review after implementation. Use audit for broader pre-release or milestone reviews.


Choosing the Right Security Review Scope

Security Review supports different review scopes depending on the development stage.

Not every workflow requires a full-codebase security audit.

During normal Spec Kit implementation workflows, prefer:

/speckit.security-review.branch

Use:

/speckit.security-review.audit

for:

  • release reviews
  • milestone reviews
  • major architecture changes
  • systemic security analysis
  • broader trust-boundary validation

Avoid Overusing Full Audits

Running full security audits during every implementation cycle may create:

  • noisy findings
  • duplicated review output
  • slower development workflows
  • governance fatigue

Prefer scoped review during active feature development.

Use full audits intentionally.

Recommended Spec Kit Workflow Usage

During Feature Development

Recommended flow:

/specify
↓
security review on specification
↓
/plan
↓
security review on plan
↓
/tasks
↓
/implement
↓
/speckit.security-review.branch

This keeps security review focused on the current feature implementation.

During Pre-Release or Major Review Cycles

Recommended flow:

release candidate
↓
/speckit.security-review.audit

Use audit for:

  • release reviews
  • milestone reviews
  • major architecture changes
  • systemic security analysis
  • broader trust-boundary validation

Governance Artifacts

Security Review respects the following project governance artifacts when they exist:

ArtifactPurpose
security_constitution.mdThe Source of Truth. Repository-wide security rules, standards, and requirements that every feature must follow.
specs/<feature>/security-constraints.mdFeature-specific security rules generated during planning or specification.
docs/memory/Durable repository memory containing historical security decisions.

Optimizer-Aware Memory Retrieval

This extension integrates with spec-kit-memory-hub's local SQLite optimizer. When enabled, the extension uses the speckit-memory CLI to perform targeted searches across your project's durable memory rather than reading full directories.

To enable this:

  1. Ensure spec-kit-memory-hub is installed.
  2. Set optimizer.enabled: true in your .specify/extensions/memory-md/config.yml.
  3. The security review agent will automatically switch to the Optimizer-Aware Flow (Refresh -> Search -> Synthesize -> Read).

Commands

Quick Reference

CommandPhaseWhen To UseOutput
auditGovernanceRelease reviews, milestone reviews, broader system security analysisFull-codebase vulnerabilities with OWASP categories
branchImplementation ValidationAfter implementation, normal feature development (pre-merge)Changes-only security review, focused findings
stagedPre-CommitPre-commit hooks, local validation before git addOnly staged files security review
planPlanningAfter /speckit.planSecurity gaps in technical design
tasksTask GenerationAfter /speckit.tasksTask sequencing, missing security requirements
followupRemediation PlanningAfter findings are reviewedConvert findings to tasks or technical debt
applyIntegrationAfter followup decisionsInject security tasks into plan.md and tasks.md
exportReportingFor whitebox testing/complianceFormal Executive and Technical Pentest Report

Command Details

Full Audit

/speckit.security-review.audit
/speckit.security-review.audit focus on authentication, secrets handling, and payment flows
/speckit.security-review.audit review only the api and worker directories

Performs broader or full-system security review across the codebase. Recommended for milestone reviews, release reviews, or major architecture validation.

Staged Changes (Pre-Commit)

/speckit.security-review.staged
/speckit.security-review.staged focus on secrets and injection

Reviews only files staged with git add. If nothing is staged, it tells you.

Branch / PR Diff (Pre-Merge)

/speckit.security-review.branch
/speckit.security-review.branch feature/payment-gateway
/speckit.security-review.branch feature/payment-gateway develop

Reviews security risks introduced by the current branch or implementation changes. Recommended for normal feature development workflows.

By default, it detects your current active branch and compares it against its original source (main, develop, etc.). You can also specify branches explicitly if needed.

Example: Feature Development

/speckit.implement
↓
/speckit.security-review.branch

Reviews only the current implementation changes.

Example: Pre-Release Review

release candidate
↓
/speckit.security-review.audit

Performs broader review across the codebase.

Plan Review

/speckit.security-review.plan

Reviews the implementation plan for missing security requirements and unsafe assumptions. Run after /speckit.plan.

Task Review

/speckit.security-review.tasks

Checks that security tasks exist and are properly sequenced. Run after /speckit.tasks.

Follow-Up Planning

/speckit.security-review.followup

Converts findings into remediation tasks (Implement now), technical debt (Track as technical debt), or marks them as already covered.

Apply Follow-Ups

/speckit.security-review.apply

Writes approved security tasks into tasks.md and plan.md. Supports dry-run preview.

Formal Report Export

Synthesizes multiple review artifacts into a single, professional Whitebox Security Assessment Report.

/speckit.security-review.export

Use this when you need to provide a formal report to stakeholders or clients. It produces:

  • Executive Summary: High-level risk and business impact.
  • Technical Findings: Detailed exploit walk-throughs and code-level remediation.
  • Strategic Roadmap: Long-term security hardening advice based on project memory.

Workflow Integration

/speckit.plan                      β†’ Planning Phase
/speckit.security-review.plan      β†’ Review plan for security gaps
/speckit.tasks                     β†’ Task Generation
/speckit.security-review.tasks     β†’ Review task sequencing
/speckit.implement                 β†’ Implementation Phase
/speckit.security-review.branch    β†’ Focused security review
/speckit.security-review.followup  β†’ Convert findings to tasks
/speckit.security-review.apply     β†’ Apply approved tasks
/speckit.security-review.export    β†’ Export formal report

With Companion Extensions

ExtensionRelationship
Memory HubSecurity Review reads docs/memory/, specs/<feature>/memory-synthesis.md, and .github/copilot-instructions.md as design context. Optional but recommended.
Architecture GuardRoutes architecture-only findings to Architecture Guard. Security Review keeps security findings. No duplication.

Using Security Review with Architecture Guard

When used with Architecture Guard orchestration workflows:

  • governed-plan should use plan-level security review
  • governed-tasks should use task-level security review
  • governed-implement should generally prefer:
/speckit.security-review.branch

for implementation validation

Architecture Guard orchestration should only use:

/speckit.security-review.audit

for broader governance or release-level workflows.


Configuration

When You Need to Configure

Configuration is optional. You only need it if:

  • Your project has custom security requirements
  • You want to exclude certain patterns or directories
  • You need to customize severity thresholds
  • You want to focus on specific OWASP categories

How to Configure

Copy config-template.yml into your project as a team brief:

cp config-template.yml speckit-security.yml

Note: The extension is prompt-driven and does not read this file automatically. Use it as a human-readable team brief, and include relevant settings in your slash-command input when you want the agent to follow them.

The template covers: exclusion patterns, focus areas, severity thresholds, output settings, OWASP categories, dependency scanning, secrets detection, architecture settings, DevSecOps checks, memory hub paths, reporting, and false positive tracking.


Project Structure

security-review-extension/
β”œβ”€β”€ .gitignore
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ config-template.yml                ← Team brief template (not auto-read)
β”œβ”€β”€ extension.yml                      ← Extension manifest
β”œβ”€β”€ commands/                          ← Spec Kit command definitions (self-contained)
β”‚   β”œβ”€β”€ security-review.md                   ← Full audit (655 lines)
β”‚   β”œβ”€β”€ security-review-staged.md            ← Staged changes
β”‚   β”œβ”€β”€ security-review-branch.md            ← Branch/PR diff
β”‚   β”œβ”€β”€ security-review-plan.md              ← Plan review
β”‚   β”œβ”€β”€ security-review-tasks.md             ← Task review
β”‚   β”œβ”€β”€ security-review-followup.md          ← Finding follow-up
β”‚   β”œβ”€β”€ security-review-apply.md             ← Apply approved items
β”‚   └── init.md                              ← Bootstrap security rules
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ design.md
β”‚   β”œβ”€β”€ installation.md
β”‚   └── usage.md
β”œβ”€β”€ examples/
β”‚   └── example-output.md
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ logo.png
β”‚   └── logo.svg
└── scripts/
    └── test-install.sh                ← Smoke tests (35 tests)

Output Format

Generated reports include a YAML frontmatter header before the report body. This header contains structured metadata (risk level, finding counts, OWASP categories, and field definitions) that enables header-first processing:

  • An LLM reads the header and decides whether the document is relevant before loading the body
  • The header fields map directly to docs/memory/INDEX.md routing rows for token-efficient retrieval
  • The same fields become SQL columns when memory-hub SQLite Phase 1 is enabled β€” no rework needed

See docs/field-registry.md for the full field schema and docs/usage.md for INDEX.md integration instructions.

Example Report

# SECURITY REVIEW REPORT

## Executive Summary

**Overall Security Posture:** MODERATE RISK
**Total Findings:** 23
- Critical: 2
- High: 5
- Medium: 8
- Low: 6
- Informational: 2

## Vulnerability Findings

### [CRITICAL] SQL Injection in User Authentication

**Location:** src/auth/login.js:45
**OWASP Category:** A05:2025-Injection
**Description:** User input is concatenated directly into SQL query...
**Exploit Scenario:** Attacker could bypass authentication by...
**Remediation:** Use parameterized queries or ORM...
**Spec-Kit Task:** TASK-SEC-001

Full example: examples/example-output.md.


Release Checklist

  1. Update extension.version in extension.yml
  2. Update README badge and install URL
  3. Update docs/installation.md and docs/usage.md URLs
  4. Add new section in CHANGELOG.md
  5. Verify no stale version strings:
    grep -RIn "version: 'OLD_VERSION'\|vOLD_VERSION.zip\|version-OLD_VERSION" .
    
  6. Run ./scripts/test-install.sh
  7. Commit, tag, and push:
    git commit -m "release: vX.Y.Z"
    git tag vX.Y.Z
    git push origin main --tags
    

Non-Goals

This extension does not:

  • Replace penetration testing or runtime security scanners
  • Act as a real-time CVE database
  • Enforce rules at build time
  • Auto-fix vulnerabilities
  • Require runtime tools or framework-specific APIs
  • Duplicate Architecture Guard findings (architecture-only issues are routed there)

Support


License

This extension is released under the MIT License.

Stats

5 stars

Version

1.5.0release
Updated 5 days ago

Install

Using the Specify CLI

specify extension add security-review --from https://github.com/DyanGalih/spec-kit-security-review/archive/refs/tags/v1.5.0.zip

Owners

License

MIT