#12639·prowler

[New Check]: WAF web ACLs enforce request body size limits

Author: HugoPBritoCreated Aug 28, 2026Updated Sep 29, 2026
Labelsfeature-requestnew-checkprovider/aws

Existing check search

  • I have searched existing issues, Prowler Hub, and the public roadmap, and this check does not already exist.

Provider

AWS

New provider name

No response

Service or product area

wafv2

Suggested check name

wafv2_webacl_request_body_size_limit_configured

Context and goal

  • Source control: FS-68 — API Gateway Request Body Size Limits.
  • Semantic requirement: Verifies API Gateway REST/HTTP APIs fronting GenAI endpoints have WAF SizeConstraintStatement rules enforcing a maximum request body size, optionally paired with an API Gateway request-body JSON schema that bounds individual field lengths — to prevent token-exhaustion attacks via oversized prompts.
  • Valid cloud-posture assertion: API Gateway request validators do not enforce total body size; Prowler does not inspect nested WAFv2 SizeConstraintStatement rules. The proposed check evaluates a durable AWS control-plane property with deterministic resource-level or regional posture semantics; it does not treat optional product adoption or manual governance evidence as failure.
  • Resource scope: Each WAFv2 web ACL protecting an API/GenAI endpoint.
  • Initiative tracker: https://github.com/prowler-cloud/prowler/issues/12597

Expected behavior

  • Resource or scope to evaluate: Each WAFv2 web ACL protecting an API/GenAI endpoint.
  • PASS when: an enabled SizeConstraintStatement applies an upper-bound comparison to request body content.
  • FAIL when: no applicable body-size upper bound exists.
  • MANUAL when: Required detail or policy data is unavailable or indeterminate after collection; never emit a false PASS for unreadable in-scope data.
  • No resources: Return no findings. For regional/account-level posture checks, return no finding when the audited service has no relevant resources in that region.
  • Error behavior: Preserve Prowler's normal service-error reporting and do not convert AccessDenied, unsupported-region responses, or partial inventory into PASS.

References

Suggested severity

High

Additional implementation notes

  • Collector change: Extend WAFv2 recursive statement parsing to retain SizeConstraintStatement fields and scope-down logic.
  • Dependencies: Shared recursive WAFv2 statement collector extension
  • Emit one finding per resource unless the scope above explicitly defines a regional/account-level posture result.
  • Add metadata and implementation files following the AWS check conventions, plus collector/model updates where required.
  • Acceptance tests must cover PASS, FAIL, unreadable/indeterminate MANUAL behavior, empty inventory, API error handling, and all stated edge conditions.
  • Tests must prove the exact AWS response fields above and ensure unrelated resources/configurations are not reported.
  • Keep this CheckID atomic; do not combine it with adjacent assertions that have different resources, APIs, or remediation.

Validation evidence required

Before this implementation can be considered ready for merge:

  • The pull request must complete a CodeRabbit review, and all actionable findings must be addressed or explicitly resolved with technical justification.
  • The contributor must provide execution evidence for one PASS case and one FAIL case using representative AWS resources. The evidence must include the executed Prowler command and the resulting finding output, demonstrating the expected status and status_extended message.
  • All execution evidence must be censored before publication. Account IDs, resource names, ARNs, credentials, tokens, endpoints, and any other sensitive or identifying information must be visibly masked or removed from screenshots, logs, and command output.
  • Unit tests are required, but they do not replace this runtime evidence.