AppSec + AI/ML Security · Claude · Cursor · OpenAI Codex CLI

Threat modeling that reads your Jira, Jenkins, ServiceNow, and repo — now covering AI/ML infrastructure too.

Connects to your existing tools via API keys, builds a data flow diagram and threat-model diagram in draw.io format, scores every STRIDE threat for business impact, maps attack chains, checks compensating controls, and flags partial-compliance gaps with concrete additional controls — delivered as Word and Excel. Now also threat-models AI/ML pipelines (prompt injection, RAG/training data poisoning, model extraction, excessive agency), maps every threat to OWASP and MITRE ATT&CK/ATLAS, and runs under Claude Code/Cowork, Cursor, and OpenAI Codex CLI.

STRIDE + PASTA AI/ML + LLM threats OWASP Top 10 / API / LLM MITRE ATT&CK + ATLAS draw.io compatible Word + Excel output Claude · Cursor · Codex CLI

What it does

One skill, four connectors, one report — grounded in what your systems actually say, not a manually typed description.

🔌

Live connectors

Jira, Jenkins, ServiceNow, and a code repository (GitHub by default) via read-only API-key-authenticated MCP servers bundled in the plugin.

🗺️

DFD + threat model diagram

Two draw.io-compatible .drawio files: a clean data flow diagram, and a threat-model view with trust boundary swimlanes and threat-actor nodes.

🎯

Scored STRIDE register

Every threat rated Likelihood × Impact (1–25), with the impact rationale named — data sensitivity, compliance regime, blast radius, or reputational angle.

⛓️

Attack chain mapping

Individual threats linked into plausible end-to-end attack scenarios, so a risk owner sees the real consequence, not just a list.

🛡️

Compensating controls

What's already reducing each risk today, how likely the proposed fix is to actually close the gap, and the residual risk after both are applied.

📋

Compliance gap analysis

Partially-compliant controls get named, explained, and paired with specific additional controls to reach full compliance.

📄

Word + Excel output

A narrative .docx report for review/audit trail, and a sortable/filterable .xlsx risk register — pick either or both.

⚙️

Model-configurable

Defaults to Claude Sonnet to keep large connector payloads cheap to summarize. Point it at Opus, Haiku, or another model per your cost/fidelity tradeoff.

🤖

AI/ML infrastructure threats

Prompt injection (direct + indirect), training/RAG data poisoning, model extraction, excessive agency, insecure output handling, and unbounded consumption — layered onto STRIDE.

🧭

OWASP mapping

Every threat tagged against OWASP Top 10, OWASP API Security Top 10, and OWASP Top 10 for LLM Applications — whichever lists apply to the component in scope.

🧬

MITRE ATT&CK + ATLAS

Attack-chain steps tagged with MITRE ATT&CK technique IDs for conventional infrastructure and MITRE ATLAS technique IDs for AI/ML-targeting tradecraft.

🧩

Full PASTA option

Lightweight business-impact scoring by default; switch to the complete 7-stage PASTA process for compliance audits, pre-launch gates, or board-facing reports.

How it fits together

The plugin ships four small MCP servers (one per tool) plus a skill that orchestrates the workflow end to end.

Jira Jenkins ServiceNow Code Repository MCP CONNECTORS (API key auth) jira_connector.py jenkins_connector.py servicenow_connector.py repo_connector.py scripts/summarize.py Sonnet by default (MODEL_NAME configurable) threat-modeling skill STRIDE · attack chains · compensating controls · gaps runs on your session's model DFD.drawio Threat_Model.drawio Report.docx Register.xlsx

AI/ML infrastructure, threat-modeled end to end

If a repo has an LLM, a RAG pipeline, a vector store, or an agent/tool layer, the plugin knows — and switches on the AI-specific analysis.

🕵️

Auto-detection

detect_ai_stack scans the connected repo for LangChain, LlamaIndex, OpenAI/Anthropic/Bedrock SDKs, transformers/torch/vLLM, Pinecone/Weaviate/Chroma, MLflow/Kubeflow/SageMaker, and AutoGen/CrewAI/LangGraph markers.

💉

Prompt injection & RAG poisoning

Direct injection, indirect injection via ingested documents, and vector-store poisoning — each mapped to OWASP LLM01/LLM08 and MITRE ATLAS technique AML.T0051.

🧪

Training & model supply chain

Fine-tuning data poisoning and unsigned model-registry deploys, mapped to OWASP LLM03/LLM04 and MITRE ATLAS AML.T0020 / AML.T0018.

🕹️

Excessive agency & insecure output handling

Agents given more tool authority than their task needs, and model output trusted downstream without validation — OWASP LLM06/LLM05, MITRE ATLAS AML.T0053.

💸

Unbounded consumption

Missing token/turn/iteration limits that enable cost exhaustion or "denial of wallet" attacks against a metered inference endpoint — OWASP LLM10.

🗺️

AI-aware diagrams

New draw.io node types — training pipeline, model registry, vector store, inference endpoint, agent/tool layer — so RAG and agentic systems render correctly in the DFD.

Every threat, mapped to a real framework

Not just a STRIDE label — every threat and attack-chain step carries an ID from an industry-standard list.

