Back to Checks
aws

Amazon Bedrock guardrail has prompt attack filter strength set to HIGH

bedrock_guardrail_prompt_attack_filter_enabled
Service: bedrockSeverity: high
OfficialBuilt-inVerified
Categories:gen-ai
Resource Type:Other

Bedrock guardrails have the Prompt attack filter set to HIGH strength to detect and block injection and jailbreak patterns. Guardrails missing this setting or using lower strengths are identified.

Risk

Without HIGH prompt-attack filtering, models are exposed to prompt injection/jailbreaks:

  • Confidentiality: coerced disclosure of sensitive data
  • Integrity: policy evasion and manipulated outputs
  • Operations: unintended tool execution and workflow tampering

Run this check with Prowler

Run in Prowler Cloud
Run
prowler aws --checks bedrock_guardrail_prompt_attack_filter_enabled

Recommendation

Set the Prompt attack filter to HIGH and apply defense in depth:

  • Tag user/external inputs as untrusted for evaluation
  • Combine with denied topics and sensitive-info filters
  • Enforce least privilege and approvals for risky actions
  • Monitor guardrail hits and tune to reduce false negatives

Remediation

CLI

aws bedrock update-guardrail --guardrail-identifier <guardrail_id> --content-policy-config 'filtersConfig=[{type=PROMPT_ATTACK,inputStrength=HIGH}]'

Terraform

resource "aws_bedrock_guardrail" "<example_resource_name>" {
  name                      = "<example_resource_name>"
  blocked_input_messaging   = "Blocked"
  blocked_outputs_messaging = "Blocked"

  content_policy_config {
    filters_config {
      type           = "PROMPT_ATTACK"   # Critical: enables the Prompt Attack filter
      input_strength = "HIGH"            # Critical: sets filter strength to HIGH to pass the check
    }
  }
}

NativeIaC

Resources:
  <example_resource_name>:
    Type: AWS::Bedrock::Guardrail
    Properties:
      Name: <example_resource_name>
      BlockedInputMessaging: "Blocked"
      BlockedOutputsMessaging: "Blocked"
      ContentPolicyConfig:
        FiltersConfig:
          - Type: PROMPT_ATTACK         # Critical: enables the Prompt Attack filter
            InputStrength: HIGH         # Critical: sets filter strength to HIGH to pass the check

Other

1Open the AWS Console and go to Amazon Bedrock
2Select Guardrails, then choose your guardrail
3In Content filters, find Prompt attacks
4Set Strength to High
5Click Save

Check Code

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.bedrock.bedrock_client import bedrock_client


class bedrock_guardrail_prompt_attack_filter_enabled(Check):
    def execute(self):
        findings = []
        for guardrail in bedrock_client.guardrails.values():
            report = Check_Report_AWS(metadata=self.metadata(), resource=guardrail)
            report.status = "PASS"
            report.status_extended = f"Bedrock Guardrail {guardrail.name} is configured to detect and block prompt attacks with a HIGH strength."
            if not guardrail.prompt_attack_filter_strength:
                report.status = "FAIL"
                report.status_extended = f"Bedrock Guardrail {guardrail.name} is not configured to block prompt attacks."
            elif guardrail.prompt_attack_filter_strength != "HIGH":
                report.status = "FAIL"
                report.status_extended = f"Bedrock Guardrail {guardrail.name} is configured to block prompt attacks but with a filter strength of {guardrail.prompt_attack_filter_strength}, not HIGH."
            findings.append(report)

        return findings