r/devops • u/SelectionBitter6821 • Jul 17 '26
Discussion What broke when your org gave developers AI coding agents?
We support 200+ developers and rolled out agentic coding tools this year. The failure modes were not what we expected. Not "AI wrote insecure code" but things like agents committing credentials from local env files, installing unvetted dependencies to satisfy a task, and pipeline tokens with way too much scope being handed to autonomous processes. Interested in what surprised other teams, especially in regulated industries.
0
Upvotes
8
u/bedpimp Jul 17 '26
It sounds like you need better developers.
4
u/DoomBot5 Jul 17 '26
The usual internal tools that have been having issues started having even more issues.
2
u/Ariquitaun Jul 17 '26
Sounds like your developers need training. Contrary to popular belief, coding agents require finesse to use effectively if you don't want to end up in a world of spaghettified, unfathomable code and gigantic AI provider token bills.
2
u/OkProtection4575 Jul 18 '26
I've been a consultant for the past few years, working in several regulated government projects. Since those kind of places have so many people, and with development and operations and regulations/requirements, you get a lot of repositories, code and systems. Wether it's IaC, DevOps, automation, or just scripts. A lot of teams also reusing each others stuff. So this has created kind of like a hidden web of dependencies. So sometimes, when someone changes a repo, it breaks of affects a bunch of other repositories/systems they didn't know used the thing they changed. And with AI, that just happens much more often, because agentic coding is so much faster and AI only have/know the context you give it
23
u/ceejayoz Jul 17 '26
Reddit broke when your org gave marketers AI agents.
5
u/DadAndDominant Dev (not Ops currently) Jul 17 '26
Bloat.
Everyone uses AI to summarize some shit and shit it into slack, where noone reads it. Comments and PR's are milion lines long, while idiotic features creep in as "it's just one claude prompt bro". I hate it, hate it with every fiber of my being.
2
u/Floss_Patrol_76 Jul 17 '26
none of those are new holes, the agent just exercised them faster than a human would. a pipeline token scoped to half your infra was always a latent incident, an autonomous process just made it a same-day one. the real fix is short-lived least-privilege creds and no static secrets in env files, not trusting the agent more.
2
u/Next-Task-3905 Jul 18 '26
The failures you listed are exactly where I would put controls outside the agent rather than trusting prompts or training alone.
For credentials:
For dependencies:
For pipeline tokens:
The pattern I would avoid is giving the agent the same workstation context as a human and hoping review catches it. Give it a constrained execution environment: clean checkout, minimal env, scoped token, no ambient cloud credentials, network restrictions if feasible, and mandatory review for package/deploy/secret/infra changes.
The rollout metric I would track is not just "did cycle time improve?" Track new dependency count, secret-scan hits, permission-denied events, token scopes used, reverted AI-authored changes, and review comments per AI-generated PR. Those numbers show whether the control plane is working before the incident review does.
2
u/TheseTradition3191 Jul 18 '26
the unvetted deps one is the actually new failure mode imo. a human at least googles a package before adding it. the agent just installs whatever unblocks the current step, and if its on auto approve it'll happily pull a typosquat without pausing. we ended up gating package installs behind an allowlist, agents dont get to add deps on their own anymore, same as youd gate a prod deploy.
the creds in env file thing isnt really an ai problem. the agent just surfaced it way faster than your linters were catching it.
1
u/Dazzling_Opening_229 Jul 28 '26
The secrets thing is the real tell. AI agents will stuff credentials anywhere unless you've got guardrails catching it before the push, not after. ox security' does that layer well, and Endor Labs handles the supply chain side. Branch protection and MR approvals help but only if someone's actually reviewing what the agent generated, and honestly that's where most teams admit things fall apart.
1
u/vbnotthecity Aug 28 '26 edited Sep 04 '26
the boring answer is the agent should never be handed the key. everything else is damage control. we moved creds to a proxy and the whole category of problem went away. agentz by accuknox is open source and aimed at this exact thing, an agentic harness that keeps agent workflows under zero trust. its on github https://github.com/accuknox/agentZ