WAF-AGN-110 β Agent outputs and actions MUST be validated, sandboxed, and restricted to allowlists
Description
Agent-generated outputs MUST be validated against schemas, business rules, or human-defined constraints before downstream use. Agent tool invocations MUST be sandboxed and restricted to an explicit allowlist of functions and parameters. High-impact actions MUST require confirmation or human-in-the-loop approval. Validation failures MUST be logged, alerted, and used to refine guardrails.
Rationale
| Risk | Description |
|---|---|
Risk |
Unvalidated agent outputs can trigger incorrect business decisions or data corruption. |
Risk |
Unsandboxed tool access allows prompt injection and unauthorized actions by compromised agents. |
Requirements
-
Agent-generated outputs MUST be validated against schemas, business rules, or human-defined constraints before downstream use.
-
Agent tool invocations MUST be sandboxed and restricted to an explicit allowlist of functions and parameters.
-
High-impact actions MUST require confirmation or human-in-the-loop approval.
-
Validation failures MUST be logged, alerted, and used to refine guardrails.
Implementation Guidance
-
Document the requirement in a version-controlled policy, ADR, or standard.
-
Assign ownership and establish a review cadence (e.g., quarterly).
-
Implement the required configuration as code in Terraform or equivalent IaC.
Maturity Levels
| Level | Name | Criteria |
|---|---|---|
L1 |
Ad hoc β control not consistently applied |
* Die Anforderung ist nicht einheitlich umgesetzt; Nachweis existiert nur punktuell oder fehlt. |
L2 |
Standardised β policy defined and communicated |
* Eine dokumentierte Policy oder ein Standard beschreibt die Anforderung. |
L3 |
Integrated β automated validation in CI/CD |
* Terraform-Checks oder IaC-Gates prΓΌfen die Anforderung automatisch in CI/CD. |
L4 |
Auditable β metrics and exceptions tracked |
* Abdeckung, Ausnahmen und QualitΓ€tsmetriken werden quartalsweise berichtet. |
L5 |
Optimised β continuous improvement based on data |
* Die EffektivitΓ€t wird kontinuierlich gemessen und automatisch optimiert. |
Checks
waf-agn-110.tf.aws.bedrock-guardrail
Engine: terraform | Provider: aws | Automated: Yes
AWS Bedrock agent must use guardrails with blocked outputs
AWS Bedrock agent must use guardrails with blocked outputs
Scope: resource β aws_bedrock_guardrail
Assertions:
* name attribute_exists β Bedrock guardrail must be configured.
Remediation: AWS Bedrock agent must use guardrails with blocked outputs
# Example compliant with waf-agn-110.tf.aws.bedrock-guardrail
# Example non-compliant with waf-agn-110.tf.aws.bedrock-guardrail
waf-agn-110.config.agent-validation-policy
Engine: config | Provider: any | Automated: No
Agent output validation and tool allowlist policy must exist
Agent output validation and tool allowlist policy must exist
Scope: file β docs/agentic/agent-validation-policy.md
Assertions:
* exists attribute_exists β Agent validation and tool allowlist policy must exist.
Remediation: Agent output validation and tool allowlist policy must exist
# Example compliant with waf-agn-110.config.agent-validation-policy
# Example non-compliant with waf-agn-110.config.agent-validation-policy
Evidence
-
Terraform configuration implementing the requirement.
-
Policy, ADR, or standard documenting the requirement.
-
Optional cloud console or API output confirming runtime state.
Related Controls
-
WAF-REL-110 == Regulatory Mapping
-
ISO 27001:2022: A.8.3 β Information access restriction, A.8.27 β Secure system architecture
-
GDPR: Art. 32 β Security of processing
-
NIST AI Risk Management Framework: Measure 1.1 β AI system is validated
-
EU AI Act: Art. 9 β Risk management system
-
SOC 2 Type II: CC6.1 β Logical access controls