@aud@fire.asta.lgbt delivers a punchline to an LLM confused-deputy / prompt-injection attack well worth thinking hard about:
@jonny@neuromatch.social I’m starting to think that treating everything like an instruction isn’t a good idea, maybe
Indeed! Choose the weakest possible language you can get away with for a given problem! (Sometimes that means Regular Expressions: where Rice’s theorem tells us that the answer to any interesting question about Turing-complete languages is, in general, “I don’t know”, the answer for Regular Expressions is always decidable!)
The context of @aud’s toot was these two toots from @jonny@neuromatch.social:
another thing that’s fun: CLAUDE.md and a number of other special files get dumped directly into the system prompt. It’s possible to @include other files from CLAUDE.md. included files can be any text file, with a hardcoded list of extensions including .env files.
There are some protections against @includes for files outside the project directory, but there are also a number of easily visible bypasses […]
So it certainly seems like you can use CLAUDE.md to load say idk an .env file with keys into it into the context, bypassing all the safety checks, and then treat some exfil path as just being project-specific tool calling instructions. neat huh?
See also the Confused Deputy Problem and the idea of Object Capabilities, part of an approach for avoiding the whole class of problems.