> The issue title was interpolated directly into Claude's prompt via ${{ github.event.issue.title }} without sanitisation. How would sanitation have helped here? From my understanding Claude will "generously" attempt to understand requests in the prompt and subvert most effects of sanitisation.
A GitHub Issue Title Compromised 4k Developer Machines
131–140 of 216 posts
Re: A GitHub Issue Title Compromised 4k Developer Machines
#132Earlier quoted context omitted.
I guess it's somewhat known that you can trivially fake a repo w/a fork like this but it still feels like a bigger security risk than the "this commit comes from another repository" banner gives it credit for: https://github.com/cline/cline/commit/b181e0
I don't understand, how exactly does `npm install github:cline/cline#b181e0` work? b181e0 is literally a commit, a few deleted lines. npm could parse that as a legit script ???
Re: A GitHub Issue Title Compromised 4k Developer Machines
#133> Cline’s (now removed) issue triage workflow ran on the issues event and configured the claude-code action with allowed_non_write_users: "*", meaning anyone with a GitHub account can trigger it simply by opening an issue. Combined with --allowedTools "Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch", this gave Claude arbitrary code execution within default-branch workflow. Has everyone lost their minds? AI agent w…
Re: A GitHub Issue Title Compromised 4k Developer Machines
#134> Cline’s (now removed) issue triage workflow ran on the issues event and configured the claude-code action with allowed_non_write_users: "*", meaning anyone with a GitHub account can trigger it simply by opening an issue. Combined with --allowedTools "Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch", this gave Claude arbitrary code execution within default-branch workflow. Has everyone lost their minds? AI agent w…
From Wikipedia:
module.exports = leftpad;
function leftpad (str, len, ch) {
str = String(str);
var i = -1;
ch || (ch = ' ');
len = len - str.length;
while (++i
Everyday I wake up and be glad that I chose Elixir. Thanks, NPM.Re: A GitHub Issue Title Compromised 4k Developer Machines
#135What am I missing here, I thought npm didn't run as root (unlike say apt-get)?
Re: A GitHub Issue Title Compromised 4k Developer Machines
#136Isn't the main vulnerability the cache poisoning in GitHub Actions? Yes, the agent installed a malicious package in its workflow. But if GitHub Actions had been properly isolated, the attack would not have been possible. It's basically impossible to protect against malicious injections when consuming unknown inputs. So the safeguard is to prevent agents from doing harm when consuming such inputs. In this case, it see…
Oh, it's fully possible. Just don't have a fucking LLM in the loop.
Re: A GitHub Issue Title Compromised 4k Developer Machines
#137> Cline’s (now removed) issue triage workflow ran on the issues event and configured the claude-code action with allowed_non_write_users: "*", meaning anyone with a GitHub account can trigger it simply by opening an issue. Combined with --allowedTools "Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch", this gave Claude arbitrary code execution within default-branch workflow. Has everyone lost their minds? AI agent w…
Clearly yes. (Ok, not everyone, but large parts of the IT and software development community.)
Re: A GitHub Issue Title Compromised 4k Developer Machines
#138> The issue title was interpolated directly into Claude's prompt via ${{ github.event.issue.title }} without sanitisation. How would sanitation have helped here? From my understanding Claude will "generously" attempt to understand requests in the prompt and subvert most effects of sanitisation.
What was the injected title? Why was Claude acting on these messages anyway? This seems to be the key part of the attack and isn’t discussed in the first article.
Because that's how LLMs work. The prompt template for the triage bot contained the issue title. If your issue title looks like an instruction for the bot, it cheerfully obeys that instruction because it's not possible to sanitize LLM input.
Re: A GitHub Issue Title Compromised 4k Developer Machines
#139The article should have also emphasized that GitHub's issues trigger is just as dangerous as the infamous pull_request_target . The latter is well known as a possible footgun, with general rule being that once user input enters the workflow, all bets are off and you should treat it as potentially compromised code. Meanwhile issues looks innocent at first glance, while having the exact same flaw. EDIT: And if you thin…
Yep, this is essentially it: GitHub could provide a secure on-issue trigger here, but their defaults are extremely insecure (and may not be possible for them to fix, without a significant backwards compatibility break). There's basically no reason for GitHub workflows to ever have any credentials by default; credentials should always be explicitly provisioned, and limited only to events that can be provenanced back t…
So you end up with GHA's over-privileged credentials handing off to npm's over-privileged install hooks.
I've started running --ignore-scripts by default and only whitelisting packages that genuinely need postinstall. It's a bit annoying, but the alternative is trusting
every transitive dependency not to do something during install.Re: A GitHub Issue Title Compromised 4k Developer Machines
#140> Cline’s (now removed) issue triage workflow ran on the issues event and configured the claude-code action with allowed_non_write_users: "*", meaning anyone with a GitHub account can trigger it simply by opening an issue. Combined with --allowedTools "Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch", this gave Claude arbitrary code execution within default-branch workflow. Has everyone lost their minds? AI agent w…