This prompt is designed for product security teams and AI security architects who need to evaluate whether a new feature introduces prompt injection surfaces before it ships. Use it during feature design review, security gate checks, or pre-launch threat modeling. The prompt assumes you have a feature specification, an existing system architecture diagram, and a current inventory of deployed defenses. It produces a risk assessment that identifies new injection surfaces, maps them to existing controls, flags coverage gaps, and recommends new controls.
Prompt
New Feature Injection Risk Assessment Prompt

When to Use This Prompt
Define the job-to-be-done, the ideal user, the required context, and the boundaries where this prompt should not be applied.
This is not a replacement for manual threat modeling or red-team testing. It is a structured first pass that helps security reviewers avoid blind spots and produce consistent, comparable assessments across features. The prompt works best when the feature specification is concrete—vague feature descriptions produce vague risk assessments. You should have already completed an AI System Injection Surface Enumeration for the base system before using this prompt, so the existing surface inventory and defense catalog are available as input context.
Do not use this prompt for runtime incident response, real-time injection detection, or operational monitoring. It is a design-time assessment tool, not a production guard. If you need to evaluate injection risk in a live system under active attack, use the Continuous Monitoring Rule Generation for Injection Surfaces prompt instead. If you need to assess risk across an entire system rather than a single new feature, start with the AI System Injection Surface Enumeration Prompt Template. This prompt is scoped to feature-level delta analysis—what changes, what new risks appear, and what defenses need to be added or modified.
The output is a structured risk assessment, not a pass/fail gate. Human review is required before any finding is treated as a release blocker. The prompt can miss novel attack vectors not represented in its training data, and it cannot reason about implementation details that aren't included in the feature specification. Always pair this assessment with manual review by a security engineer who understands the full system context.
Use Case Fit
Where the New Feature Injection Risk Assessment Prompt delivers value and where it creates false confidence. Use these cards to decide if this prompt fits your current security review workflow.
Good Fit: Pre-Launch Security Review
Use when: A product team is preparing a new AI feature for launch and needs a structured injection risk assessment before the feature reaches production. Guardrail: Run this prompt against finalized feature specs and architecture diagrams, not early-stage sketches. The output is only as complete as the input surface description.
Bad Fit: Runtime Attack Detection
Avoid when: You need real-time detection of active injection attacks in production traffic. This prompt performs static risk assessment before launch, not dynamic monitoring. Guardrail: Pair this assessment with runtime monitoring rules from the Continuous Monitoring Rule Generation prompt for defense-in-depth.
Required Input: Complete Surface Inventory
Risk: The assessment will miss injection surfaces that are not described in the input. If the feature's tool exposures, retrieval pipelines, or output rendering paths are undocumented, the output will contain blind spots. Guardrail: Run the AI System Injection Surface Enumeration Prompt first to build a comprehensive surface inventory before feeding it into this risk assessment.
Operational Risk: Over-Reliance on Automation
Risk: Teams may treat the prompt output as a complete security sign-off without human review. The model can miss novel attack patterns or misjudge severity for complex multi-step injection chains. Guardrail: Require a security engineer to review and sign off on every finding. Use the output as a structured starting point, not a final audit report.
Good Fit: Comparative Risk Analysis
Use when: You need to compare injection risk across multiple feature proposals to prioritize security review effort. The structured output format enables side-by-side comparison. Guardrail: Normalize the input detail level across features. A feature described in two sentences will appear lower risk than one described in two pages, regardless of actual exposure.
Bad Fit: Compliance Certification
Avoid when: You need a formal security certification or regulatory compliance artifact. This prompt produces a technical risk assessment, not an auditable compliance document. Guardrail: Use the assessment output as evidence input for a human-authored compliance review. Do not submit raw model output to auditors or regulators.
Copy-Ready Prompt Template
A reusable prompt template for assessing injection risk before a new feature launches, with square-bracket placeholders for feature-specific detail.
This prompt template is designed to be copied directly into your AI harness, test runner, or manual review workflow. It forces a structured risk assessment by requiring the model to enumerate new injection surfaces introduced by a feature, evaluate the applicability of existing defenses, and recommend new controls where coverage is missing. The output is a machine-readable risk assessment that can be validated against a schema before being reviewed by a security engineer.
textYou are an AI security architect conducting a pre-launch injection risk assessment for a new feature. Your task is to identify every new prompt injection surface this feature introduces, evaluate whether existing defenses apply, and recommend any required new controls. [FEATURE_NAME]: The name of the feature being assessed. [FEATURE_DESCRIPTION]: A detailed description of what the feature does, its user flows, and its technical components. [FEATURE_ARCHITECTURE]: A summary of the feature's architecture, including data flow, model interactions, tool use, retrieval steps, and output rendering. [EXISTING_DEFENSES]: A list of currently deployed injection defenses, including input sanitization, instruction hardening, tool authorization policies, output filtering, and monitoring rules. [SYSTEM_PROMPT_EXCERPT]: The relevant portion of the system prompt that governs this feature's behavior. [TOOL_DEFINITIONS]: If the feature uses tools, provide their schemas, argument definitions, and authorization rules. [RETRIEVAL_CONFIG]: If the feature uses RAG, describe the retrieval pipeline, data sources, and how retrieved content is rendered. [OUTPUT_SCHEMA]: Return a JSON object with the following structure: { "feature_name": "string", "assessment_date": "string (ISO 8601)", "risk_summary": { "overall_severity": "CRITICAL | HIGH | MEDIUM | LOW | INFO", "new_surface_count": "integer", "existing_defense_coverage_pct": "integer (0-100)", "new_controls_required": "integer" }, "new_injection_surfaces": [ { "surface_id": "string (unique identifier)", "surface_name": "string", "surface_type": "DIRECT_INPUT | INDIRECT_INJECTION | TOOL_ARGUMENT | RETRIEVED_CONTENT | OUTPUT_RENDERING | MULTI_TURN_STATE | OTHER", "description": "string (how an attacker could inject malicious instructions through this surface)", "attack_vector_example": "string (a concrete example of an injection attempt)", "severity": "CRITICAL | HIGH | MEDIUM | LOW", "exploitability": "HIGH | MEDIUM | LOW", "existing_defenses_applicable": ["string (list of existing defense names that apply)"], "defense_gap": "string (why existing defenses are insufficient, or null if fully covered)", "recommended_new_controls": ["string (specific new controls to implement)"] } ], "existing_defense_evaluation": [ { "defense_name": "string", "applies_to_this_feature": "boolean", "coverage_assessment": "FULL | PARTIAL | NONE", "gap_description": "string (if coverage is not FULL, explain what's missing)" } ], "required_new_controls": [ { "control_name": "string", "control_type": "INPUT_SANITIZATION | INSTRUCTION_HARDENING | TOOL_AUTHORIZATION | OUTPUT_FILTERING | MONITORING | HUMAN_APPROVAL | OTHER", "target_surface_ids": ["string (list of surface_ids this control addresses)"], "implementation_guidance": "string (how to implement this control)", "priority": "IMMEDIATE | BEFORE_LAUNCH | POST_LAUNCH | NICE_TO_HAVE" } ], "launch_recommendation": "CLEARED | CONDITIONAL (list conditions) | BLOCKED (list blocking issues)", "reviewer_notes": "string (any additional context, assumptions, or limitations of this assessment)" } [CONSTRAINTS]: - Do not fabricate surfaces. Only identify surfaces that actually exist in the feature architecture. - For each surface, provide a concrete, realistic attack vector example. - If a surface is fully covered by existing defenses, set defense_gap to null and recommended_new_controls to an empty array. - If overall_severity is CRITICAL or HIGH, launch_recommendation must not be CLEARED. - Do not include generic security advice. Every recommendation must be specific to the feature described. - If the feature architecture is unclear or incomplete, note this in reviewer_notes and do not guess.
Before running this prompt, replace every square-bracket placeholder with feature-specific detail. The quality of the assessment depends entirely on the completeness of [FEATURE_ARCHITECTURE], [EXISTING_DEFENSES], and [TOOL_DEFINITIONS]. If any of these are missing or vague, the model will either hallucinate surfaces or produce a low-confidence assessment. After receiving the output, validate it against the [OUTPUT_SCHEMA] using a JSON schema validator, then route it to a human security reviewer. Never auto-approve a launch based solely on this assessment—this prompt is a structured thinking tool, not a replacement for security engineering judgment.
Prompt Variables
Required inputs for the New Feature Injection Risk Assessment Prompt. Each placeholder must be populated before the prompt can produce a reliable risk assessment.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[FEATURE_NAME] | Identifies the feature under review for injection risk | Customer Document Upload Portal | Non-empty string; must match the feature name in the product spec or ticket |
[FEATURE_DESCRIPTION] | Describes what the feature does, its user flow, and its data flow | Allows customers to upload PDFs which are parsed and summarized by the AI assistant | Minimum 50 characters; must include at least one data flow or integration point |
[SYSTEM_ARCHITECTURE_CONTEXT] | Describes the AI components, tools, retrieval pipelines, and trust boundaries the feature interacts with | RAG pipeline with vector store, LLM summarizer, and customer-facing chat UI | Must enumerate at least one AI component; null allowed if feature has no AI surface |
[EXISTING_DEFENSES] | Lists currently deployed injection defenses across input sanitization, instruction hardening, tool authorization, and output filtering | Input: regex filter for base64; Tool: confirmation required for write operations; Output: canary token monitoring | Must be a structured list or null if no defenses exist; each defense must include layer and mechanism |
[THREAT_MODEL_REFERENCE] | Links to or describes the existing threat model for the AI system | Internal threat model v2.1 covering 12 injection surfaces across 4 trust boundaries | Must reference a real document or state 'no existing threat model'; null triggers a warning in eval |
[REGULATORY_CONTEXT] | Describes applicable compliance frameworks or regulatory requirements | SOC 2 Type II, GDPR for EU customer data | Null allowed; if populated, must reference real frameworks applicable to the system |
[REVIEWER_ROLE] | Specifies who is conducting the assessment for accountability and escalation | Product Security Lead | Non-empty string; must be a real role title, not a generic placeholder |
Implementation Harness Notes
How to wire the New Feature Injection Risk Assessment Prompt into a pre-release security review workflow with validation, retries, and human approval gates.
This prompt is designed to operate as a gated step in a feature release pipeline, not as a standalone chatbot query. Before a new feature reaches production, the engineering lead or product security team triggers this assessment. The prompt expects a structured feature specification as input and produces a risk assessment that must pass automated validation before a human reviewer signs off. Treat the output as a security artifact that lives alongside threat models and design reviews in your documentation repository.
Integration pattern: Wrap the prompt in an API call or CI/CD job that supplies [FEATURE_SPEC] from your feature flag system, PRD, or architecture decision record. Set [EXISTING_DEFENSES] from your current defense-in-depth registry (input sanitizers, instruction hierarchy rules, tool authorization policies, output filters, and monitoring rules). The model choice matters here—use a model with strong reasoning capabilities (GPT-4o, Claude 3.5 Sonnet, or equivalent) because surface enumeration requires systematic coverage, not just fluency. Validation layer: After receiving the output, run a structured check that verifies: (1) every section in the output schema is populated, (2) each identified surface includes a severity rating and a defense applicability assessment, (3) the coverage_gaps array is non-empty when [EXISTING_DEFENSES] is incomplete, and (4) no surface category from a known checklist (user input, file upload, tool arguments, retrieved documents, rendered outputs, agent handoffs) is missing without explicit justification. If validation fails, retry once with the validation errors appended as [CORRECTION_FEEDBACK]. If the second attempt also fails, escalate to a human reviewer with the partial output and failure reasons attached.
Human review gate: Even when validation passes, the output must route to a security reviewer for approval before the feature gates open. Store the assessment in a versioned artifact store (Git, a security review database, or a GRC tool) with the feature version, model version, prompt version, and reviewer identity recorded. Logging and observability: Capture the full prompt, raw model response, validation results, retry count, and reviewer decision. This audit trail is essential for post-incident review and for demonstrating security review coverage to auditors. What to avoid: Do not treat this prompt as a one-time checklist that ages out. Rerun it when the feature's capabilities expand, when new tools are added, or when the model is upgraded—each of these changes can introduce new injection surfaces that the original assessment missed.
Expected Output Contract
Defines the required fields, types, and validation rules for the risk assessment output. Use this contract to parse, validate, and store the model response before it enters downstream workflows.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
assessment_id | string (UUID v4) | Must parse as valid UUID v4. Reject on format mismatch. | |
feature_name | string | Non-empty, max 200 characters. Strip leading/trailing whitespace before validation. | |
assessment_date | string (ISO 8601 date) | Must parse as valid YYYY-MM-DD. Reject if date is in the future. | |
injection_surfaces | array of objects | Array must contain at least 1 item. Each object must include surface_name (string, required), description (string, required), and input_channel (string, required). Reject if array is empty or any required sub-field is missing. | |
existing_defense_applicability | object | Must contain applicable (boolean) and details (string). If applicable is true, details must be non-empty. Reject on schema mismatch. | |
required_new_controls | array of strings | Array must contain at least 1 item if existing_defense_applicability.applicable is false. Each string must be non-empty. Reject if empty when new controls are expected. | |
risk_severity | string (enum) | Must be one of: critical, high, medium, low, informational. Case-sensitive. Reject on unknown value. | |
confidence_score | number (0.0-1.0) | Must be a float between 0.0 and 1.0 inclusive. Reject if out of range or non-numeric. |
Common Failure Modes
What breaks first when running injection risk assessments on new features and how to guard against it.
Surface Blind Spots
What to watch: The assessment misses injection surfaces introduced by indirect data flows—retrieved documents, tool outputs, or multi-agent handoffs. The prompt focuses on direct user input and overlooks trusted data channels. Guardrail: Include a mandatory checklist of all data sources crossing trust boundaries. Require the model to enumerate every input channel before scoring risk.
Overconfidence in Existing Defenses
What to watch: The assessment assumes current input sanitization, instruction hardening, or output filters automatically cover the new feature. It fails to test whether the feature creates bypass paths around existing controls. Guardrail: Add a constraint requiring explicit mapping of each defense to each new surface. Flag any surface without a tested, specific control as high risk.
Vague Severity Inflation
What to watch: The model labels every finding as 'high' or 'critical' without calibrated criteria, making the report useless for prioritization. This happens when the prompt lacks a clear severity rubric. Guardrail: Embed a concrete severity matrix in the prompt with distinct criteria for impact and exploitability. Require the model to cite which rubric row applies to each finding.
Missing Multi-Turn Attack Paths
What to watch: The assessment evaluates surfaces in isolation, missing attack chains that combine a low-risk injection with a later turn's tool call or context manipulation. Single-turn analysis misses stateful exploits. Guardrail: Instruct the model to simulate multi-turn scenarios where an attacker plants content in one turn and exploits it in a subsequent turn. Require at least one chained attack path per surface.
Tool Argument Smuggling Oversight
What to watch: The assessment checks whether a tool can be called but not whether malicious arguments can be smuggled through user input, retrieved content, or prior tool outputs. Argument injection is the most common high-impact gap. Guardrail: Add a specific check for each tool: 'Can an attacker control any argument to this tool through any input channel?' Require the model to list controllable arguments explicitly.
Delimiter and Encoding Evasion Gaps
What to watch: The assessment assumes standard input formats and misses obfuscation vectors—base64, Unicode tricks, zero-width characters, or malformed delimiters that bypass pattern-based defenses. Guardrail: Include a fuzzing-style instruction asking the model to propose obfuscated variants of each injection payload. Require the assessment to note whether the feature's parsers would catch each variant.
Evaluation Rubric
Criteria for testing the quality and reliability of the risk assessment output before relying on it for a launch decision. Each row defines a pass standard, a failure signal, and a concrete test method.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Surface Completeness | Output identifies all injection surfaces listed in the [FEATURE_SPEC] and [ARCHITECTURE_DIAGRAM] inputs | Missing a documented input channel, tool, or rendering path | Diff the list of surfaces in the output against a manually curated checklist from the spec |
Defense Applicability Mapping | Every existing defense from [EXISTING_DEFENSES] is mapped to at least one surface with a clear applicability statement | An existing defense is omitted or marked 'not applicable' without justification | Parse the output JSON and confirm each defense ID appears in the 'existing_defense_applicability' array |
New Control Necessity | At least one new control is proposed for every surface rated 'High' or 'Critical' risk | A high-risk surface has zero new controls and relies entirely on existing defenses | Filter output for severity >= 'High', then assert new_controls array is non-empty for each |
Risk Severity Justification | Every severity rating includes a concrete impact and exploitability rationale tied to the feature | Severity is assigned without rationale or uses generic placeholder text | Check that each 'severity_justification' field contains a feature-specific noun and verb phrase |
Output Schema Validity | Output is valid JSON matching the [OUTPUT_SCHEMA] exactly | JSON parse error, missing required field, or extra field not in schema | Validate output against the JSON Schema using a standard validator library |
No Hallucinated Surfaces | All listed surfaces correspond to documented components in the input materials | Output mentions an API endpoint, tool, or input channel not present in [FEATURE_SPEC] or [ARCHITECTURE_DIAGRAM] | For each surface, require a citation to a specific section of the input document; flag uncited surfaces |
Actionable Recommendation Quality | Each recommended control includes a specific implementation mechanism | Recommendations are vague, such as 'add input validation' without specifying the method | Check that each recommendation string contains a technical mechanism keyword, such as 'regex', 'allowlist', 'sandbox', or 'confirmation dialog' |
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
Add strict [OUTPUT_SCHEMA] validation with required fields: surface_id, surface_name, injection_vector, existing_defenses, defense_gap, severity_score, remediation_priority. Include retry logic for malformed JSON. Add eval cases that check for surface completeness against a known architecture diagram. Wire the output into a ticketing system or risk register.
Watch for
- Silent format drift when the model omits optional fields
- Missing defense applicability analysis for existing controls
- Over-prioritization of low-impact surfaces that are easy to find

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