Skip to content

blog: crs migration part 6#507

Open
fzipi wants to merge 6 commits intomainfrom
blog/crs-migration-part-6
Open

blog: crs migration part 6#507
fzipi wants to merge 6 commits intomainfrom
blog/crs-migration-part-6

Conversation

@fzipi
Copy link
Copy Markdown
Member

@fzipi fzipi commented May 3, 2026

Summary by CodeRabbit

  • Documentation
    • Added a new blog post covering CRS 4 false-positive tuning and production cutover workflows, including two tuning strategies, a three-phase migration sequence, common false-positive sources to review, and best practices for creating narrowly-scoped exclusions.

fzipi and others added 5 commits March 31, 2026 09:10
Covers two migration strategies (start fresh vs carry over), safe
production cut-over phases (parallel detection, validation, cut-over),
common false positive areas after the migration, and the new per-PL
reporting model for systematic tuning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets refLinksErrorLevel=WARNING so cross-post ref links don't break
the build when sibling posts don't yet exist on the same branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The author is already shown from the front matter. Adds the
related-pages shortcode to cross-link migration series posts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fzipi fzipi requested a review from theseion May 3, 2026 13:38
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 3, 2026

📝 Walkthrough

Walkthrough

Adds a new blog post covering CRS 3.3 to CRS 4.25 migration Part 6, detailing false-positive tuning strategies, a safe three-phase production migration sequence, common issue sources, exclusion techniques using paranoia-level reporting, and LTS maintenance guidance.

Changes

CRS Migration Part 6 Blog Post

Layer / File(s) Summary
Front Matter & Introduction
content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md (lines 1–16)
Blog metadata (author, date, categories, title, slug) and opening context for false-positive tuning workflow.
Migration Strategies
content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md (lines 16–63)
Two tuning strategies detailed: start fresh with CRS 4 and run detection-mode validation, or carry over CRS 3 exclusions and validate for mapping gaps. Includes operational steps for each approach.
Production Migration Phases
content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md (lines 64–92)
Three-phase sequence for safe cutover: parallel detection options, validation checklist for interpreting rule firings and adding exclusions, and cutover plan with enhanced logging.
False-Positive Sources & Tuning Guidance
content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md (lines 93–126)
Lists common CRS 3→4 false-positive areas (response-phase rules, restricted headers, PL redistribution, plugin differences). Explains per-paranoia-level reporting and includes concrete SecRule example for parameter-scoped exclusions.
Maintenance & Navigation
content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md (lines 127–137)
LTS stability and backport policy for maintaining exclusions; link to Part 7 on engine-specific considerations and related-page metadata.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • theseion

Poem

🐰 A tuning post hops to the fore,
Guiding false positives out the door,
From CRS three to four so bright,
Per-paranoia brings the light,
LTS stable—a crafted delight! 🛡️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'blog: crs migration part 6' is directly related to the changeset, which adds a new blog post about CRS migration part 6, specifically covering false-positive tuning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch blog/crs-migration-part-6

Review rate limit: 8/10 reviews remaining, refill in 8 minutes and 37 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 3, 2026

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: e6e3edf
Status: ✅  Deploy successful!
Preview URL: https://ca089457.website-1u6.pages.dev
Branch Preview URL: https://blog-crs-migration-part-6.website-1u6.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (4)
content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md (4)

16-17: 💤 Low value

Minor editorial: consider removing duplicate/indirect framing.

The opening references “Part 6 … tuning phase” and also points back to Part 5; that’s good, but it may be slightly redundant with the next-line “This post covers the tuning phase itself…” framing. A small tightening would reduce scroll friction.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md`
around lines 16 - 17, Tighten the duplicate framing in the intro by removing or
rephrasing the second sentence ("This post covers the tuning phase itself — the
practical work of establishing a clean CRS 4 baseline for your applications.")
so it doesn't repeat the opener ("This is Part 6..."). Edit the sentence
containing "This post covers the tuning phase itself" to either merge it with
the Part 6 line or replace it with a brief lead-in that adds new value (e.g., a
one-line summary of the post's specific goal), updating the lines that contain
"This is Part 6..." and "This post covers the tuning phase itself" accordingly.

68-92: ⚡ Quick win

Soften fixed time windows into “coverage-based” criteria.

The post uses fixed durations (e.g., “1–2 weeks”, “at least two weeks”, “one to two weeks”, and “first week after cut-over”). In practice, traffic patterns differ (seasonality, rollout timing, low-traffic endpoints), so a reader might disable enhanced logging/exclusions before all workflows have been exercised. Consider adding a brief criterion such as “until you’ve observed peak traffic + all critical workflows at least once” (or “one full business cycle”) while keeping the suggested defaults as examples.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md`
around lines 68 - 92, Update the fixed-duration recommendations in the Phase
1/Phase 2/Phase 3 guidance to include a coverage-based stopping criterion: keep
the example durations (e.g., “1–2 weeks”, “first week after cut-over”) but add a
sentence such as “or until you’ve observed peak traffic and all critical
workflows at least once (one full business cycle),” and apply this to the
detection phase, the validation phase, and the post-cutover logging guidance;
edit the headings/paragraphs referencing “detection mode”, “anomaly threshold
9999”, and the cut-over week to incorporate the new coverage-based criterion
while retaining the example time windows as defaults.

