feat: add speckit.threatmodel command for OWASP Top 10 for LLM applications#2287
Open
NaviaSamal wants to merge 5 commits intogithub:mainfrom
Open
feat: add speckit.threatmodel command for OWASP Top 10 for LLM applications#2287NaviaSamal wants to merge 5 commits intogithub:mainfrom
NaviaSamal wants to merge 5 commits intogithub:mainfrom
Conversation
added 5 commits
April 20, 2026 10:53
Collaborator
|
Please deliver this as a Spec Kit extension as per https://github.com/github/spec-kit/tree/main/extensions and make sure to host it on your own GitHub repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
What does this PR build
A Spec-Kit skill (
speckit-threatmodel) that performs security threat analysis on LLM interaction surfaces — skills, prompts, templates, hooks, and memory files. (Existing Claude skills created and new ones added)What does success Looks Like
Running
/speckit-threat-model all skillsproduces:FEATURE_DIR/threat-model.mdwith categorized threats, risk ratings, and mitigationsFEATURE_DIR/checklists/security-llm.mdwith actionable verification itemsThis PR adds a new /speckit.threatmodel command to Spec Kit that performs comprehensive security analysis of Spec-Driven Development projects using the OWASP LLM Top 10 2025 framework. The command analyzes skills, templates, and memory files for potential security vulnerabilities specific to large language model workflows, generating a threat-model.md report and security checklist.
Why This Is Needed
As AI/LLM tools become central to development workflows, security risks specific to these technologies (prompt injection, data poisoning, etc.) need proactive identification. This command integrates security analysis directly into the Spec-Driven Development process, ensuring that threat modeling happens early and continuously rather than as an afterthought. SDD emphasizes that security vulnerabilities discovered in production should feed back into specifications as constraints for future generations. This command brings that feedback loop forward — proactively identifying LLM-specific threats during the specification phase rather than waiting for production incidents.
Testing
uv run specify --helpuv sync && uv run pytestManual test results
Agent: GitHub Copilot in VS Code | OS/Shell: macOS/zsh
uv run specify init /tmp/speckit-test --ai claude --offlineuv run specify init /tmp/speckit-test-copilot --integration copilot --offline/speckit-specify Add a hello world REST endpoint/speckit-threatmodeluv run python -m pytest tests/test_agent_config_consistency.py -q###Identify affected commands - reporting template per CONTRIBUTING.md
Test selection reasoning
src/specify_cli/integrations/claude/__init__.pyspecify init"threatmodel"toARGUMENT_HINTSdict — affects scaffolding of the Claude integration;specify initmust produce the new skill correctlytemplates/commands/threatmodel.md/speckit.threatmodel/speckit.threatmodelslash commandtests/integrations/test_integration_base_markdown.pytests/integrations/test_integration_base_skills.pytests/integrations/test_integration_base_toml.pytests/integrations/test_integration_base_yaml.pytests/integrations/test_integration_copilot.pytests/integrations/test_integration_generic.pyRequired tests
Prerequisites first:
/speckit.specify— The Claude integration change (ARGUMENT_HINTSaddition) affectsspecify initscaffolding. Runspecify initwith--ai claudeand verify thethreatmodelskill is created with the correct argument-hint in frontmatter./speckit.threatmodel— New command template. After scaffolding (T1), invoke/speckit.threatmodelin the agent and verify it runscheck-prerequisites.sh, inventories artifacts, and producesthreat-model.mdoutput as expected.AI Disclosure
This PR was developed with assistance from GitHub Copilot (in VS Code).
How AI was used
I followed the Spec-Driven Development (SDD) workflow and followed the specify skill format manually, authoring the requirements myself and using GitHub Copilot to help generate and refine artifacts at each stage:
The OWASP LLM Top 10 2025 threat categories and methodology were sourced from the OWASP Top 10 for LLM Applications 2025 and adapted for Spec-Kit's agent artifact context (skills, templates, memory files).