r/ArtificialInteligence • u/Dagnum_PI • Apr 23 '26
📊 Analysis / Opinion One GitHub PR Comment Just Compromised Claude Code, Gemini CLI & GitHub Copilot 85% Success Rate and ZERO Audit Trail
Claude Code. Gemini CLI. GitHub Copilot.
Three of the most widely used AI coding agents in the world. All compromised by the same attack a specially crafted comment in a GitHub PR.
One prompt. Arbitrary commands executed. Credentials extracted. Gone.
The attack success rate against current defenses: over 85%.
Here's what nobody's talking about. It wasn't just that the agents were vulnerable. It's that there was no record of what they did. No verifiable trail of what commands ran, what data was touched, what was exfiltrated.
The attack happened. But so did the silence after it.
You can patch a vulnerability. You can't patch the absence of proof.
Every AI coding agent running today is making decisions inside a black box.
The industry is focused on building smarter agents. Nobody is focused on building accountable ones.
That's the gap. And it doesn't close itself.
16
u/Altruistic_Arm9201 Apr 23 '26
What in the AI slop hellscape of an effortless post are you talking about? You absolutely can patch gaps in audit data. Improving audit trail coverage is something people have addressed since computing began.
And nobody is focused on accountable agents? Are you living under a rock?! There’s research, projects, tooling, methodologies coming out constantly around making models less like a black box. The amount of work on this is massive.
-12
u/Dagnum_PI Apr 23 '26
Plenty of research and tooling exists on explainability. But most audit trails stay mutable, siloed and incomplete for regulators who need tamper-proof proof across every agent decision.
The real gap is turning those logs into independent verifiable evidence that survives incidents.
9
u/GentlemenHODL Apr 23 '26
Willing to bet this response was AI.
0
u/Dagnum_PI Apr 23 '26
April 2026 research Claude Code agents leaking API keys in GitHub Actions. https://www.datawiza.com/blog/industry/prompt-injection-is-stealing-api-keys-from-claude-code-gemini-cli-and-github-copilot/
1
u/havok_ Apr 24 '26
And an ad for some blockchain ai explainability bullshit that op will push next.
1
u/Altruistic_Arm9201 Apr 23 '26
Most audit trails are mutable? Are you nuts? That’s like saying most passwords are “password”
Audit trails have been a thing since before the internet and sure some people set them up in terrible ways but if the thing triggering an audit trail entry can modify it, then it’s not an audit trail.
4
u/InterstellarReddit Apr 23 '26 edited Apr 23 '26
Yeah OP this isn't a Claude OOB agent this is an agent that someone created and they didn't do it correctly.
Any bot running on GitHub actions don't using an API key they're using a GH secret or gh environment variable. Claude security bot uses oauth as well. Unless somebody manually creates it this way, there's no reason for a bot on GitHub to have access to an API key.
This example was fabricated because it's the person who created it, made it function this way.
Edit - Claude code appears as Claude code on GH when it runs. This screenshot shows GitHub actions. GitHub actions are manually created by end users.
-1
u/Dagnum_PI Apr 23 '26
Got it, someone hand-rolled that GitHub Action. Still doesn't change the core problem the agent is running with a live API key sitting exposed in the workflow.
That's the exact kind of slip that happens constantly, whether the setup was manual or not.
2
u/InterstellarReddit Apr 23 '26
The agents is running with a live API key because the user hand rolled the GitHub action bro. You’re calling out AI for a human error. The GitHub action has the api key coded into it.
5
u/fourohfournotfound Apr 23 '26
Sure the agents shouldn't have done this. But if you isolate it in a container or even better a container within a vm and back the git up to a place the container can't access then there would be an audit trail. Anyone doing real work with agents should be doing this and it's just a matter of time if they are not.
-5
u/Dagnum_PI Apr 23 '26
Smart isolation in containers still leaves siloed mutable logs without unified oversight. Regulators need proof of every step that no one can alter afterward.
1
u/fourohfournotfound Apr 23 '26
If anything gets commited it will be in the git. If it's ignored it's not going on the web at least. If the git is backed up in a way the llm can't touch then what exactly will be missing and not auditable? All file changes are in git.
-1
u/Dagnum_PI Apr 23 '26
But those logs can still be rewritten and you lose any unified tamper-proof record regulators can verify independently. Getting downvoted for this is comedy when it's dead accurate.
2
u/fourohfournotfound Apr 23 '26
can you clarify how an offsite backup done every commit that the llm does not have access to will be rewritten? Outside of a kernel exploit I just don't see how that can even happen. maybe it wouldn't stop the issue you are talking about but it would provide an audit trail. if something is actually pushed in git it will be in git. if you backup your git seperately then there's no log to edit as the edit would be part of the git. either the keys got pushed and they are part of the git or they didn't. if the llm has access to the git they could edit the history to a point, but the entire point of git is an auditable file change log. In my setup the llm does not have any access to these backups and git itself has the change history. if you were ultra paranoid you could do continuous snapshots. there's no way a change wouldn't show up there.
→ More replies (2)
75
u/CircumspectCapybara Apr 23 '26
Thanks ChatGPT for the writeup.
22
u/FuzzyDynamics Apr 23 '26
Reading ChatGPT output at this point makes me feel nauseous. I can’t go on LinkedIn either because it’s the same format, same
boiled down language. And then.
Reveal.
Takeaway, so fucking sick of people using AI to write or think for them.
6
4
1
1
u/no-name-here Apr 23 '26
Lots of claims, but zero links to where this actually occurred or any news reports about it?
1
u/Dagnum_PI Apr 23 '26
Direct sources: GitHub official docs on secrets (shows the right vs wrong way): https://docs.github.com/actions/security-guides/using-secrets-in-github-actions April 2026 research — Claude Code agents leaking API keys in GitHub Actions: https://www.datawiza.com/blog/industry/prompt-injection-is-stealing-api-keys-from-claude-code-gemini-cli-and-github-copilot/ GitHub secret scanning overview (proves how widespread this is): https://docs.github.com/code-security/secret-scanning/about-secret-scanning
3
1
u/Big-Info Apr 23 '26
Wouldn't this only matter if random people have access to your repo and you are approving PRs without reviewing them first?!?
1
u/magicmulder Apr 23 '26
Just keep your API key in an environment variable and don't pass it on the command line.
1
1
u/mgdavey Apr 23 '26
I think the fact the agent found the exploit is a lot more remarkable than the fact that it didn't redact the api key.
0
0
Apr 23 '26
[deleted]
66
u/Motivictax Apr 23 '26
I'm so sick of people using AI to produce this garbage word salad, when they could write literally one paragraph here and convey more content more clearly
13
u/Adept-Potato-2568 Apr 23 '26
Right? What even happened? OP just posted a screenshot and said they're all compromised basically.
What does any of this mean?
-13
u/Dagnum_PI Apr 23 '26
Fair call on the word salad. But this screenshot is a real example of agents running with exposed API keys in workflows.That's happening today and it's worth talking about.
4
u/IIlIIIlllIIIIIllIlll Apr 23 '26
Is it? Why should we believe that? You can't even be bothered to write your own 3-4 sentences for a post, why should we believe anything here isn't a hallucination?
You wrote a post about an unreliable AI agent making a critical mistake... using AI. Any message you were trying to convey is entirely undercut by how you chose to deliver it.
-3
u/Dagnum_PI Apr 23 '26
The screenshot is real an agent running with a live API key right in the workflow. That's the issue, not how I typed the post.
2
u/IIlIIIlllIIIIIllIlll Apr 23 '26
Why should I believe that though? Anyone could just make a screenshot, especially if it's nothing but some text on a webpage. I'd be more inclined to believe you if you had bothered to write anything about it, but if you can't be bothered to use your own language or even just proofread an AI generated paragraph then why should I believe you went out of your way to find anything real or interesting to post about in the first place?
0
u/Dagnum_PI Apr 23 '26
https://docs.github.com/en/code-security/concepts/secret-security/about-secret-scanning
This is real and it is irrelevant if you believe me or not. These things are happening.
Every major platform is getting breached in 2026. vercel, snowflake, the list keeps growing.
3
u/IIlIIIlllIIIIIllIlll Apr 23 '26
Seems like these would have been excellent to include in the post, no?
→ More replies (2)7
31
u/-Brodysseus Apr 23 '26
"Here's what nobody is talking about" 🤢🤮
11
u/H4llifax Apr 23 '26
If I wanted to talk to AI, I would go and talk to AI. Why can't these subs be full of real people talking about AI, rather than AI doing the talking?
Where is the social in social media going?!
1
u/Accomplished-Emu3233 Apr 23 '26
Why not just down right ban users using ai if they can't put the efforts and want to karma farm( tbh they really need help and a job) they should be banned
1
3
u/jaxxon Apr 23 '26
Here's what nobody is talking about. It's not just slop. It's low-effort garbage in real-time. Here's why that matters... blah blah . . . .
→ More replies (1)11
u/SirBiggusDikkus Apr 23 '26
One prompt. Arbitrary commands executed. Credentials extracted. Gone.
Sounds like a shitty movie trailer
4
19
Apr 23 '26
[removed] — view removed comment
-5
u/Dagnum_PI Apr 23 '26 edited Apr 23 '26
Lots of people do. You also have people downloading things like skills which can be used as attack vectors.
Getting downvoted for facts is comedy gold 😂 Lots of people really do hand agents raw API keys and unvetted skills are textbook attack vectors. 100% accurate.
29
u/SirBiggusDikkus Apr 23 '26
You’re getting downvoted because that write up you included with the post is genuinely terrible. I assume your chat prompt included directions to be an overdramatic movie trailer????
11
u/lolsai Apr 23 '26
Ur probably getting downvoted because you copy paste an entire AI response for your full post
2
u/cartoon_violence Apr 23 '26
The ability to allow anybody to create code using AI has resulted in a tsunami of stupidity.
1
u/techietwintoes Apr 24 '26
These downvotes are for the sloppy AI word salad in the description. Nobody is remotely bothered about so-called "facts" when you cannot describe them in plain English.
-8
0
u/H4llifax Apr 23 '26
Here I am knowing that's a bad idea but also not knowing what the alternative is.
6
u/IIlIIIlllIIIIIllIlll Apr 23 '26
The alternative is not doing that. Hope this helps.
0
u/H4llifax Apr 23 '26
The only alternative I see is giving it short-lived tokens.
2
u/humblevladimirthegr8 Apr 24 '26
You don't give it production key access at all - just test/fake keys. The real keys are stored in production config. Only a human developer should be able to start/test/deploy the application with the real keys.
1
u/H4llifax Apr 24 '26
Ok fine but I'm thinking about keys way earlier in the process - github tokens for example. A lot of damage can be done and has been done if those leak and allow it to either push to master (solved by configuring branch protection) or trigger CI runs (not sure how to solve that, the whole point of CI is that it should run when changes come in imho, but that seems where people get pwned).
1
u/humblevladimirthegr8 Apr 24 '26 edited Apr 24 '26
VS code doesn't give agents write access to git (at least for their copilot chat). My git commits and push are always done by humans.
EDIT: check my other comment thread for how I isolate the agents into a container so it doesn't have access to any prod secrets: https://www.reddit.com/r/ArtificialInteligence/comments/1stlgko/comment/ohxo0h3
1
u/H4llifax Apr 24 '26
Yeah sorry for the confusion. In the other thread I mentioned vs code, but in this one I'm thinking about a Hermes agent that lives on some VPS and that I interact with via telegram gateway. I want it to be able to push to GitHub so I can more easily collaborate with it on code projects. Maybe I'll just give it an own account and call it a day instead of giving it tokens to my own account. Not that there's much of value under my account either. This is more of an intellectual exercise to learn best practices for Hermes/OpenClaw style agents I guess.
1
u/humblevladimirthegr8 Apr 24 '26
I haven't used general purpose agents like hermes/openclaw but if I were to do so, I would give it completely separate accounts for everything and forward data as needed. For example instead of giving it direct access to my email account, it would have its own email and I set up forwarding rules to send the emails OpenClaw is supposed to see. Same with GitHub it should have its own account. A prompt is not a policy - if there's something you don't want an agent to be able to do, it should be literally impossible for it to do it. AI is pretty good at coming up with ideas to isolate itself if you're having trouble.
1
u/Killer_Method Apr 23 '26
Maybe spin up a container (with token loaded from secrets.yaml or ENV vars) that has the tooling the agent needs, let the agent send requests to the container, but never let it do more than that. Don't let it get container logs, exec into the container, and don't let it outside of its sandbox to read secrets files. Keep it in its own sandbox without shell permissions. The credentials are stored in a black box that has a few buttons on the outside for the agent to push.
I'm spitballing, though.
1
u/humblevladimirthegr8 Apr 24 '26
VS Code makes this easy with Dev Containers. You can open up the editor (and the agent chat with extensions) within the container and use it as normal. I mask the secret files so it can't show up in the container even though it lives in the same workspace. Only I have access to prod credentials and I inject it manually. I'm now a lot more comfortable letting AI run commands without approval because it can't do anything outside the docker container.
1
u/H4llifax Apr 24 '26
How does the masking work in vscode? I had the issue that I needed proxy configuration which included my password for setting up the container. I put it in a .env file, but I couldn't figure out how to make sure that's never read by the ide agent.
1
u/humblevladimirthegr8 Apr 24 '26
One solution is to mount an empty volume over it. In my devcontainer.json:
"mounts": [ // This mount creates an empty anonymous volume and places it over the .secrets folder // physically preventing anything inside the container from seeing your host secrets. "source=devcontainer-secrets-mask,target=${containerWorkspaceFolder}/.secrets,type=volume" ],when I view the ./.secrets folder within the container it just looks empty but when I view it outside the container I see my env files.
1
1
u/Single-Virus4935 Apr 26 '26
I have a Proxy which injects the api keys. Auth via surrogate keys or OIDC
1
Apr 23 '26
[removed] — view removed comment
1
u/Dagnum_PI Apr 23 '26
Exactly.We handed agents the keys to the kingdom before we figured out how to watch what they actually do with them.That's why tamper-proof audit trails across the whole workforce matter now.
•
u/AutoModerator Apr 23 '26
Submission statement required. Link posts require context. Either write a summary preferably in the post body (100+ characters) or add a top-level comment explaining the key points and why it matters to the AI community.
Link posts without a submission statement may be removed (within 30min).
I'm a bot. This action was performed automatically.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.