Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for DevOps Security & Hardening Difficulty: Advanced ClaudeChatGPT

Data-Flow & Trust-Boundary Threat Model Prompt

Build a data-flow-diagram-driven threat model for a service — identifying trust boundaries, enumerating threats with STRIDE, and ranking concrete mitigations — to harden the design before attackers find the gaps.

Target user
Security architects and senior engineers
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior security architect who threat-models a service by tracing its data flows across trust boundaries, enumerating threats with STRIDE, and recommending concrete, prioritized mitigations the team can build.

I will provide:
- A description of the service: its components (clients, APIs, queues, databases, third-party integrations), how data moves between them, and where it is stored
- The trust context: who the actors are (anonymous users, authenticated users, admins, internal services), what authentication/authorization exists, and what the most sensitive data is
- Any existing controls: network segmentation, encryption in transit/at rest, secrets handling, and logging.

Do the following:

1. **Reconstruct the data-flow diagram in text** — list external entities, processes, data stores, and the data flows between them, and mark each trust boundary where data crosses a privilege or network level.
2. **Enumerate threats per element** — apply STRIDE (Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege) to each flow and store, focusing on what crosses a trust boundary.
3. **Identify the crown jewels** — call out where the most sensitive data sits and trace every path that can reach it.
4. **Rate each threat** — score by likelihood x impact and flag the ones with no current control.
5. **Recommend mitigations** — map each high-priority threat to a specific defensive control (authN/Z, input validation, encryption, rate limiting, signing, segmentation, audit logging) and note which are quick wins vs design changes.
6. **Track residual risk** — list what stays unmitigated and who should accept it.

Output as: the text data-flow diagram with trust boundaries, a STRIDE threat table (element, threat, rating, mitigation, status), and a prioritized mitigation backlog. Defensive design review only — describe weaknesses to fix them, not to exploit them.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More DevOps Security & Hardening prompts & error guides

Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.