A git branch can be named after a commit hash. Git will pick the branch. That is the whole attack, and it reached four coding agents.

On 17 September AIR Security published Plugin4Shell. Claude Code, OpenAI Codex, GitHub Copilot and Gemini CLI all install marketplace plugins by pinned commit SHA — the control most of us stopped thinking about years ago. None of the four checked that the checkout landed on the pin.

What this changes for anyone running agents in the EU:

1. The pin is not the control. An attacker who owns the plugin repo creates a branch whose name is the 40-hex pinned SHA. Git resolves a ref before an object, checks out the branch, and prints "refname is ambiguous" as a warning. Your lockfile still reads correct.

2. It is zero-click because of the update path, not the install. When a marketplace bumps its pinned SHA, the agent re-runs that checkout in the background. Nobody clicks anything.

3. Two of the four are fixed: Claude Code 2.1.179 and Codex 0.146.0. GitHub Copilot has shipped no patch. Google deprecated Gemini CLI rather than fix it. AIR found the bug in May and disclosed it in June.

4. The mitigation that actually shipped is at the forge. GitHub rejects a 40-hex branch name outright. Bitbucket and self-hosted git do not, and Anthropic's own documentation lists both as valid marketplace backends. Your git host is a security control now, and most teams picked it for other reasons.

5. In Germany this is not a vendor problem you get to wait out. § 30 BSIG names supply chain security, including the security aspects of your relationships with direct suppliers, among the measures you owe. § 38 makes the management body approve them, oversee them and carry the liability. NIS2UmsuCG has been in force since 6 December 2025, across roughly 29,500 entities. Nothing in it pauses because Microsoft has not patched.

My Monday: one line after every marketplace checkout — git rev-parse HEAD, compared against the pinned SHA, abort on mismatch. Then a second look at which host each marketplace actually lives on.

A pin is not a check. It is a statement of intent that nothing in the chain confirmed.

Which of your agents checked out something nobody verified?

#AgenticAI #NIS2 #DevSecOps #SupplyChainSecurity #EUTech