Skip to main content

SKY-SCA-INT001 · Supply chain and agent configuration

Lockfile entry without an integrity hash

Medium

A lockfile pins each package to an exact version and, normally, records a hash of the file to download (the integrity hash). SKY-SCA-INT001 reports a package from a public or private registry whose lockfile entry has no such hash.

Languages
package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, uv.lock, poetry.lock
Quality gate
counted toward the gate limits (full and diff scans). Counts toward max_dependency_vulnerabilities, which is 0 by default, so one finding fails --gate.
Finding type
review
Catalog name
Lockfile entry without integrity hash
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

The package manager compares the download with the recorded hash and stops when they differ. Without a hash it installs whatever the registry, a mirror or a network proxy hands it, so a tampered package goes in silently.

What Skylos flags

package-lock.json · JSONReported on line 20
{  "name": "shop",  "version": "1.0.0",  "lockfileVersion": 3,  "requires": true,  "packages": {    "": {      "name": "shop",      "version": "1.0.0",      "workspaces": ["packages/*"],      "dependencies": {        "ms": "2.1.3"      }    },    "node_modules/@shop/ui": {      "resolved": "packages/ui",      "link": true    },    "node_modules/ms": {      "version": "2.1.3",      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"    },    "packages/ui": {      "name": "@shop/ui",      "version": "1.0.0"    }  }}

What Skylos leaves alone

package-lock.json · JSON
{  "name": "shop",  "version": "1.0.0",  "lockfileVersion": 3,  "requires": true,  "packages": {    "": {      "name": "shop",      "version": "1.0.0",      "workspaces": ["packages/*"],      "dependencies": {        "ms": "2.1.3"      }    },    "node_modules/@shop/ui": {      "resolved": "packages/ui",      "link": true    },    "node_modules/ms": {      "version": "2.1.3",      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",      "integrity": "sha256-9mFuFeUw7VUvnaotPOcZY5R8a8fJjJtk/T5nP9AmIsY="    },    "packages/ui": {      "name": "@shop/ui",      "version": "1.0.0"    }  }}

Why Skylos leaves it alone

ms now has its hash. The workspace entry @shop/ui has no hash either, but it is a link to a folder in this repository, not a registry download, so there is nothing to verify.

More languages

TOML

Flagged

uv.lock · TOMLReported on line 5
version = 1requires-python = ">=3.11" [[package]]name = "six"version = "1.17.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/six-1.17.0.tar.gz" }

Not flagged

requirements.txt · Text
six==1.17.0

Why Skylos leaves it alone

A requirements file has no hash here either, but Skylos never reports SKY-SCA-INT001 for requirements files: only lockfiles that always record hashes are checked. Use pip install --require-hashes with --hash=sha256:… pins if you need the same protection there.

How Skylos decides

  1. Runs with --sca. Skylos reads the manifests and lockfiles itself and hands the npm and PyPI packages to the ca9 library, which decides the finding. This check needs no network, and nothing is installed.
  2. Only these lockfiles are checked: package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, uv.lock and poetry.lock. Requirements files and manifests such as package.json are never reported.
  3. The entry must come from a registry. Git, URL, local folder and workspace entries are not registry downloads (Git and URL entries are covered by SKY-SCA-SRC003).
  4. In uv.lock the hash is the first hash of the sdist or of a wheel; in poetry.lock it is the file hash listed for the package. An empty value counts as missing.
  5. Skylos checks every ca9 finding against its own record of the entry and drops one that does not match, so a newer ca9 cannot report a requirements file or an entry that has a hash.

How to fix it

Regenerate the lockfile with the package manager (npm install, pnpm install, uv lock, poetry lock) so it records every hash, and commit the result. An entry that lost its hash after a hand edit or a merge conflict is worth a closer look.

package-lock.json · JSON · the fix, against the flagged file
{  "name": "shop",  "version": "1.0.0",  "lockfileVersion": 3,  "requires": true,  "packages": {    "": {      "name": "shop",      "version": "1.0.0",      "workspaces": ["packages/*"],      "dependencies": {        "ms": "2.1.3"      }    },    "node_modules/@shop/ui": {      "resolved": "packages/ui",      "link": true    },    "node_modules/ms": {      "version": "2.1.3",Removed:       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"Added:       "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",Added:       "integrity": "sha256-9mFuFeUw7VUvnaotPOcZY5R8a8fJjJtk/T5nP9AmIsY="    },    "packages/ui": {      "name": "@shop/ui",      "version": "1.0.0"    }  }}

When it can be wrong

  • Some private registries and mirrors serve packages without a hash, so their lockfile entries have none. That is reported: the install really cannot verify those files.
  • Skylos does not check that a recorded hash is correct; a wrong hash is caught by the package manager at install time.
  • Bundled dependencies ("inBundle": true in package-lock.json) ship inside their parent package and are not reported.

Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.

How to silence it

  • There is no way to silence one entry: regenerate the lockfile. [tool.skylos] ignore = ["SKY-SCA-INT001"] does not hide it in a full scan, and JSON lockfiles cannot hold an inline marker.

  • A baseline does not hold it either. skylos baseline . saves dependency findings only with --sca, and even then only known vulnerabilities, so --baseline still reports this rule.

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.