RuleForge: Automated Generation and Validation for Web Vulnerability Detection at Scale
RuleForge is an AWS internal system that automates the generation and validation of web vulnerability detection rules from Nuclei templates using a novel LLM-as-a-judge confidence system and iterative refinement strategy, significantly reducing false positives while addressing the scale of modern CVE disclosures.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are the head of security for a massive city (the internet). Every day, thousands of new "break-in plans" (vulnerabilities) are discovered by bad guys. In the past, you had a team of human detectives who would read each plan, figure out how to spot it, and write a specific rule to catch the criminal.
The problem? In 2025, there were 48,000 new break-in plans. Your team of human detectives could only write rules for a tiny fraction of them. The city was getting overwhelmed.
Enter RuleForge.
RuleForge is like a super-smart, tireless robot assistant built by Amazon Web Services (AWS) to help your detectives. Instead of humans writing every rule from scratch, RuleForge automatically writes the "wanted posters" (detection rules) for these break-in plans.
Here is how it works, using some simple analogies:
1. The Recipe Book (Nuclei Templates)
Usually, security researchers write "recipes" for these break-in plans in a structured format called Nuclei templates. Think of these as standardized instruction manuals that say, "If a bad guy tries to do X, it's a crime."
- RuleForge's Job: It reads these manuals and instantly writes the specific "wanted poster" (a JSON rule) that the city's security cameras can understand.
2. The "5x5" Strategy (The Art of Trying Again)
If you ask a robot to write a rule once, it might get it wrong. So, RuleForge uses a strategy called 5x5.
- The Analogy: Imagine you are hiring a chef to cook a specific dish. Instead of asking one chef to cook it once, you ask five different chefs to cook it at the same time.
- The Twist: If the first batch of dishes isn't perfect, you don't just throw them away. You give them feedback ("Too salty," "Not enough spice") and ask them to try again, up to five times.
- The Result: Out of all those attempts, you are almost guaranteed to find at least one perfect dish. This ensures the system finds the best possible rule for every vulnerability.
3. The "Judge" Robot (LLM-as-a-Judge)
This is the paper's biggest innovation. How do you know if the robot's rule is good?
- The Old Way: You test the rule with fake bad guys and fake good guys. If it catches the bad guys and ignores the good guys, you pass it. But this is like a test with easy questions; it doesn't tell you why the rule might fail in the real world.
- The New Way (The Judge): RuleForge uses a second, very smart AI (a "Judge") to look at the rule and ask two critical questions:
- "Is there a chance this rule misses a real criminal?" (Sensitivity)
- "Is there a chance this rule falsely accuses an innocent person?" (Specificity)
- The Analogy: Think of the first AI as a Student taking a test, and the second AI as a Strict Teacher grading the test. The Teacher doesn't just give a "Pass/Fail"; they write a comment explaining why the answer is weak.
- The Magic: The Student AI reads the Teacher's comments, learns from them, and tries to write a better rule. This loop happens automatically, making the rules smarter and more accurate with every try.
4. The Real-World Stress Test (IP Validation)
Before a rule goes live, it has to survive a massive stress test.
- The Analogy: Imagine you have a new metal detector at an airport. You don't just test it with a fake knife; you run it through 5 billion real passengers (real web traffic).
- The Goal: You want the detector to beep only when a real criminal walks by. If it beeps for innocent people (false positives), you have to take it out of service because it would cause chaos.
- The Result: The "Judge" robot helps filter out the bad rules before they get to this expensive test, saving time and money.
5. What Did They Learn? (The Lessons)
The paper shares some funny but important lessons about using AI for security:
- AI is Overconfident: If you ask an AI, "Are you sure this rule is perfect?" it will say "Yes, 90% sure!" even if it's wrong. It's like a student who is confident but wrong.
- The Fix: Instead of asking "Is this right?", the team learned to ask the AI, "What is wrong with this?" By forcing the AI to play the role of a critic looking for flaws, it becomes much more accurate.
- Human Touch is Still Needed: Even with all this automation, a human security expert still has to give the final "thumbs up" before a rule goes live. The AI does the heavy lifting, but the human makes the final call.
The Bottom Line
RuleForge is a system that turns the impossible task of manually writing 48,000 security rules into a manageable, automated process. By using a "5x5" generation strategy and a "Judge" AI that critiques its own work, they were able to:
- Cut false alarms by 67% (so innocent people aren't flagged).
- Increase productivity by 336% (doing the work of three human teams).
- Keep the city safe against a flood of new threats that humans alone couldn't handle.
It's a perfect example of using AI not to replace humans, but to give them superpowers so they can handle a world that is changing too fast for anyone to keep up with alone.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.