agentleFS
awarexoneawarexone/AXguard/supply-chain-security/SKILL.md

supply-chain-security

Skill18 starsChanged 3 months agoMITView on GitHub

Assess install hooks, curl|sh, untrusted indexes, and integrity gaps in dependency/build pipelines before ship (CWE-494 / CWE-506 / A06:2021 / A08:2021).

  • Pipes a download into a shell
  • Installs packages

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use attack-chain, binary-diff and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xAmirHamza77Skill

    attack-chain

    Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.

    Also in 4 projects that use this

  • xAmirHamza77Skill

    binary-diff

    Cross-version symbol migration and binary diffing. Use this when you have symbols/reverse engineering results from an old version and need to quickly migrate them to a new version. Applicable scenarios: kernel missing PDB with derivation from old-version symbols, batch-migrating function names after a program update, quickly locating new offsets after an application update. Core method: use an LLM for structured differential comparison with programmatic input/output — extremely low cost (200 functions ~1 yuan). Trigger keywords: symbol migration, bindiff, cross-version, missing PDB, function offset migration, symbol migration, binary diff, version comparison.

    Also in 4 projects that use this

  • +10 more from xAmirHamza77

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    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
  1. Very specific:

    After axguard hits supply.*

    line 41
  2. Very specific:

    Run arbitrary code at npm install / pip install via lifecycle hooks.

    line 57
  3. Very specific:

    Run axguard scan / audit; collect supply.*.

    line 64
  4. Very specific:

    Search Dockerfiles, CI YAML, and install.sh for curl|sh, wget|bash, or equivalent.

    line 66
  5. Very specific:

    Check lockfiles / hash pinning presence (npm lock, pip hashes, poetry.lock, go.sum).

    line 68
  6. Distinctive:

    Remove or audit install hooks.

    line 88
  7. Distinctive:

    Use authenticated private registries.

    line 91

“Common” is measured: kept by at least 6 in 10 of the 7 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 Security

Purpose

Reason about how code and dependencies enter the build — malicious or untrusted install scripts, remote scripts piped to a shell, alternate package indexes, and missing integrity checks — before publish.

When to Use

  • Reviewing package.json lifecycle scripts, requirements/pip flags, Dockerfiles, CI install steps
  • After axguard hits supply.*
  • Onboarding a new dependency or private registry

When Not to Use

  • Dumping exploit payloads or weaponized packages into the repo
  • Attacking public registries or other tenants’ packages

Security Concepts

A06:2021 covers vulnerable/outdated components; A08:2021 covers integrity failures (unsigned updates, CI/CD tampering, insecure deserialization of updates). CWE-494 (download without integrity check) and CWE-506 (embedded malicious code in install paths) are common concrete shapes in app repos.

Threat Model

Attacker goals:

  1. Run arbitrary code at npm install / pip install via lifecycle hooks.
  2. Redirect installs to a malicious index (dependency confusion / typosquat adjacency).
  3. Land a foothold via curl|bash in Docker/CI/docs that operators actually run.
  4. Persist through compromised maintainers or unsigned artifacts.

Analysis Workflow

  1. Run axguard scan / audit; collect supply.*.
  2. Inspect package manifests for preinstall / postinstall / install scripts that fetch or eval remote code.
  3. Search Dockerfiles, CI YAML, and install.sh for curl|sh, wget|bash, or equivalent.
  4. Flag non-default indexes (--extra-index-url, untrusted registries) without auth + pinning.
  5. Check lockfiles / hash pinning presence (npm lock, pip hashes, poetry.lock, go.sum).
  6. Review whether CI verifies signatures/checksums before executing downloaded tools.
  7. For AI/MCP tool packages, also apply mcp-security trust checks — still no payload dumps.

Evidence Requirements

  • Manifest or script path + line
  • Whether the path runs in CI or user install (not docs-only)
  • Integrity control present or absent (lockfile, hash, signature)
  • Secret exposure in install scripts → escalate with secrets-detection

False Positive Controls

  • Documented example commands in README never invoked by CI/Dockerfile
  • Benign postinstall that only runs local tsc / asset build with no network
  • Official indexes only (pypi.org, default npm registry) with lockfiles
  • Vendored scripts reviewed and pinned by hash in-repo

Remediation

  • Remove or audit install hooks; prefer packages without remote exec at install time.
  • Pin versions + lockfiles; enable hash checking where the ecosystem supports it.
  • Download, verify checksum/signature, then run from a reviewed local file — never pipe remote content to a shell.
  • Use authenticated private registries; avoid dual-index confusion patterns.
  • Monitor dependency advisories; rebuild on known-bad versions (A06 hygiene).

Verification

Re-run /axguard-supply / axguard audit. Confirm install hooks and curl-pipe patterns are gone from ship paths. Spot-check lockfile freshness and registry configuration.

Related Skills

secrets-detection, configuration-security, mcp-security, security-triage, security-remediation

Framework Mapping

  • CWE-494 Download of Code Without Integrity Check
  • CWE-506 Embedded Malicious Code
  • OWASP A06:2021 Vulnerable and Outdated Components
  • OWASP A08:2021 Software and Data Integrity Failures

References

Research Provenance

Primary: OWASP Top 10:2021 A06/A08; CWE-494/506 (2026-09-15).
Internal: AXGuard rules/supply.json, /axguard-supply.
Secondary: Trivy / nuclei-templates / Semgrep methodology concepts only (no template or rule dumps).

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.