Cloudflare signed CISA's Secure by Design pledge on May 8, 2024, committing to build security in as a foundational principle rather than a feature. Among the pledge's goals is the reduction of entire classes of vulnerabilities — an aim tied to the Cloudflare Product Security program's push to automate proactive detection and prevent vulnerabilities at scale. The company shared an update on that goal, covering why it prioritized certain vulnerability classes, how it eliminated them, and what the measurements show.
Choosing what to eliminate first
Cloudflare's core security philosophy is to keep vulnerabilities out of production rather than patch them afterward. Over roughly six months, the Product Security team added new and customized rulesets aimed at fully eliminating two classes: secrets and injection flaws. The work improved detection precision and cut false positives, while allowing proactive detection and blocking. Stopping vulnerabilities at merge time supports keeping a high security posture, which the pledge frames as a proactive security measure.
Injection vulnerabilities arise when code and data mix without clear boundaries, whether from inadequate validation, unsafe functions, or improper sanitization. They matter in any product or platform, since exploitation compromises confidentiality, integrity, and availability. Cloudflare detects and prevents them through security reviews, secure code scanning, and vulnerability testing, with improving precision so that issues are caught and blocked at the source if they are introduced accidentally.
Secrets in code carry similarly high impact because leaks of confidential information can lead to unauthorized access and insider threat problems. In 2023, Cloudflare tuned its tools to improve detection and reduction of secrets, auditing all repositories and analyzing usage patterns, then writing and enabling enhanced detection rules to lower the odds that secrets return in new code.
Addressing these flaws at their source shrinks the attack surface and the potential for exploitation in production. It also creates secure defaults: developers can rely on frameworks and tools that inherently separate data or secrets from code, reducing the need for reactive fixes. Fixing at the code level also future-proofs applications as the threat landscape shifts.
How the controls work
The strategy rests on three elements: secure defaults, automation, and developer enablement.
- Secure defaults: frameworks that inherently separate data from code, plus greater reliance on secure storage and secret management tools integrated into the development pipeline.
- Automation: static analysis tools in the DevOps process were enhanced with customized rulesets that block issues based on observed patterns, and every pull and merge request runs security scans. When true positives are found, "build break" and "stop the code" measures prevent the risk from entering production, regardless of criticality or affected product.
- Developer enablement: continuous training and guidance on preventing vulnerabilities and on using the centralized secrets platform in an automated way, embedding these practices into daily workflows.
Custom rulesets in SAST
To make detection and blocking more aggressive, the Product Security team wrote new detection rulesets for its static application security testing (SAST) tool inside CI/CD workflows and hardened the criteria for releasing code to production. Combining default and custom rulesets scans for secure code, secrets, and software supply chain vulnerabilities, identifies issues early, and enforces policy systematically.
Rules followed a staged rollout. They first ran in "monitoring only" mode to reveal trends and possible false positives, then were fine-tuned so enforcement did not disrupt development. Using internal threat models, the team writes rules tailored to Cloudflare's infrastructure, and every pull request and merge request is scanned. Once rules are precise enough, they are activated in blocking mode, which breaks the build on detection and delivers remediation at the PR/MR stage. Baking these checks into the CI/CD pipeline means issues are handled before production, reducing remediation effort and risk.
Measured results
In the second half of 2024, the team added rulesets that detect and remove newly introduced secrets, yielding a 79% reduction of secrets in code over the previous quarter. With a similar approach, new rulesets were put in blocking mode for all injection vulnerabilities regardless of criticality, producing an additional 44% reduction of potential SQL injection and code injection vulnerabilities. Security tools can generate false positives, so customized rulesets focused on high-confidence true positives remain essential for methodically evaluating and resolving findings. The reductions serve as evidence that proactive measures can shrink whole vulnerability classes at scale.
What's next
Cloudflare plans to mature these practices further: secure frameworks, threat modeling at scale, automated security tooling across every stage of the software development lifecycle (SDLC), and ongoing role-based developer training on current security standards. The company intends to meet all seven CISA pledge goals by May 2025.
For any organization that builds software, the advice is to study CISA's Secure by Design principles and plan an implementation; the pledge is organized around seven security goals that prioritize customer security, and it asks organizations to rethink how they approach the problem.



