auditing-pinned-dependencies
Skill3 starsChanged 6 months agoMITView on GitHub
Audits a repository's install commands and CI for unpinned dependency installs. Greps for npx -y, @latest, pip install without ==, unpinned uvx --from git+, and curl|sh patterns across READMEs, Dockerfiles, GitHub Actions workflows, package.json scripts, pyproject.toml, requirements files, pre-commit configs, and mcp.json. Use when reviewing a new repo before adoption, evaluating an MCP server's install command, hardening an existing project against supply-chain attacks, or auditing CI pipelines for drift risk. Produces a per-file findings list with line numbers, suggested pinned forms, and remediation snippets.
- Pipes a download into a shell
- Installs packages
In this repository104 other files it gives its agents.
- auditing-instruction-hierarchySkill
- authoring-pluginSkill
- authoring-skillSkill
- authoring-tool-hookSkill
- running-eval-driven-skill-developmentSkill
- writing-decision-trees-as-skillsSkill
- writing-deny-allow-rulesSkill
- writing-mcp-server-securelySkill
- analyzing-causal-dagSkill
- analyzing-regression-diagnosticsSkill
- applying-differential-privacySkill
- auditing-chunking-strategySkill
- auditing-deep-learning-overfitSkill
- auditing-embedding-driftSkill
- auditing-inference-latency-budgetSkill
- auditing-model-fairnessSkill
- auditing-prompt-token-budgetSkill
- auditing-rlhf-reward-hackingSkill
- auditing-sft-datasetSkill
- auditing-synthetic-data-leakageSkill
- auditing-synthetic-data-utilitySkill
- auditing-train-test-splitSkill
- building-baseline-modelsSkill
- building-canary-rolloutSkill
- building-conformal-prediction-setSkill
- building-data-dictionary-with-consent-classSkill
- building-rag-eval-setSkill
- building-rollback-planSkill
- checking-test-assumptionsSkill
- comparing-models-fairlySkill
- enforcing-leakage-firewallSkill
- evaluating-binary-classifiersSkill
- evaluating-multiclass-classifiersSkill
- evaluating-ood-detectionSkill
- evaluating-rag-retrievalSkill
- evaluating-regression-modelsSkill
- generating-data-dictionarySkill
- generating-shap-explanationsSkill
- interpreting-conflicting-testsSkill
- monitoring-data-driftSkill
- monitoring-prediction-driftSkill
- packaging-model-for-deploymentSkill
- profiling-llm-costSkill
- recommending-model-tierSkill
- reporting-effect-sizesSkill
- running-adversarial-perturbation-suiteSkill
- running-bayesian-workflowSkill
- running-chollet-ratio-checkSkill
- running-eval-before-after-finetuneSkill
- running-hyperparameter-sweepSkill
- running-power-analysisSkill
- scaffolding-pytorch-training-loopSkill
- selecting-embedding-modelSkill
- selecting-statistical-testSkill
- tuning-classification-thresholdSkill
- writing-finetune-spec-sheetSkill
- writing-model-cardsSkill
- applying-secure-coding-rulesSkill
- auditing-graphql-nullabilitySkill
- auditing-mcp-server-pre-trustSkill
- The first 60 shown.
The file
Files
Auditing Pinned Dependencies
When to use
Trigger this skill when the user asks for or implies one of:
- Reviewing a new repository before adopting it into the team's stack or a Claude Code harness
- Evaluating an MCP server install command (
npx -y …,uvx --from git+…) before adding tomcp.json - Hardening an existing project against supply-chain attacks (PyPI takeovers, npm typosquatting, malicious tag-republishing)
- Auditing CI workflows for drift — same
mainbranch builds fine today, breaks tomorrow because an unpinned dep silently bumped - Reviewing a Dockerfile / Containerfile that uses base images without digest pinning
When NOT to use
Skip this skill and hand off when:
- The repo is a brand-new project bootstrap scenario where the user explicitly wants the latest version on first install (e.g.,
npm create vite@latest) - The repo is a throwaway prototype / personal scratch project where pinning friction outweighs benefit
- The user wants help WRITING a pinned install command (different skill: scaffolding install commands)
- The MCP server itself needs a full six-check audit, not just version pinning (use
security/auditing-mcp-server-pre-trustinstead — this skill is the dep-pinning slice)
Quick start
User says: "Here is our team's Dockerfile. Audit the install commands for pinning issues."
Skill response: walks every install / RUN / FROM line. Per finding: file path · line number · current command · suggested pinned form · remediation snippet. Produces a verdict table with severity. Recommends npm ci over npm install, pip install --require-hashes where lockfile hashes are present, and FROM image@sha256:… for base images.
Inputs / Arguments / Flags
| Argument | Type | Required | Default | Description |
| target | repo path or file path | yes | — | The repository root or specific file to audit. |
| scan_files | list of strings | no | (default set) | Defaults: README*.md, Dockerfile, Containerfile, .github/workflows/*.yml, package.json, pyproject.toml, requirements*.txt, Pipfile, pre-commit-config.yaml, mcp.json, .mcp.json. |
| severity_threshold | "low" | "medium" | "high" | no | "medium" | Findings below this threshold are summarized as counts, not enumerated. |
| include_create_scaffolders | bool | no | false | If true, also flag npm create *@latest, cargo generate, etc. By default these are excluded as legitimate one-shot scaffolds. |
Reviewer stance
Adopt the stance of an expert senior software developer with 30 years of experience in the language(s) and frameworks of the artifact under review. Apply that depth throughout: name the failure modes a junior reviewer would miss, weigh tradeoffs explicitly, and ground every finding in specific evidence from the artifact.
Workflow
Copy this checklist into the response and check off items as the audit progresses:
Dep-pinning audit progress:
- [ ] Scan README + install docs for curl|sh and npx -y patterns
- [ ] Scan Dockerfile / Containerfile for FROM without @sha256 and RUN install commands
- [ ] Scan .github/workflows/*.yml for action versions and install steps
- [ ] Scan package.json scripts + dependencies for unpinned ranges (^, ~, *, latest)
- [ ] Scan pyproject.toml / requirements files for unpinned specifiers
- [ ] Scan mcp.json / .mcp.json for unpinned MCP install commands
- [ ] Produce per-file findings with line numbers + suggested pinned form
- [ ] Final verdict: pass / pass-with-warnings / failStep 1: Blocking patterns (must-fix)
See reference/unpinned-install-patterns.md for the complete pattern catalog. Top items:
npx -y <pkg>(no version) — pin tonpx -y <pkg>@<version>or save the script and reviewnpm install <pkg>without@<version>— pin to<pkg>@1.2.3or usenpm ciagainst a committed lockfilepip install <pkg>without==<version>— pin to<pkg>==1.2.3or use-r requirements.lockuvx --from git+<url>without#<ref>or@<sha>— pin the git ref (#v1.2.3or@<sha>); HEAD of default branch can change@latestanywherecurl … | sh,wget … | bash,iwr … | iex— save the script to disk, review, then run
Step 2: Acceptable forms
<pkg>@1.2.3(npm)<pkg>==1.2.3(pip)git+<url>@<sha>orgit+<url>#<tag>pip install -r requirements.lock(lockfile-pinned)npm ci(enforcespackage-lock.json)pip install --require-hashes -r requirements.txt(hash-enforced)
Step 3: Defense-in-depth recommendations (warnings, not blocking)
FROM python:3.13→FROM python:3.13.1-slim@sha256:…(digest-pinned base image)- GitHub Actions
uses: actions/checkout@v4→uses: actions/checkout@<sha>(SHA-pinned actions) npm installin CI →npm ci(enforces lockfile)pip installin CI →pip install --require-hashes -r requirements.txt
Step 4: Produce findings table
Per finding:
| File | Line | Current | Suggested | Severity | Remediation |
|------|------|---------|-----------|----------|-------------|
| Dockerfile | 12 | RUN npm install express | RUN npm install express@4.21.0 | High | Pin or use `npm ci` against lockfile |Outputs
A markdown audit report:
- Repo identity — name + commit SHA + audit date
- Per-file findings table — File · Line · Current · Suggested · Severity · Remediation
- Counts summary — high / medium / low / informational findings
- Final verdict — pass / pass-with-warnings / fail (any high-severity = fail)
- Recommended next steps — specific commands to run (
npm ci,uv lock,pip-compile --generate-hashes)
Failure modes
Known pitfalls in dep-pinning audits and how this skill catches them:
- Audit theater — running grep without inspecting context, producing false positives on every range specifier. Caught by: severity threshold + scaffolder exclusion + acceptable-forms list to suppress noise.
- Scaffolder false positive — flagging
npm create vite@latestfor a brand-new project as a pinning violation. Caught by:include_create_scaffolders: falsedefault + explicit "Acceptable scaffolder" carve-out. - Git+ HEAD trap — accepting
uvx --from git+https://github.com/foo/bar.gitas pinned because it specifies a URL. Caught by: explicit Step 1 rule that git+ without#<ref>or@<sha>is unpinned (resolves to HEAD of default branch, which moves). - Lockfile-without-enforcement — committing
package-lock.jsonbut CI usesnpm install(which ignores the lockfile). Caught by: Step 3 recommendation to switch CI tonpm ci. - Range specifier ambiguity —
^1.2.3and~1.2.3are pinned RANGES, not exact pins. Caught by: severity-medium finding with explanation that ranges allow silent minor/patch bumps.
References
reference/unpinned-install-patterns.md— complete catalog of blocking patterns + acceptable forms + per-ecosystem notesreference/audit-report-template.md— markdown template for the per-file findings table- NIST SP 800-218 SSDF — Secure Software Development Framework, basis for the pinning requirement
- OpenSSF Scorecard — automated check for pinned dependencies
Examples
Example 1: Mixed Dockerfile audit (happy-path)
Input: "Here is our team's Dockerfile. Audit the install commands." [Dockerfile content with mixed pinned and unpinned RUN statements]
Output: Skill walks each RUN line. Flags RUN npm install express (line 12) as high-severity — suggests RUN npm install express@4.21.0 or switch to npm ci. Flags RUN pip install requests (line 18) — suggests requests==2.32.0. Does NOT flag RUN apt-get install -y curl=7.88.1-10 (line 8) as it is properly version-pinned. Produces the findings table with 2 high, 0 medium, 1 informational.
Example 2: uvx --from git+ without ref (edge-case)
Input: "We use uvx --from git+https://github.com/anthropic/somelib.git to install our internal CLI. Is that pinned?"
Output: Skill identifies the install as UNPINNED. Explains that git+ without #<tag> or @<sha> resolves to HEAD of the default branch, which can change without notice. Recommends pinning to a specific tag (#v1.2.3) or commit SHA (@<sha>). Notes that for security-sensitive contexts, SHA pinning is preferred because tags can be re-pointed by the repo maintainer.
Example 3: Project scaffold (anti-trigger)
Input: "I just ran npm create vite@latest my-app -- --template react. Should I have pinned it?"
Output: Skill does NOT flag the create-vite invocation as a pinning failure. Explains that npm create *@latest is a one-shot scaffolder, not a runtime dependency. Recommends instead that the user pin the resulting RUNTIME dependencies in the new project's package.json — including running npm install once and committing the resulting package-lock.json for CI to consume via npm ci.
See also
security/auditing-mcp-server-pre-trust— broader six-check MCP audit; this skill is the version-pin sliceworkflow/pinning-reproducible-environments— the proactive companion: build a project that pins from day oneworkflow/auditing-source-provenance— pairs naturally; provenance.json captures the pinned versions that this audit verified
Status & version
- Status: shipped
- Version: 0.1.0
- Last-updated: 2026-05-23
- Provenance: derived from Rock's harness
foundation/00-quality-contract.mdQC.1 (NIST SP 800-218 pinning requirement) and thePreToolUse-supply-chain-bash-checks.pyhook patterns
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
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.

