I'm working on improving our internal developer platform, but we're facing challenges in maintaining our DevSecOps and compliance policies without slowing down our development process. We've transitioned to a Policy-as-Code approach using tools like Open Policy Agent (OPA) with Rego, applying checks to every pull request. While our security and compliance are top-notch and our infrastructure drift is minimal, our pull request times have increased by 25%. This is making the team view the pipeline as a hindrance rather than a help. How do you effectively enforce mandatory but non-critical policies in your workflows? Specifically, do you:
1. Implement a 'fail fast/fail hard' strategy for only critical issues, allowing minor compliance problems to proceed and be logged for later review?
2. Use a dedicated compliance pipeline that runs less often to avoid blocking main workflows?
I'm looking for practical tooling or architectural suggestions that can help us balance compliance without excessive barrier for developers.
5 Answers
The slowdown you're experiencing is indeed common when enforcing all checks upfront. Splitting your policy enforcement can be beneficial. Keep critical checks in the PR gate for immediate feedback, while routing non-critical items to a parallel compliance pipeline. This ensures developers aren't blocked and still receive daily reports on compliance status.
Every quality control measure comes with a cost, and it's essential to quantify the risk involved. Consider tracking production risks and quality issues and associating a financial cost with them. This can help make a strong case for investing in the right tools and processes to enforce compliance without hampering developer velocity.
It sounds like you're facing the classic pay-me-now-or-pay-me-later dilemma. You might want to consider creating a long-running branch for merging that only undergoes a reduced set of checks, allowing for faster feedback on minor changes. The full checks could still apply when merging into the main branch, keeping the development process efficient.
Shooting for perfect compliance can backfire—it's an unrealistic goal. Instead, try implementing a scoring system for your policies with thresholds that allow for common sense in enforcement. This way, you'll prevent bottlenecks without sacrificing too much on compliance.
For your first option, I suggest customizing your tool settings. Only block for critical vulnerabilities like high-severity SAST or up-to-date SCA issues. For non-critical problems, consider having a secondary compliance pipeline that runs parallel checks, allowing the main CI/CD process to flow smoothly. This will reduce frustration among developers while keeping track of compliance.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically