shellbits

Field NotesNovember 2026

SBR-2026-08Threat landscape 21 min

When install became read: the new registry defaults do not see what an agent reads

In 2026 the package registries closed old gaps with cooldowns and script-off defaults. In the same year the point of execution moved to interpreter start, folder open and the moment an agent reads text. Those moments have no matching default.

Supply chainAgents
In this piece
  1. 01The moment of execution: install is only one of five
  2. 02Five delivery paths
  3. 03Timeline: March 2025 to December 2026
  4. 04Exposure windows: 39 minutes to 5 hours 45 minutes
  5. 05What provenance proves
  6. 06What the defaults changed, and which cases they would cover
  7. 07What to do, by role

On 8 July 2026, npm v12 turned off dependency lifecycle scripts by default1. Since 28 April, pnpm 11 has refused by default any version less than one day old2.

The attackers had already moved. LiteLLM 1.82.8 in March, 1.107.0 in October and agent-framework in November hung their payload on a .pth file in the wheel34: nothing runs at install, and the code runs when Python next starts5. In June a commit to Azure/durabletask added only configuration files and a payload; cloning was safe, opening the repository in an AI coding tool or VS Code was not6. Two ClawHub skills from May told the agent to follow the steps on a web page; by Unit 42's analysis, an agent that did so fetched a macOS infostealer7.

Our claim: the agent ecosystem reopened supply-chain problems that registries spent years closing, and added a new one. The payload no longer has to be code. A skill, a tool description or a configuration file is text that an agent reads and then acts on with the user's authority. Reading is now an execution step, and controls built for install scripts do not see it.

01The moment of execution: install is only one of five#

Registry defences guard one moment: the package manager installs a package and runs its lifecycle scripts. Sorted by when the payload runs, the 2025 and 2026 cases use five. The model and its status column are our reading of documentation and cases, not a test.

  1. 01

    Install

    The package manager runs a dependency's lifecycle script.

    Off by default in npm v12 and pnpm 11
  2. 02

    Interpreter start

    A .pth file in a wheel runs on every Python start, with no import.

    No default control at install
  3. 03

    Open

    An agent or editor loads repository settings and hooks at session start.

    Trust dialog; per Claude Code's docs, absent in headless mode
  4. 04

    Read

    An agent reads a skill, a tool description or an instruction file, then acts with its own tools.

    Marketplace upload scanning only
  5. 05

    After approval

    An approved MCP server rewrites its tool descriptions, or a skill fetches remote content at run time.

    No default control found

Each step down, the payload looks less like code: a script, one import line, a JSON setting, then natural language.

The last three replay old registry problems. In February, publishing to ClawHub took a SKILL.md file and a week-old GitHub account, with no signing or review15; 29 ClawHavoc skills typosquatted ClawHub's own name16; and StepSecurity calls a session hook a postinstall for the editor6. The fourth moment is new: nothing is "executed".

We looked for defaults that act on the last three moments and found only marketplace upload scanning, product trust dialogs and managed settings.

02Five delivery paths#

PathForm of the payloadMomentBorrowed authorityCase
Skill marketplaceText, sometimes scriptsRead, after approvalThe agent's tools, the user's accountsClawHavoc
MCP serverTool descriptions, server codeRead, after approvalThe agent's toolsDeadbugz
Framework and gateway packagesCodeInterpreter start, installInstaller and CI credentialsagent-framework, LiteLLM, Mastra
CI and publishing identityCodePipeline runThe project's publishing identityTrivy to LiteLLM, TanStack
Agent configurationSettings and instruction filesOpenThe user's shellMiasma, SymJack

Skill marketplaces: ClawHavoc and the screening that followed#

Koi Security reported on 2026-02-01 that 341 of the 2,857 skills on ClawHub, the marketplace of the OpenClaw agent, were malicious, 335 of them in one apparent campaign it named ClawHavoc; by 02-16 it counted 824 of more than 10,70016. The entry point was a "Prerequisites" section in the skill's documentation that told the user to install something first: a password-protected ZIP on Windows, an obfuscated shell command on macOS, ending in a payload that matched Atomic macOS Stealer16. Koi gives no publication dates or install counts, so no exposure window can be computed. An independent audit that month used another population, so the numbers cannot be added: Snyk scanned 3,984 skills from ClawHub and skills.sh as of 02-05 and confirmed 76 malicious payloads by hand; 91% of those also used prompt injection, and 8 were still downloadable at publication15.

