You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 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_external` in `MODULE.bazel` or `WORKSPACE` instead of committing a manifest Socket can already scan. The extractor asks Bazel what Maven artifacts it resolved, converts that into a `maven_install.json`-shaped manifest, and sends it through the existing scan pipeline.
## What changed
- Adds `socket manifest bazel [beta]`, a generation-only command for producing Bazel JVM SBOM manifests.
- Extends `socket scan create --auto-manifest` so Bazel workspaces are detected automatically and scanned through the normal scan-create flow.
- Detects Bazel workspaces via `MODULE.bazel`, `WORKSPACE`, or `WORKSPACE.bazel`.
- Supports Bzlmod and legacy WORKSPACE invocation modes.
- Discovers Maven repos from Bazel-visible repos / workspace metadata, including custom repo names beyond `@maven`.
- Parses `jvm_import` and `aar_import` rules from `bazel query --output=build`.
- Uses `unsorted_deps.json` when available as a faster structured source.
- Writes auto-manifest output under `.socket-auto-manifest/maven_install.json` so we do not overwrite a repo's checked-in `maven_install.json`.
- Adds docs, changelog entry, `socket.json` defaults, fixtures, and test coverage.
## User flow
Generate only:
```bash
socket manifest bazel .
```
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
7
+
## [Unreleased]
8
+
9
+
### Added
10
+
-**`socket manifest bazel [beta]`** — Generate Bazel JVM SBOM manifests by running `bazel query` against discovered Maven repos in a Bazel workspace. Closes the inline-Maven-declaration gap that lockfile-only parsing misses for repos like envoy, ray, tensorflow, tink-java, and or-tools. Auto-detects Bzlmod and legacy `WORKSPACE`.
11
+
-**`socket scan create --auto-manifest`** now covers Bazel workspaces in addition to Gradle/Scala/Kotlin/Conda. Repos with `MODULE.bazel`, `WORKSPACE`, or `WORKSPACE.bazel` are detected automatically and their Maven dependencies extracted as part of the standard scan-create flow.
- Writable Bazel output base; pass `--bazel-output-base` for read-only-cache CI.
64
+
65
+
This is the user-visible entry point for Bazel JVM SBOM support; the [beta] label and "Bazel JVM SBOM support" wording must stay consistent across release notes and docs.
66
+
67
+
## socket manifest cdxgen
68
+
69
+
Wraps the upstream `cdxgen` CycloneDX BOM generator for repos that already
70
+
have a working cdxgen configuration.
71
+
72
+
## socket manifest conda [beta]
73
+
74
+
Converts a Conda `environment.yml` file to a Python `requirements.txt` so the
75
+
Socket scan pipeline can consume the resulting manifest.
76
+
77
+
## socket manifest gradle [beta]
78
+
79
+
Uses Gradle (via the project's `gradlew`) to emit a `pom.xml` per subproject,
80
+
then feeds those files into the Socket scan pipeline. Mirrors the kotlin and
81
+
scala flows.
82
+
83
+
## socket manifest kotlin [beta]
84
+
85
+
Uses Gradle to generate a manifest file (`pom.xml`) for a Kotlin project; the
86
+
underlying flow is identical to the gradle subcommand.
87
+
88
+
## socket manifest scala [beta]
89
+
90
+
Generates a manifest file (`pom.xml`) from Scala's `build.sbt` file.
91
+
92
+
## socket manifest setup
93
+
94
+
Starts an interactive configurator that writes default flag values for
95
+
`socket manifest` into a `socket.json` in the current directory.
0 commit comments