Skip to content
Skills Library
Programming · Learning & explanation

dependency-supply-chain-engineering

/dependency-supply-chain-engineering

Engineering practice: Dependency and supply-chain hygiene — Know exactly what code you ship and where it came from, so a compromised or abandoned package cannot slip into production unnoticed. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

Licence
Apache-2.0
Last repository change
02.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 02.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Engineering practice: Dependency and supply-chain hygiene — Know exactly what code you ship and where it came from, so a compromised or abandoned package cannot slip into production unnoticed. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

Original author description

Engineering practice: Dependency and supply-chain hygiene — Know exactly what code you ship and where it came from, so a compromised or abandoned package cannot slip into production unnoticed. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

How it works

  1. How to do it
  2. Checklist
  3. Rules
  4. Do
  5. Don't
  6. Quality gates
  7. Workflow
  8. Examples
  9. Further reading
Original SKILL.md headings · 85 lines, 892 words
SKILL.md preview
---
name: dependency-supply-chain-engineering
description: "Engineering practice: Dependency and supply-chain hygiene — Know exactly what code you ship and where it came from, so a compromised or abandoned package cannot slip into production unnoticed. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it."
type: engineering
stack: practice
core: "1.0"
checked: 2026-10-26
---

# Dependency and supply-chain hygiene

Know exactly what code you ship and where it came from, so a compromised or abandoned package cannot slip into production unnoticed.

Use this whenever a dependency is added, upgraded or removed, and as a standing setup for every repository and build pipeline. It prevents typosquatted or hijacked packages, unreviewed transitive upgrades, unreproducible builds and long-lived known vulnerabilities.

## How to do it
1. **Justify each new dependency** — Before adding a package, write in the pull request what it does, why a few lines of local code will not do, its licence, its maintenance activity and how many transitive packages it pulls in. Reject it if the answer is weak.
2. **Commit a lockfile and install from it** — Every repository commits its lockfile. CI installs with the frozen form of the command (npm ci, pnpm install --frozen-lockfile, pip install --require-hashes, cargo build --locked) so the build fails if the lockfile and manifest disagree.
3. **Pin build tools and actions** — Pin container base images by digest and CI actions by full commit SHA, not by floating tag. Pin the language runtime version in a version file.
4. **Audit on every change and nightly** — Run the ecosystem's audit (npm audit, pip-audit, cargo audit, govulncheck) and a dependency scanner in CI. Fail on high or critical findings that have a fixed version available.
5. **Automate small, regular upgrades** — Enable an update bot that opens grouped pull requests weekly. Merge patch and minor updates once tests pass; read the changelog for majors and check semver intent.
6. **Restrict install-time code** — Disable or allow-list package install scripts where the package manager supports it, and install from a single trusted registry or a proxy you control.
7. **Produce provenance and an SBOM** — Generate a software bill of materials for each release artefact and attach signed build provenance from CI so anyone can verify which source and workflow produced it.
8. **Remove what you no longer use** — Run an unused-dependency check each quarter and delete packages nothing imports.

## Checklist
- [ ] Lockfile is committed and CI installs in frozen mode
- [ ] New dependencies are justified in the pull request with licence and maintenance noted
- [ ] Base images are pinned by digest and CI actions by commit SHA
- [ ] Audit shows no high or critical findings with an available fix
- [ ] An update bot is enabled and its pull requests are not older than 30 days
- [ ] Release artefacts have an SBOM and signed provenance
- [ ] No unused dependencies remain in the manifest

## Rules
- Install only from the lockfile in CI and production builds; never resolve fresh versions at deploy time. _(A build that resolves at deploy time can pull a version nobody reviewed.)_
- Pin third-party CI actions and container images to immutable digests. _(Tags can be moved to point at malicious code after you reviewed them.)_
- Check package names character by character when adding them and prefer packages with an identifiable maintainer and history. _(Typosquatting relies on a one-letter slip.)_
- Prefer the standard library or a few lines of local code over a dependency for small utilities. _(Every package is code you ship and must keep patching.)_
- Check the install and bundle size impact of a new dependency before merging. _(Transitive trees grow quietly and slow every build and page load.)_

## Do
- Review lockfile diffs for unexpected new transitive packages
- Group routine upgrades so they land weekly rather than in one painful annual jump
- Keep a short list of approved packages for common needs

## Don't
- Do not use floating ranges like latest or * in manifests
- Do not suppress an audit finding without a written reason and expiry date
- Do not copy vendored code into the repository without recording its source and version

## Quality gates
| Gate | Tool | Threshold | When |
|---|---|---|---|
| Dependency and secret scan | Ecosystem audit + dependency scanner + secret scanner | No high or critical findings with a fix available; no secrets; lockfile in sync with manifest | Every pull request and nightly |
| Release provenance | CI provenance and SBOM generation | Every release artefact has a signed provenance statement and an SBOM | Every release |

## Workflow
**Review**
- Read the lockfile diff, not just the manifest
- New dependency pull requests need a second reviewer

**Definition of done**
- Audit clean and lockfile committed
- SBOM and provenance attached to the release

## Examples
### Frozen install and audit in CI (`.github/workflows/deps.yml`)

```yaml
name: deps
on: [pull_request]
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      # Pin actions to a full commit SHA in real use
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version-file: .nvmrc
      - run: npm ci --ignore-scripts
      - run: npm audit --audit-level=high
```

## Further reading
- [SLSA](https://slsa.dev/) — Levels and requirements for build provenance and tamper-resistant pipelines.
- [Semantic Versioning](https://semver.org/) — What major, minor and patch bumps promise, for deciding how to treat upgrades.
- [OWASP Top 10](https://owasp.org/www-project-top-ten/) — Covers vulnerable and outdated components and integrity failures as risk categories.
- [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) — Engineering skills for coding agents where dependency discipline is commonly described.

_Written for Celestial; the sources above inspired it._
Files in this package (4)
  • AGENTS.md 4 KB
  • README.md 2 KB
  • SKILL.md 6 KB
  • rules/dependency-supply-chain-engineering.mdc 3 KB

Versions

The database has no other skills named dependency-supply-chain-engineering.

Database snapshot: 13.11.2026 · package version 66d3472a6758 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100test-first-development-engineering
    Engineering practice: Test-first development — Write a failing test for one small behaviour, make it pass with the least code, then tidy up, so every line you ship is already proven. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.
  • 100supply-chain-audit
    Audit the supply-chain threat landscape of project dependencies. Part of the Nomark Method Layer 1 security scanning. Use whenever dependency files change (package.json, requirements.txt, go.mod, Cargo.toml), someone adds a new dependency, or someone asks 'are our dependencies…
  • 100feature-flags-engineering
    Engineering practice: Feature flags — Ship code dark, roll it out in stages, switch it off in seconds, and delete the flag once the rollout is done. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.
  • 100karpathy-supply-chain-hygiene
    Apply rigorous supply chain security hygiene to software projects — audit dependencies, detect risks, minimize attack surface. Use this skill when the user wants to audit project dependencies, is concerned about supply chain attacks, wants to set up secure dependency management,…
  • 100supply-chain-risk-auditor
    Audits a project's dependencies for supply-chain risk: version-matched advisories for direct dependencies and the full lockfile tree, abandoned or archived upstreams, npm publisher concentration, and install-time script execution. Use when asked to audit dependencies, assess…
  • 98auditing-supply-chain
    Audit software supply chain risk — dependency and transitive package review, typosquatting and dependency confusion, lockfile and SBOM analysis, CI/CD pipeline and GitHub Actions security, build provenance, and secrets exposure. Use when assessing third-party package risk,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.