John (@johnnylemonny) examines the risks of repository instructions in One Markdown File Can Hijack Your AI Coding Agent: The Hidden Cost of Blindly Trusting AGENTS.md. The article asks what should happen when a coding agent encounters instructions in an unfamiliar working directory or a contributor's pull request. The concern is what the agent can do with its tools after it reads the text.
Give instruction files an owner
John proposes treating project instruction files as security-sensitive changes. Consider a hypothetical pull request that updates a test command and changes an instruction file in the same diff. A reviewer can check whether the new command is necessary, inspect the dependency it invokes, and ask the team responsible for development tooling to review the instruction change. That review can happen before an agent is asked to work in the checkout.
The article also proposes scanning for invisible Unicode characters. A scanner can flag text that may render differently from how it is stored, giving the reviewer a concrete line to inspect. Many ordinary instructions are visible and look plausible, so the review still needs to consider what each instruction asks the agent to do.
Limit the tools available during inspection
John also suggests separating trusted workspaces from unfamiliar downloads and restricting access to credentials. A team could give an agent an isolated checkout with access to repository files for a first pass. The team can provision additional capabilities for a later task after reviewing the commands it needs. This follows the least-privilege approach described in the OWASP guidance on prompt injection. OWASP LLM01 guidance
One useful review question is whether the same permissions are necessary to explain a pull request and to run its setup. Explaining the diff generally needs the changed files and their context. Running setup may write files, resolve dependencies, or connect to a service. Giving each stage its own permissions makes those additional capabilities an explicit decision.