TL;DR: Persistence in AI coding agent configs gave the Shai-Hulud supply chain attack a way to replay hooks after the initial install, according to Sonar. Agent settings now need the same scrutiny as other executable trust surfaces, because repeated runs can widen credential exposure and reinfection risk.
Editorial analysis by NHI Mgmt Group, based on content published by Sonar: “Mini Shai-Hulud targets AI coding agents: what developers need to know”.
Key questions
Q: Why do poisoned dependencies create longer-lived compromise than a single install event?
A: Because the payload can write local persistence and then re-trigger whenever the developer opens an infected project.
Q: What signs show that a developer workstation has been used for AI agent persistence?
A: Unexpected session-start hooks, folder-open tasks, bootstrap scripts in agent directories, unusual downloads at project open, and credential theft from environment variables or local secret stores are all strong indicators.
A: Package-centric controls lose their main assumption: that execution starts when a dependency is installed.
Practitioner guidance
- Audit agent and editor persistence files Inspect .claude/settings.json, setup scripts, and .vscode/tasks.json across repositories for hooks that trigger on session start or folder open.
- Verify dependency provenance before execution Block unreviewed packages and watch for malicious or recently altered dependencies that can write persistence into local project settings.
- Reduce secret exposure on developer endpoints Remove reusable cloud credentials, npm tokens, SSH material, and other secrets from machines and repositories that agent tools can read.
Bottom line: AI coding agent configuration files can now act as repeatable execution paths, which changes how teams should classify developer workstation risk.
Glossary terms: Agent Session Persistence, Execution Semantics, Supply Chain Worm, Secrets blast radius
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
AI coding agent configuration is now part of the attack surface. The key governance shift is that .claude and editor task files are no longer harmless preferences; they can encode execution semantics. That collapses the old separation between tool settings and runtime behaviour, which means security teams need to classify these files alongside other controlled execution paths.
A few things that frame the scale:
- Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026.
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap, according to the State of Secrets in AppSec.
A question worth separating out:
Q: How should teams govern AI coding agents alongside secrets and supply chain controls?
A: Treat agent settings, dependency trust, and secret exposure as one control surface. If a package can alter local execution and the same session can read cloud or publishing credentials, then the risk is multiplicative. Governance should therefore combine provenance checks, secrets reduction, and persistence monitoring.
👉 Read our full editorial: Mini Shai-Hulud makes agent configs part of the attack path