Repository navigation
feat(sbom): inventory installed Python, JavaScript and Lua packages - #472
Merged
Merged
Conversation
Packages installed transitively or outside a packages directive were missing from the SBOM: only declaration and lock files were scanned. Read installed metadata (dist-info, node_modules manifests, LuaRocks trees) and its license files from the built image index, resolving symlinks, and add the components without inventing dependency edges; existing declaration graphs stay intact. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Syft drops a whole rockspec when it meets a conditional statement or a boolean expression, so rocks such as luassert and say never reached the SBOM. Strip those lines from the scan copy, which never carry the name, version or license, and take name and version from the LuaRocks tree. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
A node_modules entry linking into a store whose directories are themselves links, as pnpm-style layouts do, left the package out of the inventory: only one level of directory links was projected. Follow links nested in a linked tree up to a fixed depth, skip links back to an ancestor, and bound the paths examined through links so many aliases cannot multiply the work. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Preserve scanner-readable local bindings and continued strings when filtering installed rockspec scan copies. Match the pinned scanner’s value boundaries and arity instead of classifying every local from its first value; do not evaluate expressions or fabricate metadata. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Collaborator
Author
Verification
Review focus
Follow-up
|
Collaborator
Author
Linux VM e2e results at 98c4d09VM access was restored. No source changes were made for these runs.
The local waiting connection timed out or lost SSH, but the remote runs continued; saved remote logs confirm both exit codes (201 and 0). These VM results do not change the failed CI conclusion. The PR remains draft; no merge was performed. |
reyreavman
marked this pull request as ready for review
October 26, 2026 07:08
reyreavman
pushed a commit
that referenced
this pull request
Oct 26, 2026
🤖 I have created a release *beep* *boop* --- ## [3.12.0-dk.3](v3.12.0-dk.2...v3.12.0-dk.3) (2026-10-26) ### Features * **build, stapel:** sign files matched by a glob pattern ([#471](#471)) ([ffda24e](ffda24e)) * **sbom:** inventory installed Python, JavaScript and Lua packages ([#472](#472)) ([7fde219](7fde219)) ### Bug Fixes * **build, stapel, import:** stop imports failing with sbom enabled ([#470](#470)) ([478b751](478b751)) * **sbom:** avoid marking editable Python packages as absent ([#474](#474)) ([e0b4b66](e0b4b66)) * **sbom:** retain legacy Python bytecode after source removal ([#476](#476)) ([36debcb](36debcb)) * **sbom:** stop marking os-pm packages under /lib64 as not shipped ([#475](#475)) ([cd0a029](cd0a029)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stapel SBOMs now include installed Python, JavaScript and Lua packages even when no
packagesdirective declares them. This adds transitive and separately installed packages to the inventory without making them application root dependencies.What
Why
Declaration-only scans do not enumerate everything installed by a package manager, including dependencies absent from the scanned declarations. Reusing the final image index provides installed metadata without another filesystem inventory pass.
The pinned Syft parser discards complete rockspecs when source-selection conditionals or boolean fields are present. A scan-only workaround allows packages such as luassert and say to be reported without executing image-supplied Lua or waiting for a different scanner distribution; it is intentionally not a general Lua interpreter.