fix(sbom): npm registry policy per project, from nested .npmrc/.yarnrc.yml
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m37s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m37s
The npm private-registry policy read .npmrc and .yarnrc.yml only at the archive root, so a monorepo project in a subfolder with its own `@corp:registry=...` had its private-scope names looked up on registry.npmjs.org. The policy of an npm package now comes from the files next to the lockfile Syft read it from and every parent directory up to the root: the nearest file names a scope's registry, and a non-public default registry anywhere on the way stops every lookup for that project. A package found in several projects is looked up only if all of them take it from the public registry. The same policy gates the fallback tarball URL in the SBOM's distribution references. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
1 parent
e1bf9e861c
commit
595de73c4a
7 files changed
+321
-52
No files matched your search
@@ -256,7 +256,7 @@ Licenses of NuGet packages that no `.nuspec` in the tree gives, and the project
|
||||
|
||||
## npm and Maven -- Licenses
|
||||
|
||||
Licenses of npm packages come from their version document on `registry.npmjs.org` (`license`, or the older `licenses` list), with the project URL (`homepage`, else `repository`); those of Maven and Gradle dependencies, with the project URL (`<url>`, else `<scm><url>`), from their POM on Maven Central or, for AndroidX and Google Play services, Google's Maven repository; a POM without `<licenses>` inherits its parent's (followed up to three levels). Only names and versions are sent, never for a scope or registry the tree's `.npmrc`/`.yarnrc.yml` routes elsewhere, and no Maven name at all when a build names a repository besides the public ones. Bounded and cached like the NuGet lookup; `REGISTRY_LICENSE_LOOKUP=false` turns it off.
|
||||
Licenses of npm packages come from their version document on `registry.npmjs.org` (`license`, or the older `licenses` list), with the project URL (`homepage`, else `repository`); those of Maven and Gradle dependencies, with the project URL (`<url>`, else `<scm><url>`), from their POM on Maven Central or, for AndroidX and Google Play services, Google's Maven repository; a POM without `<licenses>` inherits its parent's (followed up to three levels). Only names and versions are sent, never for a scope or registry the `.npmrc`/`.yarnrc.yml` of the package's project (next to its lockfile or in a folder above it) routes elsewhere, and no Maven name at all when a build names a repository besides the public ones. Bounded and cached like the NuGet lookup; `REGISTRY_LICENSE_LOOKUP=false` turns it off.
|
||||
|
||||
## ClamAV -- Malware
|
||||
|
||||
|
||||
Reference in new issue
Block a user