{
  "id": 5129041,
  "title": "I gave my STRIDE threat modelling tool an agentic interview mode",
  "url": "https://urgent.news/2026/09/02/i-gave-my-stride-threat-modelling-tool-an-agentic-interview-mode",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-02T17:02:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/greenbladesec/i-gave-my-stride-threat-modelling-tool-an-agentic-interview-mode-1dao"
  },
  "original_language": "en",
  "account": "In June, the author released the P2 Threat Model Generator, a Python tool that analyzes various application manifests and generates HTML, JSON, and MITRE ATT&CK reports based on STRIDE and CVSS scores. The tool works well but lacks the engaging aspect of input gathering. Real threat modeling discussions don't start with a predefined YAML file; they begin with a discussion about the application's purpose and functionality. To address this, the author implemented an agentic mode for the tool.\n\nThe agentic mode keeps all deterministic elements intact, such as the STRIDE rule engine, scorer, compliance checker, and HTML reporter. The Large Language Model (LLM) is limited to its role of interviewing the user and determining what to feed into the ApplicationDescriptor. This approach ensures the agent isn't generating threats or reasoning about security; it simply interviews the user and leverages a predefined schema.\n\nThe harness used for this approach, called agent-core, is a small library with three main components: Agent, tool, and ToolRegistry. The Agent.run(goal) function runs a loop until the model calls no more tools. Policies control the risk tiers permitted, and providers can be swapped between Claude for interactive work and Ollama for offline runs.\n\nThe toolset consists of twelve @tool functions, each performing a specific task. The ask_user function is the star, allowing the agent to ask the human user a single question at a time, wait for their response, and then decide the next question. The rest of the functions help build the descriptor, inspect state, and run the pipeline.\n\nThe system prompt instructs the agent to act as a senior threat-modelling analyst using STRIDE. The workflow involves asking about the application's name, purpose, environment, and internet-facing status, followed by compliance requirements. The agent then iteratively asks about components and data flows, runs the STRIDE analysis, scores threats, generates the report, and finally summarizes the results.\n\nThe author compared this approach to another method where the user writes a paragraph describing their application, which is then parsed by the agent. Two problems were identified with this alternative: silent hallucination and a lack of follow-up loop. The turn-by-turn interview via ask_user eliminates both issues, as the agent can only know what the user has provided and can ask follow-up questions whenever it encounters a gap.\n\nThe trade-off is that a full interview takes 20-40 tool calls with a human in the loop, but Claude Sonnet handles it in approximately 2 minutes, while Ollama with a 70B local model takes 8-10 minutes. The author conducted twenty-six tests using mocking to verify the pipeline without involving real LLMs. The tests include checking if ask_user returns the input, ensuring the full pipeline wires up correctly, and conducting a smoke test with a CLI.",
  "summary": "Back in June I shipped P2 Threat Model Generator — a Python tool that reads docker-compose, OpenAPI, and Kubernetes manifests, runs STRIDE analysis, scores threats, and spits out HTML + JSON reports with MITRE ATT&CK mappings. It works. It's boring. That's fine — the boring parts (rule engine, scorer, reporters) are the parts you actually want deterministic. The part that isn't boring is getting…",
  "key_points": [
    "Agentic mode implemented for STRIDE threat modelling tool",
    "LLM interviews user to gather application details",
    "Twelve @tool functions facilitate descriptor building"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}