Index of every page on this site: llms.txt
All skills
kartikkabadi avatar

/supply-chain-install-protection

@02a497f
by Kartikkartikkabadi/skills10 stars
Run it yourself

Configure, verify, and reason about install-time package-manager protection, minimum release age gates, Socket Firewall shims, dependency audits, and supply-chain risk on developer machines and repos.

Use this Skill: https://skilld.dev/gh/kartikkabadi/skills/supply-chain-install-protection

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈58 tokens for metadata: the name and description. ≈1.3k when used: this file.

Description uses 2.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈234 characters, or 2.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Supply-Chain Install Protection

Use when the user asks to verify, harden, troubleshoot, or bypass package-manager install-time protection, or when auditing whether a machine/repo is affected by dependency compromise.

Goal: make the safe path the default path for future installs. Do not pretend future-fetch protection retroactively audits already-installed packages.

Scope Model

Separate four jobs:

  1. Install-time firewalling: intercept future package artifact fetches.
  2. Cache reset: remove local package caches so future installs must fetch through protection.
  3. Existing dependency audit: scan manifests, lockfiles, SBOMs, and installed state.
  4. Whole-machine security review: OS/package posture, repo discovery, dependency audits, LaunchAgents/services, and redacted secret-pattern triage.

Do not conflate them.

Default Workflow

  1. Inspect authoritative docs before changing security config.
  2. Verify current local state: package managers, shims, shell resolution, and relevant config.
  3. Prefer PATH shims over aliases for developer-machine hardening.
  4. Wrap only documented-supported managers; unsupported wrappers are security theater.
  5. Preserve bypass and rollback.
  6. Verify with no-install smoke tests before real installs.
  7. Ask before cache clearing, external scans, installs/upgrades, CI changes, or private metadata upload.

Whole-Machine Audit Workflow

Use when the user asks for a machine-wide supply-chain/security check.

  1. Inventory before scanning: git repos, manifests/locks, package manager state, OS update state, Homebrew outdated state, launch agents/services when relevant.
  2. Keep secret scanning redacted: report detector/confidence/file/line only; do not print candidate values.
  3. Exclude .env, credential stores, SSH material, browser profiles, and protected dotfiles unless explicitly scoped.
  4. Ask before transmitting dependency metadata externally.
  5. Run ecosystem audits from the correct working directory:
    • npm audit --json --audit-level=low where npm lockfiles exist.
    • pnpm audit --json --audit-level=low where pnpm-lock.yaml exists.
    • bun audit --json where Bun locks exist.
    • uvx pip-audit ... for Python requirements/project locks.
    • cargo-audit audit --json from each Cargo.lock parent directory.
  6. Report clean signals, active repo risks, archive/reference noise, manual review queues, and recommended next actions separately.

Minimum Release Age Verification

Distinguish native age gates from firewalling:

  • npm: min-release-age / moving before cutoff.
  • pnpm: minimumReleaseAge in minutes (pnpm config set minimumReleaseAge 4320 --global or ~/.config/pnpm/config.yaml; does not read npm min-release-age from ~/.npmrc).
  • Yarn Berry: npmMinimalAgeGate.
  • Bun: [install].minimumReleaseAge in seconds.
  • uv: exclude-newer.
  • raw pip and standard cargo do not have first-class rolling minimum-release-age gates.

Existing lockfiles and already-installed packages are not automatically re-aged. Age gates mainly affect future resolution/fetch behavior.

Remediation Workflow

  1. Patch repo-by-repo, not with one machine-wide upgrade blast.
  2. Check git status and preserve user work before dependency edits.
  3. Use the repo's native package manager and lockfile.
  4. Use overrides/resolutions only when normal updates cannot lift a vulnerable transitive dependency.
  5. Re-run the exact audit after each repo patch and report advisory counts.
  6. Run the smallest meaningful build/test gate after the audit is clean.
  7. Use install-protection bypass only for tests/builds when no package fetch is occurring; do not bypass protected installs unless the user explicitly approves.

Pitfalls

  • Do not report protection as active just because a tool is installed. Active means package-manager invocations actually route through protection.
  • Do not say a machine is clean just because future-fetch protection is active.
  • Do not scan private repos with external services without approval.
  • Do not read or print full dotfiles if they may contain secrets; target relevant snippets.
  • Do not run one root audit and assume nested workspaces were covered.

Socket Firewall (sfw) — machine layout

Interactive shells (done on the user Mac): aliases at end of ~/.zshrc / ~/.bashrc → sfw <pm>. Bypass: command npm ….

Non-interactive / Codex / Cursor agents: aliases do not apply. Use:

  1. ~/.sfw-agent-bin/<pm> wrappers (exec /opt/homebrew/bin/sfw <pm> "$@").
  2. Codex [shell_environment_policy.set] PATH prepends ~/.sfw-agent-bin (keep inherit = "core").
  3. Cursor user rule: prefix installs with sfw unless the user approves bypass.

Do not put agent shims on global interactive PATH (fnm ordering).

CI: Per job, after checkout:

- uses: socketdev/action@v1.3.1
  with:
    mode: firewall-free

Then sfw npm ci, sfw pnpm install …, sfw bun install …, sfw cargo fetch / sfw cargo build on cold registry fetches. Skip label-bot / spell-check workflows with no installs.

Bazel-heavy jobs: wrap explicit pnpm/cargo steps first; pilot before mass Bazel edits.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    This skill provides instructions for auditing and hardening a developer environment against supply-chain attacks using tools like Socket Firewall and native package manager features. It includes safety precautions to redact secrets and avoid sensitive files. A low risk of indirect prompt injection exists due to the processing of project manifests and audit reports.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 02a497f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 4 months ago
version
1.0.0-codex
author
Hermes Agent, adapted for Codex

README badge

README badge for kartikkabadi/skills/supply-chain-install-protection