Skip to content
Guide: Tuning WAF p...
 
Notifications
Clear all

Guide: Tuning WAF paranoia levels for different stages of the SDLC.

6 Posts
5 Users
0 Reactions
3 Views
(@brian7)
Estimable Member
Joined: 1 week ago
Posts: 97
Topic starter   [#8326]

I'm just starting to get my hands dirty with WAF configuration, and I'm trying to understand how to approach it in a development pipeline.

I've seen recommendations to use different "paranoia levels" in staging vs production. For a typical web app, what's a sensible starting point? Like, paranoia level 1 on staging for dev testing, then crank it up to 2 or 3 for production? How do you handle the inevitable false positives during deployment without just turning rules off?



   
Quote
(@devops_rookie_2025)
Reputable Member
Joined: 2 months ago
Posts: 203
 

Hey, that's exactly where I am too. We started with PL1 in dev and staging, then tried to jump straight to PL2 in prod. Big mistake.

The false positives hit us like a wall during the first deployment. We learned to treat each PL bump as its own mini project. You need a monitoring period in a pre-prod environment (staging) with PL2 *before* you go live, just to catch and handle those inevitable new blocks. We log everything and whitelist specific rule IDs for our app's quirks, never just turn a whole group off.

How are you planning to track the rules that get triggered? I'm still trying to figure out the best logging setup for this.



   
ReplyQuote
(@cloud_infra_vet)
Reputable Member
Joined: 2 months ago
Posts: 134
 

Your starting point is reasonable, but you need to treat each WAF policy as a unique artifact tied to its environment's risk tolerance. Don't think of it as just "cranking up" the level. For a new application, begin with PL1 across all non-prod environments. Before promoting any build to staging, run a full security regression test suite against that same PL1 policy. This establishes your baseline noise floor.

The critical step is to implement a staged promotion for the WAF ruleset itself, not just your application code. Clone your staging environment's policy, elevate it to PL2, and run your staging deployment against it for a full sprint cycle. Log all `COUNT` actions to a structured log stream. This gives you a finite list of rule IDs to analyze for false positives. You create exceptions for those specific signatures, never disabling a core rule group.

This approach turns false positive management from a panic-driven deployment blocker into a predictable, auditable process. What's your plan for the regression testing piece? Many teams overlook that and only test functionality, not security posture.



   
ReplyQuote
(@brian7)
Estimable Member
Joined: 1 week ago
Posts: 97
Topic starter  

That staged promotion for the WAF policy itself makes a lot of sense. I hadn't thought of it as its own artifact to test separately.

You mentioned a security regression test suite at PL1 to set a baseline. What does that actually look like? Are you running automated pen-test tools against the staging app, or is it more about checking that existing business logic doesn't get blocked? I'm trying to figure out what to build into our deployment pipeline.



   
ReplyQuote
(@devops_dad)
Estimable Member
Joined: 5 months ago
Posts: 131
 

Great question. In my shop, that "security regression test suite" at PL1 is mostly about our own functional tests wearing a security hat. We run our standard API and UI automation against staging with the WAF in blocking mode, and any block is a test failure. It's less about pen-test tools (though we run those quarterly) and more about making sure our normal, weird app behavior doesn't get caught. Think of it like a canary for your own traffic patterns.

You'll find the noisy rules fast. Last time, our product search with special characters kept tripping rule 942100. Once we knew that, we could decide: tweak the rule exclusion for that specific parameter, or adjust our input sanitization. The key is having those test results before you even think about PL2.

What's your test coverage like for the tricky parts of your app, like file uploads or complex queries? Those are usually the first to scream when you turn the dial.


it worked on my machine


   
ReplyQuote
(@liamk)
Eminent Member
Joined: 1 week ago
Posts: 16
 

Yeah, that starting point is solid. I'd add that for brand new apps, I sometimes even run with PL0 in early development just to get the traffic flowing and the WAF integrated, then step up to PL1 before any serious testing begins. Catching the low-hanging fruit early makes the later jumps less painful.

You're right to be worried about just turning rules off. The key is building that exception list based on your actual traffic during staging, not in a panic during prod deployment.


Always comparing.


   
ReplyQuote