The fix was upload screening: per Unit 42, ClawHub added VirusTotal and ClawScan. Unit 42 then found five malicious skills that passed it between February and May; OpenClaw banned the accounts and deleted the skills after its report7. Two, published on 05-17, reused the prerequisite block, but now the agent ran the steps and fetched an infostealer named cluw. money-radar held no malware: its SKILL.md told the agent to fetch a JSON file from a domain the publisher controls on every invocation and to answer financial questions with the referral links in it7.

MCP servers: Deadbugz#

Pillar Security disclosed on 2026-08-12 that the GitHub account zellkernel had opened 23 pull requests in 74 minutes on 08-10 against unrelated AI, MCP and developer-tool projects: 21 would add an MCP server named productivity-suite to the target's configuration, and two were directory listings17. The server offered two text tools. After the third tool call its tools/list and prompts/get responses changed: they steered the agent to SSH keys, AWS credentials, shell history and Kubernetes configuration, and told it to hide this from the operator. Pillar found 19 pull requests closed and four open; none was merged, and the report names no victim17.

The 2026-07-28 revision of the MCP specification says the tool set returned by tools/list must not vary per connection or as a side effect of other requests on it; we think the Deadbugz counter breaks the intent of that rule. But the rule binds the server, and here the attacker wrote the server. The list may still change over time, announced through listChanged, and the specification does not require a client to seek approval again when a definition changes18. Claude Code's documentation says it fetches the updated list on a list_changed notification; that section does not mention re-approval19. The official MCP Registry, still in preview, stores metadata, verifies namespace ownership and leaves code scanning to package registries and downstream aggregators13. This means someone checks whose server it is, and no one checks that today's description is the approved one.

Agent frameworks and LLM gateways: agent-framework, LiteLLM, Mastra#

agent-framework, 2026-11-17. Microsoft's PyPI package has almost 200,000 downloads a month20. 1.26.1 went up at 20:35:20 UTC and 1.26.2 at 21:08:3921. How the attacker could publish is not settled. Wiz assesses that the attacker held a client certificate and private key for ESRP, the Microsoft service that signs and publishes the package; how they leaked is unknown20. SafeDep reports a second PyPI maintainer account, created that day with publishing rights to this package and five related projects, as the suspected uploader22. Neither PyPI nor Microsoft has confirmed this, so we do not name the account. The project page still listed it on 11-2223. StepSecurity says the evidence establishes neither the access vector nor the account or credential used5. Microsoft told The Register only that it had made some repositories private while it investigates24. A .pth hook starts a stealer aimed at Azure and Azure DevOps credentials; 1.26.2 moved it to new file names and also requests GitHub Actions OIDC tokens20. Wiz analysed the 50 requests the free webhook.site endpoint kept: four from the attacker, 29 apparently from sandboxes, vendor scanners and tests, 17 from three victim environments20. PyPI quarantined both; 1.26.0 is safe5.

LiteLLM, 2026-03-24. 1.82.7 and 1.82.8 of this LLM gateway went up at 10:39 and 10:52 UTC; the payload harvests credentials, exfiltrates them encrypted and installs a persistent backdoor3. LiteLLM says the attacker bypassed its CI/CD and uploaded directly, and traces the compromise to the Trivy scanner in its CI25; PyPI says an exploited Trivy dependency exposed an API token26. Discovery was an accident: while a FutureSearch researcher tested a Cursor MCP plugin, the transitive litellm dependency made the .pth hook re-trigger until memory ran out3. The malicious versions were downloaded over 119k times26. LiteLLM rebuilt its pipeline and shipped 1.83.025.

