Join our Newsletter — 33% off our NHI Course
Home› Guides› AI Security Requirements Template: Controls to Specify for…
Template AI Governance & Risk

AI Security Requirements Template: Controls to Specify for Any LLM or ML Project

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

Most AI projects reach production with security requirements that were never written down, so nobody can say what "secure enough" meant or test against it. This template gives architects, AI product owners and procurement teams a set of numbered, testable security requirements to put into a design document, a statement of work or a tender for any large language model (LLM) or machine learning (ML) project, whether it is built in house or assembled from a hosted model and third-party tools. Each requirement has an ID, a rationale, a verification method and a mapping to the OWASP Top 10 for LLM Applications 2025 and the NIST AI Risk Management Framework (AI RMF). It is the specification side of the work: use the AI Procurement Checklist and the AI Vendor Security Questionnaire Template to assess a supplier, and the Agentic AI Security Policy Template for organisation-wide policy.

How to use this template

  • Replace text in square brackets, such as [Organisation], [System name], [risk tier] and [AI security lead], with your own values.
  • Copy sections 1 to 7 into the project's design document or the requirements annex of a contract. Keep the IDs stable so test results, exceptions and audit evidence can refer to them.
  • Mark each requirement Mandatory, Conditional or Not applicable using the tailoring table in Implementation guidance. Record a reason for every "Not applicable".
  • Requirements use "shall" for obligations and "should" for recommendations. Each has a verification method: Design review, Test, Configuration evidence or Contract evidence.
  • The mapping column cites OWASP LLM risk IDs (LLM01 to LLM10, 2025 edition) and NIST AI RMF subcategories. Mappings show which risk a requirement addresses; they are not a claim of compliance with either document.
  • Classic ML projects without a generative model can skip requirements marked "LLM only" and keep the rest.

1. Purpose and scope

1.1 This document sets the security requirements for [System name], owned by [Business owner] at [Organisation], classified as [risk tier] in the AI register. See the AI Register and AI Inventory Template.

1.2 Scope covers the model (built, fine-tuned or consumed through an API), training and evaluation data, retrieval stores, prompts and system instructions, orchestration code, tools and agents the model can call, user interfaces, logs and the hosting environment.

1.3 These requirements apply in addition to [Organisation]'s secure development standard and application security baseline. See Application Security Requirements from ASVS for the conventional web and API layer.

1.4 Roles: the [AI security lead] approves exceptions, the [System owner] holds the residual risk, and the [Data protection officer] signs off requirements in section 2.

IDRequirementRationaleVerificationMaps to
SC-01The system shall have a documented intended purpose, users, prohibited uses and a named owner before build starts.Requirements cannot be tailored without a defined useDesign reviewAI RMF GOVERN 2.1, MANAGE 1.1
SC-02A threat model shall be produced covering prompt injection, data leakage, poisoning, tool misuse and abuse of cost, and refreshed at each major change.AI attack paths differ from conventional applicationsDesign reviewLLM01 to LLM10; AI RMF MEASURE 2.7
SC-03Applicable legal and regulatory requirements shall be listed with an owner for each.Obligations shape logging, data and transparency choicesDesign reviewAI RMF GOVERN 1.1

2. Data protection requirements

2.1 Training, fine-tuning, evaluation and retrieval data shall be classified using [Organisation]'s data classification scheme before use.

IDRequirementRationaleVerificationMaps to
DP-01Personal and confidential data shall not be used for training or fine-tuning without an approved assessment and a recorded legal basis.Models can memorise and reproduce training dataDesign reviewLLM02; AI RMF MEASURE 2.10
DP-02Where a hosted model is used, the contract shall state that prompts and outputs are not used to train the provider's models and shall state retention periods.Data leaves the organisation's control at the API boundaryContract evidenceLLM02; AI RMF GOVERN 6.1
DP-03Retrieval stores shall enforce the source system's access rights at query time, so users only retrieve documents they could open directly.Retrieval-augmented generation can bypass document permissionsTestLLM08, LLM02
DP-04Data at rest (datasets, embeddings, logs) shall be encrypted with keys managed under [Organisation]'s key management standard.Embeddings and logs contain sensitive contentConfiguration evidenceLLM08
DP-05Data provenance shall be recorded for every training and retrieval dataset: source, owner, licence, date and integrity hash.Supports poisoning investigation and deletion requestsConfiguration evidenceLLM04; AI RMF GOVERN 1.6
DP-06A process shall exist to remove a data subject's data from retrieval stores and to assess retraining where it is in training data.Privacy rights extend to AI systemsTestLLM02; AI RMF MEASURE 2.10

Further guidance: the GenAI Data Security Risks and Mitigations Guide.

3. Model and supply chain requirements