103-106: 💤 Low value

Narrow the “PL redistribution” explanation to avoid overgeneralization.

“New firings are most common in SQL injection and XSS detection rules” is plausible, but it’s still a broad expectation. Readers may over-focus their triage and miss other classes (e.g., request-method/header handling rules). Consider phrasing this as “often includes …” and adding a tip to sort/frequency-rank by rule ID firing counts before deciding where to tune first.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md`
around lines 103 - 106, Revise the "PL redistribution" paragraph to avoid
overgeneralization: change "The new firings are most common in SQL injection and
XSS detection rules." to a softer phrasing like "New firings often include SQL
injection and XSS detection rules, but can affect other categories (for example,
request-method or header-handling rules)." Then add a concise tip sentence
recommending readers frequency-rank or sort rule-ID firing counts before tuning
(e.g., "Tip: frequency-rank rule ID firing counts to prioritize tuning
efforts"). Update the "PL redistribution" heading paragraph and include the
brief ranking tip so readers don’t over-focus on only SQLi/XSS.

115-126: ⚡ Quick win

Make the SecRule exclusion example slightly more robust/readable for copy-paste.

The example is internally consistent, but copy/paste readers may miss subtle ordering/placement requirements. You already mention the filename (REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf), but consider also adding one extra line in the example comment like “Load this before CRS core rules” and/or clarifying why the actions are pass,nolog (it’s an exclusion ctl, not a detection rule). This reduces the chance of someone accidentally deploying it in the wrong include file or expecting it to “block” something.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md`
around lines 115 - 126, Update the SecRule example to make placement and intent
explicit: in the comment above the rule (in
REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf) add a note like “Load this file
before CRS core rules” and a short explanation that the actions pass,nolog are
used because this is an exclusion ctl
(ctl:ruleRemoveTargetById=941100;ARGS:content) not a blocking detection rule;
keep the SecRule signature (SecRule REQUEST_URI "@beginsWith /editor/save"
"id:1001,phase:2,pass,nolog,ctl:ruleRemoveTargetById=941100;ARGS:content") but
ensure the example comment clarifies file ordering and the reason for pass,nolog
so copy-paste users won’t place it after the CRS core rules or expect it to
block requests.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md`:
- Around line 16-17: Tighten the duplicate framing in the intro by removing or
rephrasing the second sentence ("This post covers the tuning phase itself — the
practical work of establishing a clean CRS 4 baseline for your applications.")
so it doesn't repeat the opener ("This is Part 6..."). Edit the sentence
containing "This post covers the tuning phase itself" to either merge it with
the Part 6 line or replace it with a brief lead-in that adds new value (e.g., a
one-line summary of the post's specific goal), updating the lines that contain
"This is Part 6..." and "This post covers the tuning phase itself" accordingly.
- Around line 68-92: Update the fixed-duration recommendations in the Phase
1/Phase 2/Phase 3 guidance to include a coverage-based stopping criterion: keep
the example durations (e.g., “1–2 weeks”, “first week after cut-over”) but add a
sentence such as “or until you’ve observed peak traffic and all critical
workflows at least once (one full business cycle),” and apply this to the
detection phase, the validation phase, and the post-cutover logging guidance;
edit the headings/paragraphs referencing “detection mode”, “anomaly threshold
9999”, and the cut-over week to incorporate the new coverage-based criterion
while retaining the example time windows as defaults.
- Around line 103-106: Revise the "PL redistribution" paragraph to avoid
overgeneralization: change "The new firings are most common in SQL injection and
XSS detection rules." to a softer phrasing like "New firings often include SQL
injection and XSS detection rules, but can affect other categories (for example,
request-method or header-handling rules)." Then add a concise tip sentence
recommending readers frequency-rank or sort rule-ID firing counts before tuning
(e.g., "Tip: frequency-rank rule ID firing counts to prioritize tuning
efforts"). Update the "PL redistribution" heading paragraph and include the
brief ranking tip so readers don’t over-focus on only SQLi/XSS.
- Around line 115-126: Update the SecRule example to make placement and intent
explicit: in the comment above the rule (in
REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf) add a note like “Load this file
before CRS core rules” and a short explanation that the actions pass,nolog are
used because this is an exclusion ctl
(ctl:ruleRemoveTargetById=941100;ARGS:content) not a blocking detection rule;
keep the SecRule signature (SecRule REQUEST_URI "@beginsWith /editor/save"
"id:1001,phase:2,pass,nolog,ctl:ruleRemoveTargetById=941100;ARGS:content") but
ensure the example comment clarifies file ordering and the reason for pass,nolog
so copy-paste users won’t place it after the CRS core rules or expect it to
block requests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9fc19c04-e0b2-4dc0-9e23-390368499184

📥 Commits

Reviewing files that changed from the base of the PR and between 1bbaae1 and e6e3edf.

⛔ Files ignored due to path filters (1)
  • static/images/2026/04/pexels-northern-29268627.jpg is excluded by !**/*.jpg
📒 Files selected for processing (1)
  • content/blog/2026-05-04-migrating-from-crs-3-to-crs-4-part-6-tuning.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant