agentleFS
ulises-jeremiasulises-jeremias/agent-toolkit/skills/agentic-security/supply-chain-audit/SKILL.md

supply-chain-audit

Skill18 starsChanged 3 months agoMITView on GitHub

Inspect agent supply chain — skills/plugins/MCP/npm/py packages, hooks, scripts, remote prompts,

  • Pipes a download into a shell
  • Reads credentials
  • Deletes or force-pushes

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Check for capabilities/upstream.lock or embedded checksum (per #370) if available

    line 74
  2. Very specific:

    Verify upstream.license matches repo LICENSE (check gh api repos/<owner>/<repo>/license and per-subdir LICENSE if ambiguous — e.g., …

    line 78
  3. Very specific:

    If AGPL (e.g., oxsecurity/megalinter) → prefer PIN EXTERNALLY, not vendored (avoid MIT contagion)

    line 79
  4. Very specific:

    Document distribution.redistribution_allowed and attribution_file

    line 80
  5. Very specific:

    Never auto-merge PRs with security.shell: true or network: true or mcp: [community] without review

    line 133

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Supply-Chain Audit

Inspect a capability's supply chain before adopting — validate provenance, pins, hashes, licenses, network, and permissions.

Use when

  • Reviewing a PR that vendors a new third-party skill/plugin/MCP
  • Deciding ADOPT vs PIN EXTERNALLY vs REJECT for an upstream
  • Auditing existing skills/, mcp/registry/, plugins/, hooks, or npm/py deps

Inputs

  • Capability path (e.g., skills/design/frontend-design/, mcp/registry/github.yaml, plugins/agent-toolkit-core/.claude-plugin/plugin.json)
  • Optional: capabilities/upstream.lock or SKILL.md frontmatter upstream block

Steps

1. Provenance

Check upstream: {repository, path, ref, license}:

  • ref must be immutable tag or 40-char SHA — never main/master/latest
  • license must be SPDX or unknown (if unknown → prefer PIN EXTERNALLY, document why)
  • Compare ref to upstream latest (gh api repos/<owner>/<repo>/commits or git ls-remote) — flag drift
  • For vendored content, verify LICENSE.txt/NOTICE preserved alongside

Host users: apply the checks above by reading SKILL.md frontmatter and capabilities/upstream.lock (when present). Do not rely on repo-root scripts/ — those paths are not installed with the toolkit.

Maintainer / repo checkout / CI only:

python3 scripts/validate-upstream.py --check
python3 scripts/validate-upstream.py --strict  # flags missing provenance for third-party-looking paths

2. Version pins & hashes

  • MCP: mcp/registry/*.yaml package must be pinned (tag/SHA), not latest
  • npm/py: package.json/pyproject.toml pins, no unpinned *
  • Docker (MegaLinter): image sha256: pinned
  • Hooks: command array, no curl | bash, no npx without pin
  • Check for capabilities/upstream.lock or embedded checksum (per #370) if available

3. Licenses & redistribution

  • Verify upstream.license matches repo LICENSE (check gh api repos/<owner>/<repo>/license and per-subdir LICENSE if ambiguous — e.g., nextlevelbuilder/ui-ux-pro-max-skill gallery/cli)
  • If AGPL (e.g., oxsecurity/megalinter) → prefer PIN EXTERNALLY, not vendored (avoid MIT contagion)
  • Document distribution.redistribution_allowed and attribution_file

4. Security surface (static, never exec untrusted code)

Scan for:

shell execution: sh -c, bash, curl, wget, npx, npm, pip, uv, docker run
network: curl/wget/fetch, raw.githubusercontent.*main, npx download
MCP: mcp/registry auth.env secrets not values, remote vs local servers, OAuth
env: credentials exposure, .env.example vs .env, secrets: [] in receipts
filesystem: writes outside workspace, destructive mv/rm -rf
git: hooks, subagents, default-branch push
hooks: blocking/destructive classification per schemas/hook.schema.yaml

Host users: perform the static scan with Grep/Read against the patterns above (do not execute untrusted code). Cite file:line evidence in the report.

Maintainer / repo checkout / CI only (repo-root tooling is not on the host install):

./scripts/audit-capability.vsh <path>            # per-capability
./scripts/audit-capability.vsh skills/ mcp/      # whole repo

5. Trust tier & recommendation

Map to tiers from docs/TRUST.md:

TierGate
first-partypasses, no special gate
verifiedALLOW with PR diff + license/security check → human review
communityCAUTION — require explicit opt-in, review dangerous_permissions
experimentalBLOCK default — require isolated test

Emit recommendation: ALLOW / CAUTION / BLOCK with evidence citations.

Outputs

  • supply-chain-report.md:
## Supply-chain report — <capability>
- Provenance: repo/path@ref (SHA), license SPDX, checksum
- Pins: versions/hashes (pinned vs mutable)
- Licenses: SPDX, redistribution_allowed, attribution_file
- Security surface: scripts/shell/network/mcp/hooks/dangerous_permissions (list + lines)
- Trust tier: first-party|verified|community|experimental
- Recommendation: ALLOW|CAUTION|BLOCK — rationale with line citations

Human gates

  • Never auto-merge PRs with security.shell: true or network: true or mcp: [community] without review
  • Secrets via ${ENV_VAR} placeholders only — never log values

Related

  • docs/TRUST.md#provenance (schema + matrix)
  • schemas/upstream.schema.json, schemas/skill-md-frontmatter.schema.json
  • Repo checkout/CI only: scripts/validate-upstream.py, scripts/audit-capability.vsh (not installed on host)
  • skills/agentic-security/mcp-audit (MCP-specific)
  • skills/agentic-security/owasp-agentic-review (agentic threats)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.