This prompt is built for security architects and platform engineers reviewing architecture documents, data flow diagrams, or infrastructure-as-code specifications before implementation. It produces a structured trust-boundary map that identifies violations where a component trusts another without explicit credential validation, authorization checks, or network policy enforcement. The output is designed to feed directly into threat modeling workflows, security decision records, and pre-deployment review gates. You should use this prompt when you have a concrete design artifact—a service topology description, an architecture decision record, or a set of Terraform or CloudFormation templates—and you need to systematically surface every place where one component implicitly trusts another.
Prompt
Zero-Trust Boundary Validation Prompt

When to Use This Prompt
Use this prompt to validate that a system design enforces authentication and authorization on every service-to-service call, user request, and data access path without relying on implicit trust.
The prompt assumes you have a design document, architecture diagram description, or service topology specification as input. It does not replace a formal threat model but accelerates the identification of trust-boundary violations that a human reviewer would otherwise need to trace manually. For best results, provide the prompt with a clear description of your system's components, their communication paths, the authentication mechanisms in use, and any network policies or security groups that govern traffic. The prompt will cross-reference these against zero-trust principles: every call must be authenticated, every request must be authorized, and no component should trust another based solely on network location or shared infrastructure.
Do not use this prompt for runtime incident response, live penetration testing reports, or compliance audits that require attestation under a specific regulatory framework. It is a design-time review tool, not a runtime detection system. The prompt will flag architectural patterns such as services accepting unauthenticated requests from within the same VPC, database connections that bypass credential rotation, or inter-service calls that rely on shared secrets without identity propagation. Each finding includes the violating component, the trust assumption being made, and a recommended remediation path. After running the prompt, you should validate its findings against your actual implementation, prioritize violations by blast radius, and document accepted risks in a security decision record before proceeding to implementation.
Use Case Fit
Where the Zero-Trust Boundary Validation Prompt delivers strong results and where it introduces risk. Use these cards to decide if this prompt fits your current architecture review workflow.
Good Fit: Pre-Implementation Design Review
Use when: reviewing system design documents, architecture diagrams, or data flow diagrams before any code is written. The prompt excels at identifying implicit trust assumptions that would become expensive to fix later. Guardrail: always provide a concrete artifact (diagram, document, or structured description); abstract discussions produce vague output.
Good Fit: Cross-Service Auth Audit
Use when: you have a service topology with multiple internal services calling each other and need to verify every call path enforces authentication and authorization. The prompt maps service-to-service trust boundaries and flags missing mTLS, unsigned JWTs, or hardcoded credentials. Guardrail: supply a service inventory with call paths; the prompt cannot infer topology from code alone.
Bad Fit: Runtime Traffic Analysis
Avoid when: you need to analyze live network traffic, production logs, or real-time API calls for trust violations. This prompt works on design artifacts, not runtime telemetry. Guardrail: pair with a runtime security observability tool for production validation; use this prompt only for design-stage review.
Bad Fit: Single-Service Code Review
Avoid when: reviewing a single service's codebase for authentication bugs. The prompt operates at the architecture level and will miss implementation flaws like missing input validation or incorrect token parsing. Guardrail: use a code-review-specific prompt for implementation details; reserve this prompt for system-level boundary analysis.
Required Input: Trust Boundary Artifacts
Risk: without explicit trust boundaries, data stores, external entities, and service call paths in the input, the model will hallucinate a plausible but incorrect trust map. Guardrail: provide at minimum a data flow diagram description, a service inventory, and known auth mechanisms per boundary. Vague inputs produce dangerous false confidence.
Operational Risk: Lateral Movement Blind Spots
Risk: the prompt may miss indirect lateral movement paths where an attacker pivots through multiple services, especially when trust is transitive across three or more hops. Guardrail: explicitly ask the prompt to trace multi-hop paths and flag transitive trust chains. Follow up with a manual review of any path longer than two hops.
Copy-Ready Prompt Template
A reusable prompt that forces an architecture model to identify implicit trust assumptions and map every service-to-service, user, and data access call against explicit authentication and authorization requirements.
This prompt template is designed to be copied directly into your prompt management system, IDE, or orchestration harness. It uses square-bracket placeholders for all dynamic inputs. Before sending this to a model, replace every placeholder with concrete values from your architecture review context. The prompt instructs the model to act as a zero-trust security architect, systematically analyzing a system design for violations of the principle 'never trust, always verify.' It produces a structured trust-boundary map, a list of violations, and prioritized remediation guidance.
textYou are a zero-trust security architect reviewing a system design. Your task is to identify every implicit trust assumption and produce a trust-boundary validation report. ## SYSTEM DESIGN [DESIGN_DOCUMENT] ## CONTEXT - Organization security policy highlights: [SECURITY_POLICY_CONTEXT] - Known technology stack: [TECH_STACK] - Regulatory or compliance requirements: [COMPLIANCE_REQUIREMENTS] ## INSTRUCTIONS 1. Identify every trust boundary in the system. A trust boundary exists wherever a request crosses between components, services, users, or data stores. 2. For each boundary, determine whether explicit authentication (AuthN) and authorization (AuthZ) are enforced. Flag any boundary where trust is implicit. 3. For each violation, classify the severity as CRITICAL, HIGH, MEDIUM, or LOW based on the sensitivity of the data or action involved. 4. Identify lateral movement paths: if an attacker compromises one component, what else can they reach without re-authentication? 5. Produce a remediation plan ordered by risk severity. ## OUTPUT SCHEMA Return a JSON object with the following structure: { "trust_boundaries": [ { "boundary_id": "string", "source": "string (calling component/user)", "target": "string (receiving component/data store)", "protocol": "string (e.g., gRPC, HTTP, message queue)", "authn_enforced": boolean, "authn_mechanism": "string or null", "authz_enforced": boolean, "authz_mechanism": "string or null", "implicit_trust_detected": boolean, "data_sensitivity": "PUBLIC | INTERNAL | CONFIDENTIAL | RESTRICTED" } ], "violations": [ { "violation_id": "string", "boundary_id": "string", "severity": "CRITICAL | HIGH | MEDIUM | LOW", "description": "string", "missing_control": "string", "exploit_scenario": "string" } ], "lateral_movement_paths": [ { "path_id": "string", "entry_point": "string", "reachable_components": ["string"], "trust_exploited": "string" } ], "remediation_plan": [ { "priority": integer, "violation_id": "string", "recommended_control": "string", "implementation_guidance": "string" } ], "summary": "string (executive summary of findings)" } ## CONSTRAINTS - Do not assume any authentication or authorization exists unless explicitly stated in the design. - Treat every service-to-service call as untrusted by default. - Flag any hardcoded credentials, shared secrets, or API keys mentioned in the design. - If the design document lacks sufficient detail to determine a control, flag it as a finding with severity HIGH and note the missing information. - Do not invent controls that are not described in the design.
To adapt this template, replace [DESIGN_DOCUMENT] with the full text of your architecture document, ADR, or system diagram description. The [SECURITY_POLICY_CONTEXT] placeholder should contain relevant excerpts from your organization's security standards—such as required AuthN mechanisms, approved protocols, or data classification rules. [TECH_STACK] helps the model reason about protocol-specific risks (e.g., mTLS for gRPC, JWT validation for REST). [COMPLIANCE_REQUIREMENTS] should list applicable frameworks like SOC 2, HIPAA, or PCI DSS so the model can flag gaps against specific control requirements. If you do not have policy context or compliance requirements, replace those placeholders with 'No specific policy provided' or 'No compliance framework specified' rather than leaving them empty. The output schema is strict JSON; wire this into a parser that validates the schema before accepting the result. For high-risk systems, always route the output to a human security reviewer before closing any findings.
Prompt Variables
Inputs the prompt needs to work reliably. Validate each before sending.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[SYSTEM_DESIGN_DOC] | Full text of the architecture or system design document to be reviewed | Service A calls Service B over HTTPS with a shared API key stored in a config file | Must be non-empty string. Check for minimum 200 characters to ensure sufficient context. Reject if only a diagram reference without text. |
[TRUST_BOUNDARY_DEFINITION] | Explicit definition of what constitutes a trust boundary in this review context | Any network hop between two distinct services or a user-to-service call | Must be a non-empty string. Validate that it defines a clear scope. Default to 'any service-to-service or user-to-service network call' if null. |
[AUTHENTICATION_STANDARD] | The required authentication mechanism for crossing a trust boundary | mTLS with short-lived SPIFFE certificates | Must be a non-empty string. Validate against a list of known patterns (mTLS, JWT, OAuth2, etc.). Reject if 'none' or 'implicit trust'. |
[AUTHORIZATION_MODEL] | The required authorization check for every request across a boundary | Scope-based RBAC validated at the destination service | Must be a non-empty string. Check that it specifies a check location (e.g., 'at destination'). Reject if authorization is described as 'handled by the gateway only'. |
[KNOWN_VIOLATIONS] | List of pre-existing or accepted violations to exclude from the report | The legacy monolith-to-database connection is exempt until Q3 migration | Can be null or an empty list. If provided, each entry must be a string. Validate that it does not contain a blanket exclusion like 'all internal traffic'. |
[OUTPUT_SCHEMA] | The strict JSON schema for the trust-boundary map and violation list | {"boundaries": [...], "violations": [...]} | Must be a valid JSON Schema object. Validate with a schema parser. Reject if it allows free-text fields without structured violation types. |
[CONSTRAINTS] | Specific rules or policies that override default behavior | Flag any use of long-lived API keys as a HIGH severity violation | Can be null. If provided, must be a list of strings. Validate that each constraint is a clear, actionable rule, not a vague policy statement. |
Implementation Harness Notes
How to wire the Zero-Trust Boundary Validation Prompt into a secure, automated architecture review pipeline.
This prompt is designed to be run against structured architecture documents, not live infrastructure. The implementation harness must treat the model's output as a draft security finding, not a final verdict. Every identified violation must be verified by a human reviewer before it becomes an action item. The harness should enforce this by routing all outputs to a review queue and blocking direct ticket creation or CI/CD gating until approval is recorded.
Wire the prompt into a document-processing pipeline: when a design doc (e.g., an ADR, a system boundary diagram description, or a service topology spec) is committed to a repository, a webhook triggers a job that extracts the relevant text, injects it into the [DESIGN_DOCUMENT] placeholder, and calls the model. The output schema—a JSON array of trust-boundary violations with source, target, protocol, authz_check, and severity fields—must be validated with a strict JSON Schema validator before the pipeline proceeds. If validation fails, retry once with a repair prompt that includes the schema and the raw output. If it fails again, log the failure and alert the pipeline owner; do not silently drop the review.
For each violation the model returns, the harness should attempt to ground the finding by searching the source document for the named services and protocols. If the cited services or calls are not present in the document, flag the finding as a potential hallucination and suppress it from the default report. This grounding step is critical: models will sometimes invent plausible-sounding service names or call paths that do not exist in the actual design. A simple string-match or fuzzy-search check against the input document reduces noise and builds reviewer trust.
The harness must also check for lateral movement paths across findings. After collecting all validated violations, run a graph-reachability query: if Service A trusts Service B without authz, and Service B trusts Service C without authz, then Service A can reach Service C. The harness should generate a separate lateral_movement_paths section in the final report, distinct from the direct violations. This analysis is deterministic code, not model inference—it belongs in the harness, not the prompt.
Log every model call with the prompt version, input hash, output, validation result, grounding result, and reviewer decision. This audit trail is essential for security review workflows, where you must be able to trace why a finding was accepted, rejected, or modified. Store logs in an append-only system and retain them for at least the duration of the architecture's lifecycle. Do not log the full design document if it contains secrets or sensitive topology details; log a content hash instead and store the document separately with access controls.
Model choice matters here. Use a model with strong reasoning capabilities and a large context window (e.g., Claude 3.5 Sonnet or GPT-4o) because architecture documents can be long and the analysis requires multi-hop reasoning across service boundaries. Avoid small or fast models for this task—they are more likely to miss indirect trust relationships and produce underspecified findings. If cost is a concern, run the prompt on document commit (not on every push) and cache results keyed by document hash until the document changes.
Expected Output Contract
Fields, format, and validation rules for the zero-trust boundary validation response. Use this contract to parse, validate, and reject model outputs before they enter downstream systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
trust_boundaries | Array of objects | Must contain at least one boundary object. Reject if empty array or missing. | |
trust_boundaries[].boundary_id | String, kebab-case | Must match pattern ^TB-[a-z0-9-]+$. Must be unique across all boundaries in the response. | |
trust_boundaries[].description | String, 10-500 chars | Must describe the boundary between two named components. Reject if component names are missing or generic. | |
trust_boundaries[].authentication_mechanism | String enum | Must be one of: mTLS, JWT, OAuth2, API-Key, SAML, SPIFFE, None. Reject if 'None' appears without a violation flag. | |
trust_boundaries[].authorization_model | String enum | Must be one of: RBAC, ABAC, ReBAC, Policy-Engine, None. Reject if 'None' appears without a violation flag. | |
trust_boundaries[].violations | Array of objects | Must contain at least one object if authentication_mechanism or authorization_model is 'None'. Reject if violations present but no 'None' mechanism. | |
trust_boundaries[].violations[].severity | String enum | Must be one of: CRITICAL, HIGH, MEDIUM, LOW. Reject if CRITICAL or HIGH severity violation lacks a lateral_movement_path. | |
trust_boundaries[].violations[].lateral_movement_path | String or null | Must be non-null string for CRITICAL and HIGH severity violations. Describe the path from untrusted to trusted component. Reject if null for high-severity violations. |
Common Failure Modes
Zero-trust boundary validation prompts fail in predictable ways. Here are the most common failure modes and how to guard against them before they reach production.
Implicit Trust in Internal Networks
What to watch: The model assumes services within the same VPC, cluster, or subnet are inherently trusted and skips authentication checks for internal calls. Guardrail: Explicitly instruct the prompt to flag every service-to-service call that lacks mutual TLS, signed tokens, or attested identity, regardless of network location.
Missing Data-Plane Authorization
What to watch: The prompt validates that a user is authenticated but fails to check whether that user is authorized to access the specific resource, tenant, or record being requested. Guardrail: Require the output to map every data access path to an authorization policy and flag any path where authentication alone gates access.
Lateral Movement Blind Spots
What to watch: The analysis treats each service boundary in isolation and misses chained trust relationships where compromising Service A grants implicit access to Service B. Guardrail: Add a dedicated lateral-movement analysis step that traces credential propagation and flags transitive trust chains longer than one hop.
Placeholder or Stub Credential Acceptance
What to watch: The prompt accepts design documents that use placeholder values like 'TODO: add auth' or hardcoded test credentials without flagging them as violations. Guardrail: Include a pattern-matching pre-check that rejects any trust boundary containing TODO, FIXME, placeholder, or hardcoded credential strings before the main analysis runs.
Overlooking Async and Event-Driven Paths
What to watch: The prompt focuses on synchronous request-response flows and misses message queues, event buses, webhooks, and batch jobs that cross trust boundaries without authentication. Guardrail: Explicitly enumerate all async communication channels in the input context and require the prompt to validate each one against the same zero-trust criteria as synchronous calls.
Output Drift Toward Architecture Summary
What to watch: Under complex inputs, the model reverts to describing the architecture instead of producing a structured violation report with specific trust-boundary gaps. Guardrail: Constrain the output schema to require a violations array with required fields (boundary, missing_control, risk_level) and reject any response that lacks at least one violation or contains only descriptive prose.
Evaluation Rubric
Score each criterion on a pass/fail basis before shipping the Zero-Trust Boundary Validation Prompt. Run these tests against the model output to catch trust violations, missing evidence, and hallucinated controls.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Trust Boundary Completeness | Every service-to-service call, user request, and data access path from [DESIGN_DOC] appears in the trust-boundary map | Output omits a documented interaction path or data flow | Diff the set of interactions in the output against the interaction list extracted from [DESIGN_DOC]; flag any missing entries |
Authentication Enforcement | Every trust-boundary crossing in the output specifies an explicit authentication mechanism (mTLS, JWT, OAuth2, etc.) | A boundary crossing lists 'none', 'implicit', 'trusted network', or omits the auth field | Schema check: for each boundary object, assert |
Authorization Enforcement | Every trust-boundary crossing specifies an authorization check (RBAC, ABAC, policy engine, etc.) with a scope constraint | Authorization field is missing, set to 'none', or lacks a scope/permission statement | Schema check: assert |
Lateral Movement Path Detection | Output identifies at least one potential lateral movement path if any service has more than one downstream dependency | Output states 'no lateral movement paths found' when a service with multiple downstream dependencies exists in [DESIGN_DOC] | Parse the dependency graph from [DESIGN_DOC]; if any node has out-degree > 1, assert |
Violation Evidence Grounding | Every reported violation includes a direct reference to a specific section, diagram, or statement in [DESIGN_DOC] | A violation entry contains a hallucinated reference, a generic claim without a source pointer, or a citation that does not exist in [DESIGN_DOC] | For each violation, extract the |
No Hallucinated Controls | Output does not invent security controls, protocols, or services not present in [DESIGN_DOC] | Output recommends adding a control that already exists in [DESIGN_DOC] or describes a technology not mentioned anywhere in the input | Cross-reference every recommended control against the full text of [DESIGN_DOC]; flag any control not traceable to a gap explicitly identified in the design |
Output Schema Validity | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed | JSON parse fails, required fields are missing, or field types do not match the schema | Run JSON Schema validation against [OUTPUT_SCHEMA]; reject on parse error or schema violation |
Uncertainty Flagging | Output marks ambiguous trust boundaries with an | Output asserts a definitive trust classification for a boundary where [DESIGN_DOC] provides no explicit auth or network information | Check for |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt but reduce the output schema to a simple list of trust boundaries and violations. Remove the requirement for a full trust-boundary map with lateral movement paths. Use a single-pass prompt without iterative refinement.
codeAnalyze the following system design for trust boundaries. List each service-to-service call, user request, and data access point. For each, state whether authentication and authorization are enforced. Flag any implicit trust. [DESIGN_DOCUMENT]
Watch for
- Missing schema checks leading to inconsistent output structure
- Overly broad instructions that produce vague boundary descriptions
- No distinction between authentication and authorization gaps
- False confidence on ambiguous design descriptions

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us