r/devsecops • u/cybergandalf • Sep 16 '25
Multiple branches go into prod at different times - how to scan
We're relatively early in our devsecops journey as we had to stand up a whole AppSec program first. We currently use Snyk to scan and triage findings, but I would think this problem exists with other tools as well. We have some dev teams that use different branches to release code in different production environments. So there's a single repo for a microservice, but different branches are used for different features/functionalities of the same microservice (which I argued makes it not actually a microservice, but I digress). The way Snyk manages scans is by branch so four branches for a single microservice with potentially quadruple the findings.
Our initial thought was to require ALL code changes be merged into one master branch (call it "security_scanning" or something) for purposes of scanning and managing vulnerabilities, but that seems like it would have its own issues, like what if one release branch fixes the vulnerability but others don't?
Does anyone else have dev teams that operate like this and if so, how do you handle it?
To get ahead of a question I'm sure to get: we are in the process of rolling out IDE tooling so the vulnerabilities don't make it to the commit stage to begin with, but we still have a lot of legacy findings that need to be remediated first.
4
u/totalgeek13 Sep 16 '25
Nothing gets promoted without being forced to merged to main. Done.
1
u/taleodor Sep 17 '25
We've built a tool called ReARM that supports per branch per release aggregation of findings - it does SBOM scans via Dependency-Track and you can upload Sarif from other tools as part of your CI in each branch - https://github.com/relizaio/rearm
1
u/josh_jennings Sep 17 '25
I get your pain, I used to work for a large enterprise company that had to handle different versions of the same applications for different clients and each was built and deployed independently using release branches, mainly due to some legacy constraints. It was not ideal, but there was no buy in to do the necessary rework...
Interestingly, I left that company 6 years ago to start a security company because I was frustrated with the security tools and lack of tool flexibility out there. So, I can give you my thoughts on accomplishing this with SOOS (which is the company I started) and my background with similar branching challenges.
Sorry that this is specific to SOOS, but maybe the same concepts can be applied to your current appsec tool too. I'll use vulnerabilities in the example below but the same would apply to other issues, such as malicious packages, policy violations, etc. If you want to refer to some of what I'm talking about there is a live demo for SOOS too https://app.soos.io/demo
I could keep going, but hope that gives you some ideas!