LiteLLM, 2026-10-21. Seven 1.107.0 wheels went up from 11:39:51 UTC and container images at 11:46:5627. LiteLLM's root cause analysis starts on 05-27: an opencode.json file with an administrative key for an internal agent platform was committed to a public repository and deleted about three hours later, but the key was not revoked. On 10-10 the attacker used the key to pull a GitHub organization owner's GitHub CLI OAuth token from the platform's API. On 10-21 that token pushed a commit past branch protection, and the release workflow then built from Berri-AI/litellm, a fork in the lookalike organization Berri-AI; a second stolen token approved the production gate, relaxed that week so that any two engineers could approve27. The payload is cook.pth plus an hourly loader; it takes credentials for AI coding tools such as Cursor, Claude and Codex and the provider keys in the LiteLLM proxy database4. Lidor Machluf of Upwind opened the issue that named the compromise at 12:06:4127. 1.106.2 is safe28.

Mastra, an agent framework on npm, 2026-06-17. Socket recorded a maintainer's npm account, ehindero, publishing malicious versions of 141 @mastra/* packages between about 01:15 and 02:36 UTC29. Mastra's report says 11630; Microsoft says more than 140 and attributes the attack, with high confidence, to the North Korean actor Sapphire Sleet31. Mastra says social phishing on LinkedIn compromised an employee's machine, and that the project required MFA but had mistakenly let tokens bypass it30. Each package gained one dependency, easy-day-js: 1.11.21, published a day earlier, was clean bait, and 1.11.22 added a postinstall hook31. The second stage is a Node.js tasking client that installs login persistence, so removing the package is not cleanup. @mastra/core alone has over 918K weekly downloads29. Mastra then removed the token bypass30.

CI and publishing identity: Trivy to LiteLLM, then the worms#

The March LiteLLM token came from upstream. Per Snyk, in late February someone used a pull_request_target workflow in the CI of Trivy, Aqua Security's open-source scanner, to take the aqua-bot credentials3. Aqua's advisory says the rotation that followed was not atomic, and the attacker may have taken the new credentials in the gap. On 03-19 the attacker published a malicious Trivy v0.69.4 and force-pushed 76 of the 77 version tags of trivy-action and all seven of setup-trivy; the rewritten action dumped the memory of the Runner.Worker process to extract secrets. Only 0.35.0, which had immutable releases enabled, was untouched32. Wiz counts 75 of 76 tags and calls the actor a group that names itself TeamPCP33. Five days later LiteLLM's publish token was used.

