dependency-artifact-integrity
Skill0 starsChanged 39 days agoMITView on GitHub
Use when a lockfile, checksum, or package signature is treated as proof of trustworthy dependencies, a hash mismatch tempts automatic lock regeneration, or CI must reject substituted package bytes before execution.
In this repository66 other files it gives its agents.
- AGENTS.mdAGENTS.md
- postgres-locking-joinsSkill
- ai-bug-patternsSkill
- compressed-ndjson-boundariesSkill
- http-resume-integritySkill
- linux-io-latency-triageSkill
- macos-disk-space-recoverySkill
- minimal-sufficient-evidenceSkill
- modularize-large-filesSkill
- patch-reproducer-validitySkill
- prompt-cache-boundariesSkill
- proton-drive-selective-backupSkill
- transactional-outbox-deliverySkill
- conventional-commitsSkill
- git-advanced-mergingSkill
- git-bisect-forensicsSkill
- git-data-recoverySkill
- git-hooksSkill
- git-rerereSkill
- git-reset-mechanicsSkill
- git-revisions-syntaxSkill
- git-rewriting-historySkill
- git-submodulesSkill
- git-worktreesSkill
- github-ssh-keysSkill
- npm-publish-ci-pitfallsSkill
- sapling-stacked-pr-workflowSkill
- go-concurrency-patternsSkill
- go-data-idiomsSkill
- go-error-handlingSkill
- go-interfaces-embeddingSkill
- go-pprof-profilingSkill
- marketing-funnel-diagnosisSkill
- marketing-geo-experimentsSkill
- marketing-incrementalitySkill
- marketing-positioning-testsSkill
- python-descriptors-mroSkill
- python-logging-cookbookSkill
- python-scaling-regression-testsSkill
- python-unicode-gotchasSkill
- rust-compile-time-invariantsSkill
- rust-deterministic-concurrency-testsSkill
- rust-error-identity-boundariesSkill
- rust-regex-search-contractsSkill
- rust-runtime-bug-classesSkill
- rust-tokio-actor-deliverySkill
- rust-tokio-cancellation-safetySkill
- sales-discovery-qualificationSkill
- sales-mutual-action-plansSkill
- sales-pipeline-forecast-calibrationSkill
- sales-value-negotiationSkill
- ai-triage-evaluationSkill
- container-image-patchingSkill
- dnssec-sentinel-diagnosticsSkill
- iam-policy-change-replaySkill
- rbvm-applicabilitySkill
- rbvm-asset-evidenceSkill
- rbvm-guarded-remediationSkill
- rbvm-priority-decisionsSkill
- rbvm-risk-exceptionsSkill
- The first 60 shown.
The file
Files
Dependency Artifact Integrity
Resolution, byte integrity, signer identity, and vulnerability status are separate contracts. A checksum from the same compromised endpoint cannot independently authenticate an artifact.
Verification questions
| Claim | Evidence needed |
| Same dependency resolution | Frozen manifest/lock agreement, including transitive dependencies |
| Same artifact bytes | Trusted expected archive digest, enforced on mismatch |
| Expected publisher/build | Verified signature/attestation bound to expected identity and artifact |
| Acceptable vulnerability risk | Separate applicability/risk decision; authentic packages can be vulnerable |
Recipe
- Record manager version, platform, source types, configuration, and execution paths. Identify checksum scope: archive, manifest, tree, or metadata. A “checksum” field need not authenticate downloaded bytes.
- Separate controlled dependency updates from consumption. Review expected hashes/trust metadata before consumption; regeneration after a mismatch merely blesses new bytes. Initial acquisition remains a trust decision.
- Choose documented enforcement, not a similarly named option. For pip, explicitly require hashes and pin the complete graph, including approved wheel variants. Dart's
--enforce-lockfilerejects changed hosted-package hashes. npm'scifreezes lock resolution, while registry-signature verification is a separate operation. Do not extrapolate across managers. - Prove the gate in a disposable workspace: approved bytes pass; changed bytes at the same name/version fail; missing direct/transitive evidence fails; trust files remain unchanged. Use inert local artifacts and existing tools. Disable source builds/lifecycle execution; never install interception CAs or weaken transport verification.
- On mismatch, retain hashes/source context, stop promotion, and investigate corruption, repackaging, or compromise. Do not auto-refresh hashes, suppress verification, or declare remediation. Rollout and exceptions require approval; reuse security-gate-rollout.
Offline demonstration from repository root:
python3 skills/security/dependency-artifact-integrity/reproduce.pyIt uses local inert wheels and pip download: unhashed acquisition accepts substituted bytes; hash enforcement rejects them. No package is installed/executed. This tests neither signatures nor other managers.
Sources: Trail of Bits and official manager documentation; versions, validation, and limits in SOURCES.md.
Pitfalls
- Zero verified packages establishes no coverage.
- Caches can hide a broken gate; test with fresh destinations and controlled caches.
- Hashes cannot prevent malicious content already accepted into the baseline.
- An application lockfile does not automatically constrain its library's downstream consumers.
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.