FrameworkApplies toExample ID
OWASP Top 10 (2021)Conventional web/application componentsA01:2021 Broken Access Control
OWASP API Security Top 10 (2023)REST/GraphQL/RPC APIs, including ML inference endpointsAPI4:2023 Unrestricted Resource Consumption
OWASP Top 10 for LLM Applications (2025)LLM apps, RAG pipelines, agentsLLM01:2025 Prompt Injection
MITRE ATT&CK (Enterprise)Conventional infrastructure tradecraft in attack chainsT1078 Valid Accounts
MITRE ATLASAI/ML-specific tradecraft in attack chainsAML.T0051 LLM Prompt Injection

Both report builders render these as a dedicated column in the threat register and a standalone Framework Coverage Mapping section/sheet.

Runs wherever you build

Same skill, same reference docs, same scripts — three entry points depending on your agent of choice.

🟣

Claude Code / Cowork

Native plugin — .claude-plugin/plugin.json and .mcp.json. Install directly or from this repo.

▶️

Cursor

.cursor/rules/threat-modeling.mdc project rule plus .cursor/mcp.json for the four connectors.

🖥️

OpenAI Codex CLI

Root AGENTS.md, read automatically, plus config/codex-config.example.toml for MCP server registration.

What the outputs look like

Illustrative preview — actual reports are generated from your live data, with as many rows as the assessment produces.

Threat Register (excerpt) — Word & Excel
IDThreatL×IRiskOWASP
S-1Session token replay4×5HighA07:2021
E-1Parameter tampering on status3×5HighAPI5:2023
I-2Excess PII sent to vendor3×4MediumAPI6:2023
T-1Unsigned internal gRPC payload2×4MediumA08:2021
D-1No per-account rate limit2×2LowAPI4:2023
Attack Chain AC-1
StepThreatAction
1S-1Replay captured session token
2E-1Force applicant status to "approved"
3R-1No immutable log → bypass goes undetected
Overall: High — sanctioned-applicant approval, regulatory exposure
AI Threat Register (excerpt) — AI Support Agent example
IDThreatL×IRiskOWASP LLM
T-1Direct prompt injection overrides system instructions5×5HighLLM01:2025
E-1Excessive agency — refund tool with no approval gate4×5HighLLM06:2025
I-2Cross-tenant PII bleed via RAG context3×5HighLLM02/LLM08:2025
D-1Unbounded consumption — no token/turn limits4×3MediumLLM10:2025
Attack Chain AC-1 — Indirect injection → fraudulent refund
StepThreatMITRE ATLAS
1T-2 Poisoned KB doc retrieved as RAG contextAML.T0051
2E-1 Agent calls refund tool with no approvalAML.T0053
3R-1 Mutable logs delay detection
Overall: High — direct financial fraud via autonomous tool execution

Set up

Install the plugin, then configure only the connectors you actually plan to use — none are mandatory.

  1. Download the .plugin file from the repo's releases and install it in Claude Code or Cowork — or, for Cursor, enable .cursor/rules/threat-modeling.mdc + .cursor/mcp.json; for OpenAI Codex CLI, it reads AGENTS.md automatically (see config/codex-config.example.toml for MCP setup).
  2. Copy .env.example to .env and fill in API keys for the tools you use (table below).
  3. Set ANTHROPIC_API_KEY if you want the token-minimizing summarizer (scripts/summarize.py) to run automatically on large payloads.
  4. In your session: "Threat model the Payment Onboarding epic PROJ-4210, pull the repo org/onboarding-service, and give me both Word and Excel." Or, for an AI system: "Threat model our LangChain support agent repo and map every threat to the OWASP LLM Top 10 and MITRE ATLAS."

ConnectorEnv varsWhere to get credentials
JiraJIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKENAtlassian account → API tokens
JenkinsJENKINS_BASE_URL, JENKINS_USER, JENKINS_API_TOKENJenkins → User → Configure → API Token
ServiceNowSERVICENOW_INSTANCE_URL, SERVICENOW_USER, SERVICENOW_PASSWORDServiceNow admin / service account
Code repoREPO_PROVIDER, REPO_TOKEN, REPO_OWNER, REPO_NAMEGitHub → Settings → Developer settings → PAT (read-only repo scope)
Model configANTHROPIC_API_KEY, MODEL_NAMEAnthropic Console; MODEL_NAME defaults to claude-sonnet-5

Try it without any connectors

The report and diagram generators run standalone against a JSON spec — useful for previewing the output format before wiring up live tools.

# Conventional application example
python3 scripts/generate_drawio.py skills/threat-modeling/references/examples/sample_threat_model_spec.json MyService_Threat_Model.drawio threat_model
python3 scripts/build_docx_report.py skills/threat-modeling/references/examples/sample_report_data.json MyService_Report.docx
python3 scripts/build_xlsx_report.py skills/threat-modeling/references/examples/sample_report_data.json MyService_Register.xlsx

# AI / RAG / agentic system example
python3 scripts/generate_drawio.py skills/threat-modeling/references/examples/sample_ai_threat_model_spec.json AI_Agent_Threat_Model.drawio threat_model
python3 scripts/build_docx_report.py skills/threat-modeling/references/examples/sample_ai_report_data.json AI_Agent_Report.docx
python3 scripts/build_xlsx_report.py skills/threat-modeling/references/examples/sample_ai_report_data.json AI_Agent_Register.xlsx