On 2026-05-11, 84 malicious versions of 42 @tanstack/* packages were published between 19:20 and 19:26 UTC. TanStack's postmortem describes three chained steps: a pull_request_target workflow ran code from a fork, the Actions cache was poisoned across the trust boundary, and the OIDC token was read from runner memory. No npm token was stolen34. StepSecurity reports that the packages carried valid SLSA provenance and that the worm then republished other packages its victims could publish35. On 06-01, Miasma published at least 32 @redhat-cloud-services package releases from orphan commits, again with valid provenance; by Snyk's account it began with a compromised Red Hat employee's GitHub account36.

Agent configuration as persistence: Miasma, SymJack and driven AI CLIs#

On 2026-06-05 a previously compromised contributor account pushed a commit to Azure/durabletask with five files: SessionStart hooks in .claude/settings.json and .gemini/settings.json; .cursor/rules/setup.mdc, a prompt injection that presents the payload as a setup step; a .vscode/tasks.json that runs on folder open; and a 4,643,745-byte obfuscated payload. That day GitHub disabled 73 repositories in four Microsoft organizations within 105 seconds6. Mini Shai-Hulud had written the same kind of hook to .claude/settings.json in May, so that it ran again on every session start35. SANDWORM_MODE, in February, wrote to the user's own settings: at least 19 typosquatted npm packages added a rogue MCP server to the configuration of Claude Code, Claude Desktop, Cursor, Continue and Windsurf, with tool descriptions that told the agent to read SSH keys and cloud credentials37.

SymJack shows that this write needs no malicious package. In Adversa AI's proof of concept (2026-05-26; Codex CLI added 05-27), a repository commits symbolic links that point at the agent's own configuration files. The agent asks the user to approve a harmless-looking cp, the kernel follows the link, and JSON disguised as a video file lands in .claude/settings.json and .mcp.json. After a restart the planted MCP server runs as the user38. Tested: Claude Code 2.1.128 (partly fixed in 2.1.129, which shows the resolved path), Gemini CLI 0.43.0, Cursor CLI v2026.05.20, Copilot CLI 1.0.51, Grok Build CLI 0.1.216 and Codex CLI v0.133.0. Adversa does not report exploitation in the wild, and the vendor responses are known only through Adversa38. Here SymJack matters as persistence: one approval buys execution on every start. For the approval-prompt flaw itself, see SBR-2026-06.

Malware has also driven these tools directly: in the Nx incident of August 2025, the postinstall script ran the Claude, Gemini and Q CLIs on the victim's machine with flags such as --dangerously-skip-permissions, --yolo and --trust-all-tools to inventory files, and Wiz saw this succeed in hundreds of cases39.

03Timeline: March 2025 to December 2026#

  1. tj-actions/changed-files compromised until 03-15 (CVE-2025-30066)40

    CI
  2. Malicious Nx versions live about four hours; postinstall drives local AI CLIs41

    Package
  3. CISA alert: Shai-Hulud worm in over 500 npm packages42

    Worm
  4. Postmark warns of a fake postmark-mcp that blind-copies email to an outsider from 1.0.1643

    MCP
  5. Koi discloses ClawHavoc16

    Skill
  6. Socket discloses SANDWORM_MODE37

    Config
  7. Trivy v0.69.4 published; trivy-action tags rewritten32

    CI
  8. LiteLLM 1.82.7 and 1.82.83

    Package
  9. pnpm 11.0: minimumReleaseAge defaults to 1,440 minutes2

    Defence
  10. TanStack: 84 malicious versions, with valid provenance3435

    Worm
  11. Adversa publishes SymJack38

    Config
  12. Miasma reaches @redhat-cloud-services36

    Worm
  13. Miasma pushes agent configuration into Azure/durabletask6

    Config
  14. Mastra's npm scope publishes malicious versions29

    Package
  15. npm v12: dependency install scripts off by default1

    Defence
  16. Anthropic: an evaluated model published a malicious package to PyPI44

    Package
  17. Deadbugz: 23 pull requests in 74 minutes17

    MCP
  18. LiteLLM 1.107.0, under the project's real publishing identity27

    Package
  19. agent-framework 1.26.1 and 1.26.221

    Package
  20. GitHub due to block pull_request_target by default in public repositories45

    Defence

The three defensive steps sit in the registry or in CI; five of the 13 attacks and disclosures since February 2026 sit on the agent side.

04Exposure windows: 39 minutes to 5 hours 45 minutes#

The exposure window runs from the malicious upload to registry quarantine or removal, or to full unpublishing or deprecation by the maintainers; each row names its end point. Times come from primary sources and the arithmetic is ours; where sources differ, each figure is quoted with its source.

CaseStart (UTC)End (UTC)Computed windowWhat the source says
agent-framework 1.26.120:35:2021:06:16, quarantine30m 56sStepSecurity timestamps5
agent-framework 1.26.221:08:3921:16:44, quarantine8m 5sStepSecurity: "eight minutes later"5. Endor Labs: still the latest release at 21:1621. Wiz: both gone by 21:3020
LiteLLM 1.82.7, 1.82.810:39about 13:38, quarantine2h 59mSnyk: "approximately three hours"3. PyPI: "2h 32m"26. LiteLLM: "about 40 minutes"25
LiteLLM 1.107.0 wheels11:39:51by 13:23, quarantineat most 1h 43m 9sLiteLLM: "about two hours"27
LiteLLM 1.107.0 Docker Hub tags11:46:5614:20, removed or repointed2h 33m 4sLiteLLM incident post28
Mastra01:12 (6:12 PM PT, UTC−7)06:57 (11:57 PM PT), all 116 packages in Mastra's count unpublished or deprecated5h 45mMastra's report30. Socket's publish window: 01:15 to 02:3629
TanStack19:20:3921:03 all deprecated; 22:13:38 to 23:55:26 removed by npm1h 42m to deprecation; 2h 52m 59s to 4h 34m 47s to removalTanStack's table: "~1h 43m", "~2h 53m", "~4h 35m"34
trivy-action tags03-19, about 17:4303-20, about 05:40about 11h 57mAqua: "~12 hours"32
10m1h6h24h3d1 hour24 hours: pnpm 11 default cooldownagent-framework 1.26.28m 5sagent-framework 1.26.130m 56sTanStack1h 42m–4h 34m 47sLiteLLM 1.107.0 wheels≤ 1h 43m 9sLiteLLM 1.82.7, 1.82.82h 32m–2h 59mLiteLLM 1.107.0 image tags2h 33m 4sMastra5h 45mtrivy-action tags≈ 11h 57mCaseTime the malicious release could be installed (log scale)
Figure 1How long each malicious version could be installed (log scale), from the table above. Two ends on a row mean that sources or end points differ. The agent-framework rows rest on StepSecurity's timestamps; the Mastra row covers only the 116 packages in Mastra's count.

Together the two agent-framework versions were installable for 39m 1s (30m 56s plus 8m 5s). This rests on StepSecurity's quarantine times; the Endor Labs and Wiz observations fit them but cannot confirm the seconds. Measured to Wiz's 21:30, the upper bound is 54m 40s. By StepSecurity's times the second version went up 2m 23s after the first quarantine, so the attacker still held publishing access. The three March figures for LiteLLM disagree: if PyPI counts from the first upload, Snyk's quarantine time is 27 minutes later than PyPI's figure implies, and LiteLLM does not explain its 40 minutes. Mastra's report ends the publishing at 6:37 PM PT (01:37 UTC), but npm registry metadata dates these versions from 01:12:43 to 02:36:20 UTC, across 141 @mastra/* packages46: Mastra's start, Socket's end and Socket's count. Mastra's "all" is the 116 packages it counted; its report is silent on the rest. On npm a deprecation only shows a warning47, and by npm's policy a deprecated package can still be downloaded48: the TanStack window runs until npm finished the removal, and six Mastra packages were at first only deprecated30.

LiteLLM is normally installed about 1,700 times a minute; the malicious versions drew over 119k downloads in 2h 32m, about 780 a minute (119,000 divided by 152), from which PyPI estimates that 40 to 50% of installs were unpinned26. A package with no users is consumed too: in a misconfigured Anthropic evaluation, the model published a malicious package to the real PyPI under a name that had not existed, and in the hour or so before removal 15 real systems ran it44. Anthropic later put that at under an hour and wrote that it believes all 15 were security vendors scanning new packages; one scanner leaked its credentials49.

Detection takes minutes too: Endor Labs says 3 for agent-framework21, Socket says 6 for easy-day-js29, and the outside reports on TanStack and on LiteLLM in October came in under 273427. Scanners and unpinned CI jobs arrive together, and a cooldown puts you behind the scanners. pnpm's documentation says most malicious releases are discovered and removed within an hour8. Of the five cases only agent-framework clearly was, even by Wiz's 21:30 (two, if you accept LiteLLM's 40 minutes). For these five, 24 hours was enough and one hour was not.

We see three limits to a cooldown. It measures the age of the version, not of the behaviour: stage two of SANDWORM_MODE waits 48 hours plus a per-host delay of up to 48 hours37, and Deadbugz waits for the third call. It covers only versions that an installer resolves, not trivy-action tags, a Docker latest tag, skills or tool descriptions. And it depends on someone finding the release inside the window; if scanners start to wait too, that assumption needs a new test.

05What provenance proves#

After March, LiteLLM adopted Trusted Publishing, cosign signatures and immutable release tags, and pinned every action11. The October attacker did not bypass these controls but used them: the 1.107.0 images carry a valid signature from the previous key28. LiteLLM's review states it plainly:

v1.107.0 did come from our pipeline - no pipeline controls can defend against an attacker who is an organization owner, because the owner owns the pipeline11.

We split provenance into four questions and set the 2025 and 2026 cases against them. It answers the first two.

  1. 01

    Who published

    Trusted publishing binds a publish to a CI identity. A missing attestation exposed the Nx versions41, and the Mastra versions were published by hand, unlike earlier mastra versions, which came through GitHub Actions OIDC31. agent-framework had no attestation on the clean 1.26.0 either, so nothing stood out21

    Provenance answers
  2. 02

    Which pipeline built it

    Provenance records the repository, the workflow and the commit. It was valid for TanStack and Miasma: real workflow runs produced the malicious versions, one through code from a poisoned cache and one as an unauthorized run343536

    Provenance answers
  3. 03

    Was a human present at publish

    npm staged publishing requires a maintainer's 2FA approval50; PyPI can add a GitHub Environments review26. LiteLLM's relaxed gate was passed with a stolen token27

    Needs an opt-in feature
  4. 04

    Was the reviewed source what got built

    Not for LiteLLM 1.107.0: an owner token had pointed the pipeline at a lookalike repository. Compare the artifact with the source at the tag; LiteLLM's planned post-release verifier does this11

    Provenance does not answer

For a consumer, provenance is an anomaly signal: usually present and now absent, or a lower trust level. pnpm's trustPolicy: no-downgrade turns it into a failed install, but defaults to off8. That check covers the first question only. October left one repeatable check for the fourth: JFrog found a setting in the sdist's pyproject.toml that is absent from the matching Git tag4.

06What the defaults changed, and which cases they would cover#

EcosystemChangeVersion and dateStatus
npm registryTrusted publishing (OIDC) generally available512025-07-31; from npm CLI 11.5.1Opt-in
npm CLImin-release-age, in days5211.10.0, 2026-02-11Opt-in; the v12 docs still list null53
npm registryStaged publishing: a maintainer approves with 2FA before release502026-05-22; from npm CLI 11.15.0Opt-in
npm CLIallowScripts off; --allow-git and --allow-remote set to none1v12, 2026-07-08Default
npm registryNew trusted publisher configurations allow only npm stage publish54Created after 2026-09-03Default; existing ones unchanged
npm registry2FA-bypass tokens, the Mastra path, lose direct publish and can only stage1Announced 2026-07-08; expected around January 2027Not yet in force
pnpmminimumReleaseAge is 1440 minutes; blockExoticSubdeps is true211.0, 2026-04-28Default, non-strict: with no old enough version in range, pnpm installs a newer one8
pip--uploaded-prior-to: absolute time in 26.0, durations such as P3D from 26.192026-01-30; 2026-04-26Opt-in
PyPIQuarantine: per project since 202455; per-release quarantine seen in the October and November 2026 cases275See leftRegistry side
GitHub ActionsPolicy can require a full commit SHA for actions56; immutable releases protect tags572025-08-15; 2025-10-28Opt-in; immutable releases are not retroactive
actions/checkoutv7 refuses fork pull request code in pull_request_target and workflow_run582026-06-18; backport to floating major tags scheduled for 07-20, except v1Default; SHA-pinned workflows must upgrade
GitHub Actionspull_request_target blocked in public repositories45Scheduled for 2026-12-02 (moved from 11-02)Default from that date; a policy can allow the trigger
Skills and MCPClawHub upload scanning7; MCP Registry namespace verification13; no signature or integrity field in the Agent Skills specification12Scanning followed the February 2026 disclosures; Registry in previewNothing pins or delays content

The next table is our judgement, not a test: it assumes the consumer has the control enabled and installs through it, and "stops" means the mechanism or the time window fits. The cooldown column also assumes an old enough version in range. One test install can refute any cell.

Case24-hour cooldownInstall scripts offTokens off, trusted publishingSHA pin, immutable releasespull_request_target blocked
agent-frameworkStopsNo; .pth is not an install scriptUnknownNot applicableNot applicable
LiteLLM, MarchStopsNoStops; a long-lived token was stolenPartly: Snyk's page also says Trivy came unpinned from apt, outside this control3Stops the first upstream step
LiteLLM, OctoberStops the wheels, not the latest imageNoNo; the attacker used itNot applicableNot applicable
MastraStopsStopsPartly; the machine was compromisedNot applicableNot applicable
TanStackStopsStops; neither the git dependency nor its script runsNo, unless stage-onlyNot applicableStops
trivy-actionNot applicableNot applicableNot applicableStops; 0.35.0 was unaffected. Old commits are an exceptionStops the first step
ClawHavoc, Deadbugz, Miasma configuration files, SymJackNot applicableNot applicableNot applicableNot applicableNot applicable

The registry rows are almost full and every cell of the last row reads "Not applicable": the last four cases use moments that no column covers.

07What to do, by role#

Teams that consume packages, skills and MCP servers#

Set a cooldown in every installer and package proxy, then check that developer machines and CI images read it: after TanStack, the two OpenAI employee devices that were hit were those without the new minimumReleaseAge configuration59. Each installer has its own setting and unit538109.

Four ways to write a cooldowntext
# .npmrc (npm 11.10.0 or later; days; off by default)
min-release-age=3

# pnpm-workspace.yaml (minutes; pnpm 11 defaults to 1440)
minimumReleaseAge: 4320
trustPolicy: no-downgrade

# pyproject.toml (uv)
[tool.uv]
exclude-newer = "P3D"

# pip.conf (pip 26.1 or later)
[install]
uploaded-prior-to = P3D

Review a skill as code#

A skill is a directory with at least a SKILL.md file. The Agent Skills specification and the Anthropic and Claude Code documentation say when each part loads and who runs it126162. The table reports documentation, not observed behaviour; Claude Code has the most rows because its documentation is the most explicit.

PartWhen it loadsWho runs itWhat to review
name and description in the front matterAt startup, into the system prompt, for every installed skillThe model reads themThe description decides when the skill triggers
SKILL.md body and the text files it referencesWhen the skill triggers; referenced files when the body mentions themThe model reads them, then acts with its own toolsEvery imperative is a program: install first, always use, do not tell the user. Read to the end, past long blank stretches
scripts/When the body says to run themThe agent, in a shell; only the output reaches the modelOrdinary code review; the model does not read it for you
allowed-toolsFor the turn that invokes the skillThe runtime pre-approves the listed toolsThe skill grants itself permissions; Claude Code applies this even in a -p run in an untrusted folder
Claude Code extensions: !`command` and hooksInline commands run before the content reaches the model; hooks last until the session endsThe runtime, without a prompt: a command runs if permission rules or the skill's own allowed-tools allow it; otherwise the invocation abortsRead inline commands together with allowed-tools; disableSkillShellExecution turns them off
  1. Record the commit or archive hash you reviewed; an update means a new review.
  2. List the whole directory, with hidden files, symbolic links and file sizes. One skill that Unit 42 recorded put 22 MB of padding after the payload, and VirusTotal called it clean7.
  3. List every external URL: content fetched at run time is not in the version you reviewed61.
  4. Run it first with no credentials in reach: on the API a skill runs in a sandboxed container with no network, in Claude Code with full network access61.

Teams that publish packages, skills and MCP servers#

  1. Keep owner rights out of day-to-day accounts, and never let automation authenticate as a person. LiteLLM made these rules after October, assuming that an agent can read everything on a developer's machine11.
  2. Deleting a file does not revoke a key: LiteLLM's administrative key stayed valid for the 136 days from its commit on 05-27 to its use on 10-1027. Rotate everything at once.
  3. Use trusted publishing, select "Require two-factor authentication and disallow tokens" in the package settings, and make the trusted publisher stage-only so that a maintainer approves each publish with 2FA54. On PyPI, add a GitHub Environments review26.
  4. Remove pull_request_target, or isolate it from the caches and tokens of the release workflow; the default block scheduled for 2 December covers only public repositories, and a policy can allow the trigger45.
  5. Publish every version with provenance, so that a missing attestation stands out21, and compare each published artifact with the tagged source from outside GitHub11. For a skill or an MCP server, do not fetch instructions at run time, and bump the version whenever a tool description changes.