Live
Cloudflare WAF adds blocking rules for Ruby regex flaws and WordPress exploitsAI Prompt Logging via WAF Payload Logging Replaces Legacy Log Mode RulesetTerraform Stacks gain native policy support, multi‑deployment orchestration, and agent‑ready CLIReducing GPU Cold‑Start Latency on EKS with Auto Mode and KarpenterSpain Cloud Accreditation Unlocks Classified Workloads on AWS Europe (Spain)Virtual Machines Remain Core Infrastructure as AI Workloads Increase Isolation NeedsNew Workspace Agent Interfaces and Cloud Agent Gateway tighten AI agent securityLambda Timeout Doubles and Gains GPU Support – What Engineers Need to AdjustCloudflare WAF adds blocking rules for Ruby regex flaws and WordPress exploitsAI Prompt Logging via WAF Payload Logging Replaces Legacy Log Mode RulesetTerraform Stacks gain native policy support, multi‑deployment orchestration, and agent‑ready CLIReducing GPU Cold‑Start Latency on EKS with Auto Mode and KarpenterSpain Cloud Accreditation Unlocks Classified Workloads on AWS Europe (Spain)Virtual Machines Remain Core Infrastructure as AI Workloads Increase Isolation NeedsNew Workspace Agent Interfaces and Cloud Agent Gateway tighten AI agent securityLambda Timeout Doubles and Gains GPU Support – What Engineers Need to Adjust
Cloudflare

AI Prompt Logging via WAF Payload Logging Replaces Legacy Log Mode Ruleset

AI SummaryPowered by AI

Cloudflare now requires enabling payload logging and a custom WAF rule that references the cf.llm.prompt field to capture AI prompts. This change gives engineers direct visibility into prompt data while simplifying the previous log mode ruleset workflow.

Cloudflare’s AI Security for Apps has shifted from the older AI Security Log Mode Ruleset to a new model that uses payload logging together with a custom WAF rule referencing the cf.llm.prompt field. Enabling this combination records the extracted prompt whenever the rule matches, and falls back to storing the full request body if no prompt is found. The change streamlines logging configuration and aligns prompt capture with the broader payload logging feature set.

How to Enable AI Prompt Logging

Practitioners must:

  • Activate payload logging in the WAF settings.
  • Create a custom WAF rule that references a field prefixed with cf.llm.prompt.
  • Deploy the rule to the relevant zone or application.

When the rule fires, the WAF stores the extracted prompt; otherwise, the entire request body is logged.

Architectural and Operational Implications

Integrating prompt logging introduces a new data path: request payload → WAF custom rule → payload logger → log storage. Teams need to consider log volume, storage costs, and retention policies because full request bodies may be logged when prompts are not extracted. The fallback behavior means that sensitive data present in the request body could be captured, requiring appropriate access controls and encryption at rest.

Security Considerations

Prompt content can contain proprietary or user‑generated data. Logging this information expands the attack surface for log‑exfiltration or insider misuse. Engineers should treat logged prompts as sensitive data, enforce strict access controls, and audit log access. The shift also removes the previous log mode ruleset, so any automation built around that legacy configuration must be updated.

Related CloudNinjas coverage: security.

What This Means For Practitioners

Adopt the payload‑logging + custom‑rule approach to gain prompt visibility, but audit the resulting log streams for volume and sensitivity. Update any CI/CD pipelines that referenced the old log mode ruleset, and verify that storage and monitoring solutions can handle the new data patterns. Finally, establish a review cadence to ensure that prompt logs are retained only as long as required for security or compliance purposes.

Originally published atCloudflare Application Security