Add beta Bazel JVM manifest support#1312
Draft
Simon (simonhj) wants to merge 10 commits into
Draft
Conversation
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
Adds beta Bazel JVM SBOM support to Socket CLI.
Bazel is multi-language, but this PR starts with Bazel + Maven because many Bazel JVM repos declare Maven dependencies through
rules_jvm_externalinMODULE.bazelorWORKSPACEinstead of committing a manifest Socket can already scan. The extractor asks Bazel what Maven artifacts it resolved, converts that into amaven_install.json-shaped manifest, and sends it through the existing scan pipeline.What changed
socket manifest bazel [beta], a generation-only command for producing Bazel JVM SBOM manifests.socket scan create --auto-manifestso Bazel workspaces are detected automatically and scanned through the normal scan-create flow.MODULE.bazel,WORKSPACE, orWORKSPACE.bazel.@maven.jvm_importandaar_importrules frombazel query --output=build.unsorted_deps.jsonwhen available as a faster structured source..socket-auto-manifest/maven_install.jsonso we do not overwrite a repo's checked-inmaven_install.json.socket.jsondefaults, fixtures, and test coverage.User flow
Generate only:
socket manifest bazel .Generate and upload in one step:
socket scan create --auto-manifest .Testing
Tested with unit and integration coverage for:
jvm_import/aar_importparsing.unsorted_deps.jsonparsing.maven_install.json..socket-auto-manifest/output behavior.Also tested against a corpus of Bazel repositories covering constructed and real-world Maven extraction cases, Bzlmod, legacy WORKSPACE, custom repo names, pinned and unpinned lockfile flows, and scan-create auto-manifest behavior.
Local checks: