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
+5
-2
@@ -154,8 +154,11 @@ POM without a license inherits its parent's. Only package names and versions
|
||||
are sent, and none a private registry may serve: an `.npmrc` or `.yarnrc.yml`
|
||||
that points elsewhere (for all packages or a scope), a `nuget.config` routing,
|
||||
or a Maven or Gradle build that names a repository besides the public ones
|
||||
stops those lookups. A component whose license could not be found stays
|
||||
without one.
|
||||
stops those lookups. In a monorepo each npm project has its own: the
|
||||
`.npmrc`/`.yarnrc.yml` next to its lockfile and in every folder above it up
|
||||
to the archive root count (the nearest one names a scope's registry; a
|
||||
private default registry anywhere on the way stops every lookup for that
|
||||
project). A component whose license could not be found stays without one.
|
||||
|
||||
### Copyleft Warnings
|
||||
|
||||
|
||||
Reference in new issue
Block a user