Skip to content
IAM Insights

Briefing · Paper · source · updated · Boston Identity

The commonest credential leak in AI agent skills is a debug print the framework hands to the model

Ten researchers sampled 17,022 agent skills from the SkillsMP marketplace and ran the suspect ones in a Claude Code sandbox loaded with fake credentials. They found 520 skills that leaked keys or tokens; 83 were malicious and the rest carelessly written. The biggest single cause was debug logging: the framework feeds a skill's output into the model's context, and a plain request can pull the token back out.

arXiv · Zhihao Chen, Ying Zhang, Yi Liu, Gelei Deng, Yuekang Li, Yanjun Zhang, Jianting Ning, Leo Zhang, Lei Ma, Zhiqiang Li · April 3, 2026 · read

share
4 findings5 sectionsAgentic identityAI trustNon-human identity
10,117 words. With The authors, author.
01

What's happening

Finding4
BI-FIND-2026-1253Lead finding

Information exposure, mainly from debug prints, was 1,007 of 1,371 issues in carelessly written skills, as frameworks feed a skill's output to the model.

In this study the commonest credential leak in agent skills was an ordinary debug print. Information exposure, which the authors trace mainly to debug logging with print and console.log, made up 1,007 of the 1,371 issues in carelessly written skills (73.5%), because agent frameworks capture a skill's output and put it in the model's context window, where the authors say a logged credential can be retrieved with a plain-language request. Their example is a Google Workspace skill that printed OAuth access and refresh tokens, which they pulled back out through indirect prompt injection. Run in Claude Code sandboxes with mock credentials, 466 of the 520 leaking skills (89.6%) leaked during normal use without elevated privileges, and stdout carried the leak in 394 of the 520 (75.8%).

high confidencebest source: independent researchobserved Apr 2026EvidenceSection 3RQ3: 89.6% exploitable at runtime
flag a problem with BI-FIND-2026-1253
BI-FIND-2026-1254

Of 520 skills that leaked credentials, 397 leaked only when their plain-language instructions and code were read together, the authors found.

Of 17,022 skills sampled from SkillsMP's 170,226, 520 (3.1%) leaked credentials, and the authors judged 437 of them careless and 83 malicious. In 397 of the 520 (76.3%) the leak shows only when the skill's plain-language instructions and its code are read together, for instance an instruction that has the agent pass a user's credentials to a function that quietly sends them elsewhere. "Only 20.6% involve code-only leakage" that conventional static analysis would catch, the authors write, and 16 skills leaked through the instructions alone.

high confidencebest source: independent researchobserved Apr 2026EvidenceRQ1: 520 of 17,022 skills leak credentialsStudy design
flag a problem with BI-FIND-2026-1254
BI-FIND-2026-1255

Credentials removed from 107 upstream repositories after the authors' disclosure stayed live in over 50 forks, because forks do not sync deletions.

After the authors' disclosure, credentials removed from 107 upstream repositories stayed live in over 50 independent forks, because "Downstream forks do not synchronize" deletions. A malicious trading skill that maintainers banned still had 4 forks carrying its payload. SkillsMP took down all 83 malicious skills, but a secret that has reached a fork stays exposed until the credential itself is rotated, which we take to be the fix that holds.

high confidencebest source: independent researchobserved Apr 2026EvidenceRQ3: 89.6% exploitable at runtime
flag a problem with BI-FIND-2026-1255
BI-FIND-2026-1256

In 71.96% of hardcoded-credential cases the commit messages mention an AI coding assistant, though nobody tested whether the assistant put the key there.

In 71.96% of the hardcoded-credential cases, the skill's GitHub commit messages mention an AI coding assistant such as Copilot, Claude or ChatGPT. From that, the authors suggest coding assistants "do not enforce secure credential management" and may spread the habit at scale. The signal is only a name in a commit message, and nobody tested what the assistants write. It shows these skills were often built with AI help and leaves open whether the assistant put the key there.

medium confidencebest source: independent researchobserved Apr 2026EvidenceSection 3
flag a problem with BI-FIND-2026-1256
02

Section by section

5

showing 5 of 5

[1]

Study design: 17,022 SkillsMP skills, static filter, sandbox, manual labels

The authors

Agentic identityAI trust

The authors took a 10% sample (17,022) of the 170,226 skills on SkillsMP as of 12 February 2026 and narrowed it with keyword, code-structure and instruction-text rules to 3,156 candidates. Those ran in Docker sandboxes driving Claude Code with mock credentials, under ordinary and adversarial prompts; 1,427 were flagged, and three reviewers labelled 520 as leaking. Claude Code was chosen because the skills format began there.

technical artifactfrom published text + figures

[2]

RQ1: 520 of 17,022 skills leak credentials; leakage is cross-modal

The authors

Agentic identityNon-human identity

The 520 leaking skills carry 1,708 issues. The authors judge 437 of the skills careless and 83 malicious; Python accounts for 60% and web scraping is the commonest job. In 397 skills (76.3%) the leak shows only when the plain-language instructions and the code are read together, while 107 leak through code alone and 16 through the instructions alone.

technical artifactfrom published text + figures

[3]

RQ2: ten leakage patterns, four negligent and six malicious

The authors

Agentic identityNon-human identityAI trust

Ten leak patterns emerge, four careless and six malicious. Information exposure, mostly from debug logging, is 1,007 of the 1,371 careless issues (73.5%), since agent frameworks pass a skill's output into the model's context. In 71.96% of hardcoded-credential cases the GitHub commit messages mention an AI coding assistant such as Copilot, Claude or ChatGPT. Of the malicious skills, 37.3% chain techniques, most often obfuscating a payload in Base64 and then running remote code.

technical artifactfrom published text + figures

[4]

RQ3: 89.6% exploitable at runtime; forks outlive remediation

The authors

Agentic identityNon-human identity

In the sandbox, 466 of the 520 skills (89.6%) leaked a credential during normal use with no elevated privileges; the other 54 hold hardcoded secrets. Stdout carried leaks in 394 skills (75.8%), files in 97 and network calls in 68. After disclosure, credentials removed from 107 upstream repositories stayed live in over 50 forks, and SkillsMP took down all 83 malicious skills.

technical artifactfrom published text + figures

[5]

Discussion and threats to validity

The authors

Agentic identityAI trust

Frameworks, the authors argue, should run the model's reasoning and the skill's code with separate memory and network access, and strip credential patterns from output before the model sees it. Developers should scope credentials tightly and make secret scanning a required step before publishing. Their stated limits: one marketplace, code analysis only within single Python and JavaScript functions, and non-deterministic model behaviour.

opinionfrom published text

Terms used

Agent Skills
Open format for packaging instructions, scripts and resources as a directory with a SKILL.md that agents load on demand.
SkillsMP
Community marketplace that aggregates agent skills from public GitHub repositories.
OAuth
The web's standard framework for delegated authorization — letting one application act at another on a user's (or machine's) behalf without sharing passwords.
Refresh token
An OAuth 2.0 credential issued with an access token that the client presents only to the authorization server to get a new access token of identical or narrower scope.
Prompt injection
Hiding instructions in text an AI model reads, such as an email or a web page, so the model does something its operator never asked for.
Docker
A container runtime that runs software in isolated environments that can be started, used and destroyed.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity