I just saw the recent critical Gemini CLI vulnerab...
# proj-agent
e
I just saw the recent critical Gemini CLI vulnerability (GHSA-wpqr-6v78-jr5g) around workspace trust in CI/headless mode that allowed RCE + secret exfiltration from the runner. Have we reviewed the OpenHands AI PR Review plugin to ensure there’s no similar trust/execution issue with untrusted PR workspaces?
c
Thanks for the link! We have reviewed it before, and we warn the LLM that AGENTS.md and other similar files are “untrusted”. But worth rethinking it any time, for sure. I think it’s clear that GitHub triage issues and similar workflows, specially PR review, are prone to prompt injection, because, well, they are. But trying to select directories to “trust” doesn’t change this. Since that means the LLM could be jailbroken, the jailbroken LLM will load another folder. They appear to remove it from loading by default, but idk, that isn’t helping if the LLM loads it anyway. Maybe I’m misreading this, but I don’t think the framing they use is quite accurate? Or maybe it depends how their github action looks like, exactly.
The text talks about the shell tool. We do give the agent the terminal tool in pr-review, and in other workflows. I don’t know how we wouldn’t… because it needs to do stuff. But the user can decide what tools the agent runs with. So if people want to remove it, they can. It's the same as always: a tradeoff between having a powerful agent and the agent being able to do bad stuff too. Except, for AI agents and LLMs, some 100x as it has been before, I feel. 🤔
e
I saw recently that hooks are a great defense against prompt injection...
c
I just re-read the issue they posted - they were loading env vars from .env or other configuration files. I don’t think pr-review is doing this. So we are… I don’t actually want to say better protected, but yeah kind of.
👍🏼 1
Just for fun, Leonardo, couldn't help it: 🫠 https://x.com/engelnyst/status/2057925521279754303?s=20
🤣 1
To note, re: pre-tool use hooks, just a few thoughts: • OpenHands has security analyzers, which the user can set, and an analyzer intercepts basically every LLM action • they perform the same function (I think they could be reimplemented as pre-tool use hooks, even, if we wanted to) • we had this analyzer functionality before we had hooks, simply, so they’re implemented as their own thing
💡 1