IDRequirementRationaleVerificationMaps to
MS-01Every model, adapter, dataset, library and tool server shall be listed in an AI bill of materials (AI-BOM) with version and source.You cannot patch or withdraw what you have not listedConfiguration evidenceLLM03; AI RMF MANAGE 3.2
MS-02Third-party model files shall come only from [approved registries], with integrity verified by hash or signature before loading.Tampered models and unsafe serialisation formats can run code on loadTestLLM03, LLM04
MS-03Model formats that execute code on deserialisation should be avoided; where used, they shall be scanned and loaded in an isolated environment.Reduces code execution risk from model filesConfiguration evidenceLLM03
MS-04Model providers and tool suppliers shall be assessed under [Organisation]'s third-party risk process before production use.Third-party AI is a shared responsibilityContract evidenceAI RMF GOVERN 6.1, MANAGE 3.1
MS-05Model or provider version changes shall go through change control with regression and security evaluation (section 6) before release.A silent model update changes behaviour and safetyTestAI RMF MANAGE 3.2, MEASURE 2.3
MS-06Model weights and system prompts for in-house models shall be stored with access restricted to named roles and logged.Weights and prompts are high-value assetsConfiguration evidenceLLM07

See the AI Supply Chain and AI-BOM Guide.

4. Input, output and prompt handling

IDRequirementRationaleVerificationMaps to
IO-01All content from users, documents, web pages, emails and tool results shall be treated as untrusted input to the model (LLM only).Indirect prompt injection arrives through data, not only through usersDesign reviewLLM01
IO-02Security decisions (authorisation, payments, data release) shall be enforced by deterministic code outside the model, never by instructions in the prompt.Prompt instructions can be overriddenDesign reviewLLM01, LLM06
IO-03System prompts shall contain no secrets, credentials or access rules that must stay confidential (LLM only).System prompts should be assumed to leakTestLLM07
IO-04Model output shall be encoded or validated for its destination (HTML, SQL, shell, code, file paths) before use.Unvalidated output becomes injection into downstream systemsTestLLM05
IO-05Input and output filtering for [defined content categories and sensitive data patterns] shall be applied, with blocked events logged.Reduces leakage and harmful outputTestLLM02, LLM01
IO-06Rate limits, token limits, request size limits and spend caps shall be set per user, per tenant and per service identity.Prevents denial of wallet and resource exhaustionConfiguration evidenceLLM10
IO-07Where outputs inform decisions, the interface shall show sources or confidence and state that output may be wrong.Over-reliance on incorrect outputDesign reviewLLM09; AI RMF MEASURE 2.9

See the OWASP LLM Top 10 LLM01 Prompt Injection Guide and the AI Guardrails and AI Firewalls Guide.

5. Access, identity and agents

5.1 This section applies whenever the model can call tools, APIs, Model Context Protocol (MCP) servers or other agents, or act for a user.

IDRequirementRationaleVerificationMaps to
AG-01Each agent or AI service shall have its own non-human identity with a named human owner; shared or personal credentials shall not be used.Actions must be attributable and revocableConfiguration evidenceLLM06; AI RMF GOVERN 2.1
AG-02Tool permissions shall be listed in a permission matrix and limited to the minimum functions, scopes and data needed for the use case.Excessive functionality and permissions widen the blast radiusDesign reviewLLM06
AG-03Agents acting for a user shall operate with that user's delegated rights (for example OAuth on-behalf-of tokens), not a broad service credential.Prevents privilege escalation through the agentTestLLM06, LLM02
AG-04Credentials shall be short-lived, held in a secrets manager and never placed in prompts, context windows or model-visible files.Model context can be extractedConfiguration evidenceLLM02, LLM07
AG-05Actions classed as [high impact: payments, deletion, external send, privilege change] shall require human approval with the full action shown to the approver.Limits damage from injected or mistaken actionsTestLLM06; AI RMF MANAGE 2.4
AG-06Tool and MCP servers shall be allow-listed, version-pinned and authenticated; tool descriptions from third parties shall be reviewed before enablement.Tool metadata is an injection and supply chain pathConfiguration evidenceLLM03, LLM01
AG-07Agent sessions shall have limits on steps, run time and spend, and a kill switch that revokes the agent's credentials.Stops runaway loops and contains compromiseTestLLM10; AI RMF MANAGE 2.4
AG-08Agent identities and permissions shall be included in [quarterly] access reviews.Agent permissions drift over timeConfiguration evidenceAI RMF GOVERN 1.6

Build the matrix with the AI Agent Permission Matrix Template. See also OWASP LLM Top 10 LLM06 Excessive Agency Guide and the Human-in-the-Loop for AI Agents Guide.

6. Logging, monitoring and evaluation

Logging and monitoring

IDRequirementRationaleVerificationMaps to
LM-01The system shall log prompts, retrieved sources, model and version, tool calls with parameters, approvals, and outputs, linked by a trace ID and the acting identity.Needed to investigate injection and misuseTestAI RMF MANAGE 4.1
LM-02Logs containing personal data shall be access-restricted and kept for [retention period] in line with the privacy notice.Logs are a new store of sensitive dataConfiguration evidenceLLM02; AI RMF MEASURE 2.10
LM-03Alerts shall exist for filter blocks above [threshold], unusual tool call patterns, spend spikes and access to sensitive retrieval collections.Detects attacks in progressTestLLM01, LLM06, LLM10
LM-04AI logs shall be forwarded to [SIEM] and covered by SOC use cases.AI events need the same triage as other security eventsConfiguration evidenceAI RMF MANAGE 4.1

