Threat Modeling MCP Server is an MCP server that guides an AI coding agent through structured security threat modeling and code validation. It analyzes business context, architecture, assets, trust boundaries, and threat actors, then produces Markdown or JSON reports using a phased STRIDE-based process. The catalogue skills operate this workflow through compatible agent clients.
Borrowing it
Nothing to install: this file belongs to awslabs/threat-modeling-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/awslabs/threat-modeling-mcp-server/main/.kiro/skills/phase-7-5-code-validation/SKILL.mdgit clone --depth 1 https://github.com/awslabs/threat-modeling-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/awslabs/threat-modeling-mcp-server/phase-7-5-code-validation)<a href="https://agentmods.dev/skills/awslabs/threat-modeling-mcp-server/phase-7-5-code-validation"><img src="https://agentmods.dev/badge/skills/awslabs/threat-modeling-mcp-server/phase-7-5-code-validation.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.00554 |
| Opus 5 | $0.00016 | $0.00277 |
| Sonnet 5 | $0.00006 | $0.00111 |
| Haiku 4.5 | $0.00003 | $0.00055 |
Grade A, and why
phase-7-5-code-validation scanned grade A with 0 findings 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 8d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Phase 7.5: Code Validation Analysis
Objective
Inspect the implementation and record evidence for every current threat and mitigation. This phase runs only when source code is detected in the project recorded with manage_workflow(action="set_project").
Tool
manage_code_validation(action, values=None)
| Action | Purpose |
|---|---|
describe |
Show the finding payload and accepted outcomes |
record |
Atomically store findings and update canonical statuses |
get |
Show current findings, missing IDs, and stale records |
validate |
Check that every current threat and mitigation has fresh evidence |
report |
Render the evidence-based report and finalize the current snapshot |
clear |
Remove findings before starting a new validation |
record accepts values.threat_findings and values.mitigation_findings. Each finding requires its record ID, an outcome, and at least one non-empty evidence string. recommendation is optional.
Threat outcomes:
fully_mitigatedpartially_mitigatednot_mitigatednot_applicable
Mitigation outcomes:
implementedpartially_implementednot_implementednot_applicable
Workflow
- Call
manage_workflow(action="guidance", phase="7.5"). - Call
manage_code_validation(action="describe"). - Inspect the relevant files and identify concrete file, line, configuration, or test evidence.
- Call
manage_code_validation(action="record", values=FINDINGS). Findings may be submitted incrementally. - Call
manage_code_validation(action="validate"); record every missing or stale item. - Call
manage_code_validation(action="report")to finalize the current snapshot. - Call
manage_workflow(action="advance")to proceed to Phase 8.
Observed code behavior belongs in finding evidence. Use
manage_assumptions(action="add", values=ASSUMPTION) only when a statement
remains unverified.
Completion Criteria
- Every current threat has a fresh finding
- Every current mitigation has a fresh finding
- Each finding contains concrete evidence or a not-applicable rationale
- Validation reports complete coverage
- The final report has been generated for the current snapshot
-
manage_workflow(action="advance")proceeds to Phase 8
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.
- 8d ago First seen · 59 lines · 32 tokens per session scan A 61f766043c67
phase-7-5-code-validation is a skill published in the GitHub repository awslabs/threat-modeling-mcp-server (100 stars, last pushed 12d ago), licensed Apache-2.0. It adds 32 tokens to every session and 554 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
rework-rate
Measure and interpret PR rework rate — the emerging 5th DORA metric.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
agent-teams-simplify-and-harden
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or…