unpinned, unscanned, and unreproducible supply chains
Dependency Issues (SCA)
Software Composition Analysis is about the code you depend on: unpinned versions make builds non-reproducible, missing lockfiles let the tree drift, and unscanned dependencies carry known CVEs straight into production.
Code you didn't write still ships in your build -- pin it, lock it, and scan it.
In the wild
Pin the Tree
Caret ranges float to whatever published last; a committed lockfile makes installs byte-identical.
// SMELL: caret ranges float to whatever published last
"dependencies": { "left-pad": "^1.0.0" } // 1.0.0? 1.9.3? who knows
// RIGHT: commit the lockfile so installs are byte-identical
// package-lock.json / yarn.lock pins the entire tree.
// CI: `npm ci` (not `npm install`) installs exactly the lock.no lock: two devs, two dependency trees npm ci: identical install everywhere
Pin the Versions (and Scan Them)
Unpinned requirements drift on every install; pinning freezes the build and lets a scanner check for CVEs.
# SMELL: unpinned requirements drift on every install
requests
flask
# RIGHT: pin exact versions (and hashes), then scan them
requests==2.32.3 # produced by pip-compile (pip-tools)
flask==3.0.3
# CI: `pip-audit` flags pinned versions with known CVEsunpinned: surprise upgrade breaks prod at 2am pinned: reproducible -- and auditable for CVEs
Lock the Infrastructure
Infrastructure dependencies drift too; a committed provider lock keeps applies deterministic.
# Terraform: same lesson, infrastructure edition
# SMELL: unconstrained provider -> drift between applies
terraform {
required_providers { aws = {} }
}
# RIGHT: pin the provider and commit .terraform.lock.hcl
terraform {
required_providers {
aws = { source = "hashicorp/aws", version = "~> 5.40" }
}
}unpinned: provider upgrades silently change infra locked: plan/apply are deterministic
Mapped weaknesses (CWE)
On its own, this defect is catalogued by MITRE as one or more of these weaknesses. The exploitable vulnerability usually appears only when it chains or combines with another.