See the LLM Observability Guide.

Evaluation and red team acceptance criteria

IDAcceptance criterionVerificationMaps to
EV-01Before release, the system shall pass a security test suite covering direct and indirect prompt injection, system prompt extraction, sensitive data disclosure, output injection and excessive agency, with no open finding rated [high] or above.TestLLM01, LLM02, LLM05, LLM06, LLM07; AI RMF MEASURE 2.7
EV-02Attack success rate on the agreed injection test set shall be at or below [target %], measured on the release candidate in a production-like configuration.TestLLM01; AI RMF MEASURE 2.3
EV-03High and critical risk systems shall have an independent red team exercise before first release and after major change, with a written report and retest.TestAI RMF MEASURE 2.7
EV-04Accuracy, safety and fairness evaluations relevant to the use case shall meet [defined thresholds], with results documented.TestLLM09; AI RMF MEASURE 2.5, 2.6, 2.11
EV-05The regression suite shall be re-run on every model, prompt, retrieval or tool change, and results compared with the last accepted baseline.TestAI RMF MEASURE 2.3, MANAGE 3.2

Plan the exercise with the AI Red Team Test Plan Template.

7. Incident and retirement

IDRequirementRationaleVerificationMaps to
IR-01AI-specific incident types (prompt injection with impact, data leakage through output, poisoning, unsafe agent action, provider breach) shall be added to the incident response plan with playbooks.Responders need to recognise AI incidentsDesign reviewAI RMF MANAGE 2.3, MANAGE 4.3
IR-02The system shall support rapid disablement: feature flag off, agent credentials revoked, fallback to a non-AI process.Containment must not depend on the modelTestAI RMF MANAGE 2.4
IR-03Providers shall notify [Organisation] of security incidents affecting its data within [hours] and support investigation.Third-party failure is a common source of AI incidentsContract evidenceAI RMF GOVERN 6.2
IR-04Incidents and material errors shall be communicated to affected users and regulators where required.Transparency and legal dutiesDesign reviewAI RMF MANAGE 4.3
IR-05On retirement, credentials, API keys and agent identities shall be revoked; datasets, embeddings, fine-tuned weights and logs shall be deleted or archived per retention rules; the AI register shall be updated.Orphaned AI assets keep access and dataConfiguration evidenceAI RMF GOVERN 1.7

See the AI Incident Management and Escalation guide.

Implementation guidance

Tailoring by risk

Risk tierTypical exampleMandatory sectionsEvaluation
LowInternal drafting assistant, no tools, no confidential data1, 2 (DP-02), 4, 6 (LM-01)EV-01 by the project team
MediumRetrieval assistant over internal documents1 to 4, 6, 7EV-01, EV-02, EV-05
HighCustomer-facing assistant, or agent with write toolsAll sectionsEV-01 to EV-05, independent red team
CriticalAutonomous agent touching payments, health, safety or privileged systemsAll, with AG-05 approval on every high-impact actionAll, plus retest after every major change

Rollout steps

  1. Agree the risk tier and tailor the requirement list at the design gate, with the [AI security lead] and [System owner] signing it.
  2. Put the tailored list into the backlog or contract annex as acceptance criteria, keeping the IDs.
  3. Run design review items before build; set up logging and limits (LM, IO-06, AG-07) before the first internal pilot.
  4. Pilot with a small user group and limited tools, with filters in monitor mode first, then enforcing once false positives are understood.
  5. Run the evaluation suite and red team; record results against each EV ID.
  6. Release only with all Mandatory requirements met or an approved, time-limited exception. Keep rollback ready: the IR-02 disablement path and the previous model version.
  7. Re-run the suite on every change and review the tailoring yearly or when the use case grows.

Measuring whether it works

  • Coverage: percentage of AI systems in the register with a signed requirements set.
  • Exceptions: number of open exceptions and their average age.
  • Attack success rate: trend of EV-02 across releases.
  • Agent hygiene: percentage of agent identities with an owner and a review in the last cycle.
  • Response: time from AI security alert to disablement in exercises.

Common mistakes

  • Relying on system prompt instructions as a security control instead of IO-02.
  • Giving agents a broad service account because delegated access was hard to build.
  • Testing the model once, then letting the provider update it without re-running EV-05.
  • Logging prompts and outputs without treating the logs as sensitive data.
  • Writing requirements without verification methods, so acceptance becomes opinion.

Sources behind this template

Requirements draw on the OWASP Top 10 for LLM Applications 2025, the NIST AI RMF Playbook, NIST AI 600-1 Generative AI Profile (July 2024) and the NCSC Guidelines for secure AI system development (November 2023), whose four stages of secure design, development, deployment, and operation and maintenance this template follows. For the frameworks themselves, see the NIST AI RMF Guide and the NIST AI 600-1 Generative AI Profile Guide.

Related NHI Mgmt Group resources: AI Procurement Checklist · Agentic AI Security Policy Template · AI Agent Permission Matrix Template · AI Red Team Test Plan Template

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.