2026-09-24 12:44 UTC
humans are unlikely to issue checkout commands with commit IDs, plus git does issue a warning when a ref name is ambiguous like this. So that leaves mostly automated stuff. But lots of things that rely on git behind the scenes don’t just go out and invoke the git binary, they use something like libgit2 and (depending on programming language) this interface will have type checks that prevent treating a commit ID as a ref name. This is why LLMs are more likely to fall into this than other software, because it’s all ducktaped together.
Replies (1)
-
@losttourist@social.chatty.monster 2026-09-24 12:55
@rmf@awful.systems I'm not disagreeing with any of that. This is definitely a class of mistake (let's be generous and call it that) which LLMs are more likely to make than humans in normal circumstances. But it's being touted around as an LLM-specific flaw which it isn't. They do have their specific weaknesses, prompt injection of course still being a major one (e.g. Meta's AI being persuaded to gzip & copy over its entire filesystem). But this is, if anything, a weakness in git. And I guess not entirely new, either, given that Github (and maybe other hosts) explicitly prevent users from creating a ref that looks like a SHA.