IT OPS

Cloudflare WAF PR Rule Lint Preflight

When a pull request touches WAF rule files, it lints the expressions in a shell sandbox, dry-run validates them against Cloudflare, and posts pass/fail status back as a PR check.

CategoryIT Ops
Enginesim
Difficultyintermediate
Triggerevent
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPR changes WAF rule filesGitHubGitHub
  • ActionLint changed expressions in shell sandboxShell
  • ActionDry-run validate against CloudflareCloudflareCloudflare
  • LogicCombine lint and validation into verdict
  • OutputPost status check and comment to PRGitHubGitHub

What it does

This workflow shifts WAF rule review left into the pull request. The moment a PR modifies ruleset files, it lints the changed expressions, validates them against Cloudflare's API without applying them, and reports a clear pass or fail directly on the PR.

When to use it

Use it when WAF rules live in a repo and you want bad syntax, overly broad matchers, or invalid expressions caught at review time instead of after deploy. It gives reviewers an automated first opinion.

How it works

  1. 1A GitHub trigger fires on pull requests that change WAF rule files.
  2. 2A shell step runs the expression linter against the changed rules and flags risky patterns.
  3. 3The workflow calls Cloudflare's validation endpoint to dry-run the proposed expressions.
  4. 4A logic step combines lint and validation results into an overall verdict.
  5. 5The verdict, with specific findings, is posted as a comment and commit status check on the PR.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect ShellRun sandboxed commands inside the workspace.
  3. 3
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.