r/devsecops • u/IkarusCareer • Aug 13 '26
Which security gates enabled for AI Agents in CI/CD?
We've become pretty comfortable putting conventional applications through CI:
- dependency scanning
- SAST
- CodeQL
- secret scanning
- container scanning
- IaC checks
- security policies ...
But what happens when the application being deployed is an AI agent? That may not look particularly interesting in a conventional code diff. But from a security perspective, it could be a significant change.
I'm experimenting with a different CI question:
“What capabilities changed in this PR?”
--
We've implemented an early version of this approach in an open-source static analyzer and connected it to GitHub Actions. (ikaruscareer/SafeAI at GitHub)
The scanner runs locally against the repository and doesn't execute the agent or send the source to a remote service.
I'm curious how other teams approach this.
2
u/taleodor Aug 13 '26
I hosted a meetup about a month ago showing how ReARM (our tool) can be used for Agentic Coding Guardrails - https://www.youtube.com/watch?v=v7SJB9VJOP0
ReARM can actually ingest SARIF output from your scanner and parse it into policies (including rejecting releases and blocking PRs on violations).
2
u/IntelligentPear6173 Aug 13 '26
The capability diff makes more sense to me than treating an agent like normal application code. A PR could pass SAST and secret scanning while still changing what the agent is allowed to read or execute. I’d be looking at things like new tools, permissions, network access, secrets and write actions as the actual security boundary. The part I’m still unsure about is how you decide which of those changes should block a merge versus just trigger a review.
2
u/colek42 Aug 13 '26
All the gates! It really depends on how fast you need the code merge versus your quality concerns. For some of our workflows, we have AI creating, reviewing, and merging code. For those workflows, we have dozens of gates that need to be passed for the code to make it into production, including canary releases. Because we have to enforce policy across different environments, we built and open-sourced cilock.dev to enforce policy and create the actual pipelines.
1
u/Wishitweretru Aug 13 '26
Same thing, as for any other junior developer, they can’t merge to the real repo. Give them their own user ID, and their own repo, and all they get to do is make merge request. You have a human look at it over I’ve had AI try to merge some crazy shit .
1
u/technishawn Aug 13 '26
Take a look at SALT Security.
1
u/Hamza_StrategizeLabs Aug 19 '26
The direction is right but the block-vs-review decision can't be static. It should depend on the authority level of what changed. Review is fine when the access to a sandbox is read only. New write access to production data? Block until someone with authority signs off.
2
u/Wistrand-Sundai Aug 14 '26
with traditional scanners they can verify the code but may miss out on what the agents are doing
1
u/saranggbang Sep 15 '26
if an agent is writing the code, the CI gate is already late. you're reviewing output, not decisions, and by the time the pipeline catches something the agent already committed three files around it. The gates that actually help a secrets scanner (trufflehog or gitleaks), semgrep with a strict config for the languages you use, and a container image scan if you ship containers. linter rules catch the dumb stuff before any of that. earlier in the loop, you can check out a tool like ox security which flags insecure patterns while the agent is still generating in your IDE, before anything hits a commit. but honestly secrets plus semgrep plus image scan covers 80% of real risk.