Supply chain forensics

From jmagly/aiwg · View interactive version

Supply chain forensics is an AI agent skill from the GitHub repository jmagly/aiwg. SBOM analysis, build pipeline forensics, and dependency verification covering package integrity, build reproducibility, and CI/CD pipeline tampering

How to use this skill

Skill file

supply-chain-forensics

Investigates software supply chain compromise across three vectors: dependency integrity (packages and libraries), build pipeline tampering (CI/CD systems and build scripts), and SBOM-based composition analysis. Maps findings to SLSA (Supply-chain Levels for Software Artifacts) and MITRE ATT&CK techniques for supply chain attacks.

Triggers

Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):

Purpose

Supply chain attacks compromise software before it reaches users — through malicious packages, tampered build scripts, or poisoned CI/CD pipelines. These attacks are difficult to detect because the delivered artifact may appear legitimate. This skill applies systematic verification of components and build processes to identify tampering.

Behavior

When triggered, this skill:

  1. Identify project type and package ecosystem:
  1. SBOM generation and analysis:
  1. Dependency integrity verification:

```bash

npm audit --json 2>/dev/null | jq '.vulnerabilities | keys[]'

```

```bash

pip hash --algorithm sha256 <package>.whl

```

```bash

go mod verify

```

  1. Typosquatting and dependency confusion detection:
  1. Build script analysis:

```bash

grep -rE 'curl.(sh|bash)|wget.sh|base64.decode|eval.\$\(' .github/workflows/

```

  1. CI/CD pipeline tampering indicators:
  1. Build reproducibility check:
  1. SLSA level assessment:
  1. Write findings document:

Usage Examples

Example 1 — Full supply chain audit

supply chain forensics

Runs against the current working directory.

Example 2 — SBOM analysis only

sbom analysis ./sbom.json

Example 3 — Dependency audit for specific ecosystem

dependency audit --ecosystem npm

Example 4 — CI/CD pipeline investigation

build pipeline investigation .github/workflows/

Output Locations

Configuration

supply_chain_forensics:
  sbom_format: cyclonedx
  sbom_version: "1.5"
  typosquatting_distance: 2
  check_osv: true
  check_reproducibility: true
  slsa_assessment: true
  pinned_action_check: true
  high_risk_patterns:
    - "curl.*|.*sh"
    - "wget.*sh"
    - "base64.*-d.*|.*sh"
    - "eval.*\\$\\("
    - "pull_request_target"

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.