Skip to content

Attest a Maven patch as affected in VEX where a pinned Bazel hub fetches the jar from its lock - #2236

Open
Mikola Lysenko (mikolalysenko) wants to merge 5 commits into
bazel-vex/04-cargo-nuget-installedfrom
bazel-vex/05-maven-installed
Open

Mikola Lysenko (mikolalysenko) wants to merge 5 commits into
bazel-vex/04-cargo-nuget-installedfrom
bazel-vex/05-maven-installed

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

socket-patch vex and --vex now say affected of a Maven artifact whose patch a pinned rules_jvm_external hub of the Bazel workspace does not take: the hub fetches the jar from its own lock, and the block in MODULE.bazel holds no entry of the patch.

It builds on the open change that does the same for Cargo and NuGet, and is opened against its branch.

Decisions for the maintainer

  • Every Maven patch is held to the hub, whichever mode holds it. An agent patch of an installed jar, a hosted pin of a pom.xml or a Gradle file and a copy vendored for such a build are all affected while a pinned hub fetches the jar and the block has no entry of that patch. So the document after a hosted or vendored command that declined (maven_bazel_*) still says affected, where it said not_affected before. To reverse: one condition in commands/vex.rs, and that false statement is back.
  • The hub that fetches the jar decides, not every hub. Beside a second hub without a lock, or a maven_install of a WORKSPACE file, the statement is affected, as apply already warns there. It stays not_affected where that hub is in doubt: an override of the artifact, a block changed by hand that still overrides a repository. To reverse: one word in maven::upstream.
  • Nothing is said where the checkout does not show that Bazel reads MODULE.bazel. That is a named Bazel before 7.0; no named release beside a WORKSPACE file that defines a repository; and an rc file that names enable_bzlmod off or --ignore_dev_dependency, or cannot be read. The last part is not what review asked for (an entry that an rc file switches off should give affected). Such an option is found on whatever line, so it may hold for one --config alone, and where it holds it takes the hub out with the entry. Neither is certain, so the statement stays as without Bazel; before, a checkout with Bzlmod off got affected from a file Bazel does not read. To get affected there: drop one condition in maven::upstream.
  • An entry of another patch is not this patch's. The statement is affected and names that entry: Bazel builds the other patch's jar.
  • A hub's lock belongs to no project. A Maven service that Bazel does not build is affected too, beside a hub that pins the same artifact and version, now in every mode. --no-bazel is its way out.
  • A WORKSPACE file. While a Bazel from 7.0 on is named, Maven keeps its finer rule: such a file changes nothing for a jar that a pinned hub of MODULE.bazel fetches. A maven_install there, also one behind a function of a .bzl file, which is not seen, is another hub: no mode patches it, and it cannot put the patch into the hub that was read. Where only such a hub fetches the jar, nothing is said.
  • The Maven VEX cell of "Bazel workspaces: what is supported" is "Supported", with its limits in the two sections.

What changes

Agent mode patches no hub, and hosted and vendored mode patch one only where they can show that an entry works. On the base, vex said not_affected of such a patch while bazel build printed the upstream jar (measured on Bazel 9.3.2 and 7.7.2; the first commit holds it as tests). Now each advisory of the patch gets a statement of the package's own with status: "affected":

Bazel builds this package from maven_install.json (`maven.install`, MODULE.bazel:22), which does not name Socket patch <uuid>: the patch is only in what Maven or Gradle builds from. Run `socket-patch get pkg:maven/<group>/<artifact>@<version> --mode hosted` at the Bazel root to patch the hub, or with `--mode vendored` to commit the patched jar. If what you ship is what Maven or Gradle builds and not what Bazel builds, pass `--no-bazel` (`--vex-no-bazel` on scan, apply and vendor).

Where hosted and vendored mode would write no entry, the statement names no command. It gives the code and the reason of their warning:

Hosted and vendored mode write no entry for this hub (`maven_bazel_release`): the checkout names Bazel 7.3.0 (`.bazeliskrc` or `.bazelversion`), and an entry needs `override_repo`, which Bazel has from 7.4.0.

Everything else is what the other five ecosystems have, through the same code: the warning vex_bazel_not_in_build, a skipped event with details.status: "affected", the partialFailure envelope, exit code 0, vex.affected, and --no-bazel. Their statements are word for word what they were.

The answer comes from bazel/maven.rs, the reader hosted and vendored mode write entries by: built::unbuilt asks maven::upstream, which gives the hub and what to do.

Unchanged: an entry of the patch in the block, a jar no hub fetches, a project in no Bazel workspace, --global, a hosted pin of another ecosystem, and every run without a Maven package.

Limits

  • not_affected is still written where the hub that fetches the jar is not read with certainty, in the cases of the third decision, and for what the Maven section lists as not seen (a hub of another Bazel module, a maven_install inside a .bzl function).
  • Only a patch that the run finds in place is judged. Where the installed jar is missing or is not the patched one, vex exits 1 with no document, as without Bazel.
  • A jar that a hub takes from the Maven local repository (m2local) counts as fetched. The lock's sha256 is not compared with the patch.
  • Where only the hosted command declines (an rc option about downloads), the statement still names the command: --mode vendored writes the entry.
  • --vex-no-bazel is about the document: apply and an agent scan still warn maven_bazel_hub_unpatched.
  • Go and Composer are not part of this.

Code review

  1. Any doubt, also about another hub, gave not_affected: fixed. upstream asks Hubs::built, and the block for an entry.
  2. Any entry of the block counted: (a) fixed, an entry counts only for its own patch; (b) not as asked, see the third decision: an rc option leaves the statement as without Bazel, for an entry and for the hub.
  3. The remedy named a command that declines, and the next document was false: fixed both ways (first decision; the remedy is the command or the reason). No existing test expected not_affected for a hosted or vendored Maven patch whose hub got no entry: each writes the entry and passes unchanged.
  4. Maven judged beside a WORKSPACE file: kept, with the guard of the third decision.
  5. The workspace parsed twice: fixed for a run of Maven packages alone. The hubs are still read once more than lock discovery reads them: the two are different layers, and handing one read through costs more code than it saves.
  6. The purl unquoted in a shell command: fixed. The command names the coordinates alone; a Maven key can carry ?type=jar.
  7. The sentence and "maven.install" in two files: fixed, one helper in bazel/maven.rs for the warning and the statement.
  8. The workflow's path lists: fixed (patch/jar_manifest.rs added, three redundant entries removed).
  9. The contract row said that a --no-bazel run reads no Bazel file: fixed.

What it proves, and where

  • maven::an_agent_patch_beside_a_pinned_hub, real Bazel: the build prints the upstream marker before and after agent mode; the run, apply, vex and vex --no-verify each write one affected statement; after get <purl> --mode hosted the build prints the patched marker and vex says not_affected.
  • Without Bazel, in e2e_bazel_build/maven.rs: agent mode, then the hosted and the vendored command, in three checkouts. Where the command writes its entry, vex says not_affected after it. Under Bazel 7.3.0 and beside a second hub without a lock, the documents are affected before and after the command, with the code and the reason. vex --no-bazel, three hubs of which nothing is said, an rc file that names --noenable_bzlmod, a WORKSPACE file beside no named release and Bazel 6 give what the checkout gives without Bazel.
  • Unit tests: maven::upstream for each case of the decisions, a purl with qualifiers, m2local and an isolated usage; built::unbuilt on disk for a committed copy and a project below the root.

What was run, and what was not

Run on macOS arm64 at the final commit:

  • rustfmt check of the changed files; clippy of the workspace and of the e2e_bazel_build target with -D warnings; cargo check --workspace --all-targets --all-features.
  • The whole socket-patch-core unit suite (8547 passed) and the CLI unit suite (1065 passed).
  • 26 integration targets, all green, no existing expectation edited: e2e_bazel_build (without Bazel), e2e_bazel_maven_beside, cli, the six VEX targets, the four cli_parse_* ones, the five JVM ones (vendor_jvm_cli among them), apply, scan, vendor, rollback, repair and the three in_process_* ones.
  • The script tests, scripts/loc-budget.py (the bazel group: 4006 on the base, 4084 now), actionlint and the tool-pin check on the Maven workflow.
  • Real Bazel: all eight maven:: flows on 9.3.2 and 7.7.2, behind a logging proxy that refuses public Maven repositories; it refused no request.
  • With the product code of the commit before this round under the new tests, exactly the two changed tests without Bazel fail, and the agent flow fails on Bazel 9.3.2. Sixteen mutations of the new code are each caught: eleven at the final commit, five at the one before it, which the last commit leaves as they were.

Not run: Linux and Windows; Bazel 8.8.2 and 7.4.0; on real Bazel, a command that declines, a second hub, an rc file and a WORKSPACE file; scan --mode hosted --vex beside a hub that declines; the warning on a terminal at 80, 100 and 120 columns; the test targets that need real package managers, Docker or a public registry; a coverage build.

One harness helper changed in the first round: Cell::patches_outside compares the installed file as bytes (a jar is no text). Its Cargo and NuGet callers are unchanged.

🤖 Generated with Claude Code

…m its lock

Two tests, no product change, that record what socket-patch does today
in a workspace where a pinned rules_jvm_external hub
(`maven.install(lock_file = "//:maven_install.json", ...)`) fetches an
artifact and agent mode patches the jar of that artifact in the Maven
local repository:

- `maven::an_agent_patch_beside_a_pinned_hub`, on real Bazel: the
  checkout has a `pom.xml` that declares the artifact, and the jar is in
  the Maven local repository as a Maven build leaves it.
  `scan --mode agent --yes` exits 0, puts the patch service's jar in its
  place and writes nothing into the checkout but `.socket/`; `apply`
  passes and warns `maven_bazel_hub_unpatched`. `bazel build` and
  `bazel run //:consumer` print the upstream marker before the command
  and after it: the hub fetches the jar its lock pins, at the lock's
  sha256, and no build reads the Maven local repository.
- `maven::an_installed_jar_is_attested_beside_a_hub_that_fetches_its_own`,
  without Bazel: the same step in a checkout whose lock is written by
  the test, in the format rules_jvm_external 7.2 writes.

In both, `scan --mode agent --vex`, `apply --vex`, `vex` and
`vex --no-verify` each write an OpenVEX document whose one statement
says the artifact is `not_affected`, "Patched via Socket patch <uuid>".
That document is false for what Bazel builds. The tests assert it as it
is today and mark it KNOWN GAP, with what a fix changes.

What the tests share is in the Maven module: step 0 of a flow is split
into the layout of the checkout and the ruleset's pin, so that a
checkout no Bazel builds in can have the same stand-in, grants and
local repository; `Pinned::patches_the_installed_jar` runs the agent
step. `Cell::patches_outside` of the harness compares the installed
file as bytes, since a jar is no text; the Cargo and NuGet flows call it
as before.

The real-Bazel flow passes on Bazel 9.3.2 and 7.7.2 (macOS arm64) with
no change to the product, in about 20 s each.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hes the jar from its lock

Agent mode patches the jar of a Maven artifact where a build tool
installed it (the Maven local repository, a Gradle or Coursier cache).
In a Bazel workspace a pinned rules_jvm_external hub does not build that
jar: it takes the one its lock (`maven_install.json`) pins, at the
lock's sha256. `apply` already warns of it (`maven_bazel_hub_unpatched`).
The tests of the commit before this one measured the rest on Bazel 9.3.2
and 7.7.2: `bazel build` prints the upstream marker before and after
`scan --mode agent`, and `scan --vex`, `apply --vex`, `vex` and
`vex --no-verify` each attest the artifact as `not_affected`. That
document is false for what Bazel builds.

The document now says `affected` of such an artifact, as it does for
npm, PyPI, RubyGems, Cargo and NuGet: one statement of the package's
own, whose action statement names the lock of the hub, the
`maven.install` with its file and line, and the command that patches a
pinned hub, `socket-patch get <purl> --mode hosted` at the Bazel root,
or with `--mode vendored`. It ends with the `--no-bazel` sentence. The
warning is `vex_bazel_not_in_build`, `vex --json` reports a `skipped`
event with `details.status: "affected"`, the envelope is
`partialFailure`, the exit code is 0, and `--no-bazel`,
`--vex-no-bazel` and `SOCKET_VEX_NO_BAZEL` leave Bazel out of the
document, all through the code those ecosystems already run.

The command comes with a condition, in brackets: "a `maven_bazel_*`
warning of that run means that the Bazel build keeps the upstream jar".
Hosted and vendored mode write no entry for a hub where they cannot
show from the checkout that one works (Bazel before 7.4.0, an unknown
release of the ruleset, an rc file, a jar the lock lists under no
repository, an isolated `use_extension`). The command then exits 0 with
such a warning, and beside a `pom.xml` it has still pinned or vendored
the patch for the Maven build, which `vex` attests as `not_affected`.
That statement is wrong for the Bazel build. It is the one hosted mode
leaves there without an agent patch before it, so it is not new; it
is in the docs' list of where the document is still wrong, and the
action statement must not send a reader there without a word.

Where the answer comes from. The table of hubs in `bazel/built.rs`
decides by the project's own lock: where it lies from the project, what
it lists, and whether its text names the patch. None of that fits a
Maven hub. Its lock is no project's own and never names a patch (the
patch of a hub is an entry of the block in the root `MODULE.bazel`), and
whether a hub fetches a jar takes what `bazel/maven.rs` already reads
for hosted and vendored mode: the tags that make a hub of one name, the
lock in format 2 or 3 with its skipped and local artifacts, a
`maven.override`, a `maven_install` of a `WORKSPACE` file, the block. A
second reader could disagree with that one. So `built::unbuilt` asks
`maven::upstream`, new, which reads the hubs once with `Hubs::read` and
says for each jar what `Hubs::sure` and the block say:

- a pinned hub fetches the plain jar at that version, every hub of the
  workspace was read, and the block holds no entry for the jar: the hub,
  for a statement that says `affected`;
- anything else: nothing, and the statement stays the one of a project
  without Bazel. That is a jar no hub fetches, a jar the block patches,
  and every case in which something was not read: a hub without a
  `lock_file`, a tag or a lock that cannot be read, a `maven.override`
  of the artifact, a `maven_install` of a `WORKSPACE` file that Bazel
  may read, a block that was changed by hand.

`Hubs::sure`, not `Hubs::built`, because a block that was changed by
hand may still patch the jar, and its entries are not read. So `apply`
can warn `maven_bazel_hub_unpatched` (it asks `Hubs::built`) where the
document keeps `not_affected`: beside a hub that was not read. The docs
say so. The warning and the statement share the check of the block
(`Hubs::patches`).

Two things follow from taking that reader, and the docs say both:

- A `WORKSPACE` file. For the hubs of the table any such file that
  defines a repository leaves the statement as without Bazel. The Maven
  reader takes one for a doubt only when it calls `maven_install` or
  cannot be read, and only while the checkout names no Bazel 9 or
  later, which is the rule hosted mode writes its entries by. So beside
  a `WORKSPACE` file that defines other repositories a Maven jar is
  `affected`.
- `m2local`. A lock with it takes a jar that no repository lists from
  the Maven local repository, at the lock's sha256. Such a jar counts
  as fetched, and its statement says `affected`: the patched jar does
  not have that sha256 (read from the ruleset's source at 7.2 and 6.5,
  not built here). The lock's sha256 is not compared with the patch.

`Unbuilt::remedy` is a `String` now, since the Maven command names the
package. A hosted or vendored entry of the block keeps its statement:
the caller hands over no hosted pin, and a committed copy is not asked
about. Nothing is read without a Maven jar among the patched packages,
and nothing outside a Bazel workspace.

Tests. Unit tests of `maven::upstream` (each case above; another
version, a classifier and another packaging of the jar; a block's entry
for another version of the artifact; a `WORKSPACE` file without
`maven_install`; a jar under `m2local`) and of `built::unbuilt` on disk
(the sentence, a project below the Bazel root, a committed copy, the
block's entry). The two tests of the commit before now expect
`affected` with the action statement. Without Bazel, each of the two
modes the statement names is run after agent mode in a checkout of its
own: where the command writes its entry it gives no `maven_bazel_*`
warning and `vex` then says `not_affected`; in a checkout that names
Bazel 7.3.0 it writes none and warns `maven_bazel_release`, and the
`not_affected` that `vex` then writes is held as the known limit it is.
A second test holds `vex`, with `--no-bazel` and beside four hubs of
which nothing is said, to what it gives in the same checkout without
`MODULE.bazel` (exit code, both streams, the document), and
`apply --vex` to the line a person reads. On real Bazel the flow goes
on after the documents: the hosted command pins the Maven build and the
hub, the same build prints the marker of the patched jar, and `vex`
says `not_affected`.

Docs: the Maven cell of "Bazel workspaces: what is supported", the
agent paragraph and the last limit of "Bazel workspaces: Maven", the
section "Bazel workspaces: VEX" (the table of calls, the kinds of
patch, the action statement and its condition, what changes nothing,
what is tested, what is still wrong) and the rows
`vex_bazel_not_in_build` and `maven_bazel_hub_unpatched` of the CLI
contract. Two things that held before are now said. `--vex-no-bazel`
is about the document, and what `scan`, `apply` and `vendor` themselves
say in a Bazel workspace stays, such as `maven_bazel_hub_unpatched`: a
sentence of the docs and of the contract's paragraph on the installed
tree is narrowed to that. And a patch is judged only where the run
found it in place, so `vex` on a machine whose installed jar is not the
patched one ends as it does without Bazel. The Maven workflow names the
agent flow and starts its legs on a change to the VEX code and to the
two files agent mode patches a jar with. The size budget of `bazel/`
follows the code (4006 to 4051 lines).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`vex` and `--vex` say `affected` of a Maven artifact that agent mode
patched in an installed jar while a pinned rules_jvm_external hub
fetches that jar from its lock. This change makes the statement hold in
the cases around it where the document was still false, or said less
than socket-patch knows.

A patch in any mode. A hub reads no `pom.xml`, no Gradle file and no
vendored tree, so a hosted pin or a vendored copy of a Maven or Gradle
build is in the Bazel build only through an entry of the block in the
root `MODULE.bazel`. Hosted and vendored mode write no entry where they
cannot show that one works: they exit 0 with a `maven_bazel_*` warning
and pin or vendor for the other build. `vex` then attested that patch
as `not_affected` while the hub fetched the upstream jar, and the
action statement of an agent patch sent a reader into that state. The
Bazel step of `vex` now asks about every Maven patch, also one with a
hosted pin or a committed copy, so the document after a command that
declined still says `affected`. The statement is one for every mode:
"the patch is only in what Maven or Gradle builds from", and "If what
you ship is what Maven or Gradle builds and not what Bazel builds, pass
`--no-bazel`". The statements of the other ecosystems are word for word
what they were, and a hosted pin of another ecosystem is left alone as
before.

The hub that fetches the jar, not every hub. `maven::upstream` asked
`Hubs::sure`, which is the rule for writing an entry: any doubt, also
one about another hub, gave nothing. So beside a second hub without a
lock `apply` warned that the Bazel build stays unpatched while the
document of the same run said `not_affected`. It now asks
`Hubs::built`: a pinned hub that was read fetches the jar, and no
`maven.override` names the artifact. A block that was changed by hand
may hold an entry, so it still gives nothing.

An entry of this patch. Any entry of the block for the jar counted as
"Bazel builds the patch". The entry of another patch than the one the
document attests does not: the statement is `affected`, and names that
entry first.

Whether Bazel reads `MODULE.bazel`. Nothing is said where the checkout
does not show that it does: `.bazeliskrc` or `.bazelversion` names a
Bazel before 7.0; neither names a release while a `WORKSPACE` file
defines a repository; or an rc file names an option that switches
Bzlmod off or drops tags of the root, or cannot be read. Such an option
is found on whatever line, so it may hold for one `--config` alone:
with it neither the hub nor an entry of the block is certain, which is
why an entry of hosted mode is not attested there either. Before, a
checkout that switched Bzlmod off got `affected` from a file that Bazel
does not read. While a release from 7.0 on is named, Maven keeps its
finer rule for a `WORKSPACE` file: a `maven_install` there is another
hub, and changes nothing for the hub that was read.

What to do. The action statement named `get <purl> --mode hosted`
whether or not that command would write an entry. `upstream` now gives
the remedy with the hub. Where hosted or vendored mode writes the entry
(`Hubs::label` and `settings`, as for a run) it is the command. Where
they do not, it is "Hosted and vendored mode write no entry for this
hub (`<code>`): <reason>.", with the code and the reason of the warning
that the command gives. One helper builds the command for the statement
and for the `maven_bazel_hub_unpatched` warning, from the coordinates
of the jar: a purl with qualifiers (`?type=jar&...`) no longer puts `?`
and `&` into a command for a shell. `"maven.install"` and the sentence
moved from `bazel/built.rs` to `bazel/maven.rs` with it.

`built::unbuilt` no longer parses the workspace for its table of hubs
in a run that has only Maven packages. The hubs and their locks are
still read once more than lock discovery reads them for the block: the
two are different layers of a run, and a read is one `MODULE.bazel`
with the locks it names.

Tests. `maven::upstream` has one unit test with a line per case above.
Without Bazel, `e2e_bazel_build` runs agent mode and then the hosted
and the vendored command in three checkouts: where the command writes
its entry (`not_affected` after it), and under Bazel 7.3.0 and beside a
second hub without a lock (`affected` before and after, with the code
and the reason in the place of the command). It holds the statement of
a project without Bazel beside an rc file that names
`--noenable_bzlmod` for one config, beside a `WORKSPACE` file with no
release named, and under Bazel 6. No existing test expected
`not_affected` for a hosted or vendored Maven patch whose hub got no
entry: each of them writes the entry, and passes as it was.

docs/ecosystems.md, the CLI contract and the line budget of `bazel/`
(4051 to 4084 implementation lines) follow. The contract's row of
`vex_bazel_not_in_build` no longer says that a `--no-bazel` run reads
no Bazel file: the option is about the document, and `apply` still
reads the workspace for its own warning.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The path lists of the Maven real-Bazel workflow name the files agent
mode patches a jar with, because one of its flows does that. They had
`patch/jvm_jar.rs` and `patch/jar_members.rs`. The second calls
`patch/jar_manifest.rs`, which was missing, so a change to how the
manifest of a signed jar is rewritten did not start the legs. It is in
both lists now.

Two kinds of entry said nothing: `vex/**` covers
`vex/discover/maven.rs` and `vex/discover/bazel_maven.rs`, and in the
push list `commands/**` covers `commands/vex*.rs`. They are removed,
and the comment says that lock discovery is under `vex/`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`maven::upstream` gave nothing whenever the block of `MODULE.bazel` was
changed by hand, because such a block may hold an entry. For a block
that can hold one, that check decided nothing: an `override_repo`
outside the block as socket-patch writes it is a call the workspace
reader does not follow, so no hub is read beside it, and nothing is
said of any jar. What the check did decide is a block that overrides
nothing any more (its first and its last line, say). That one holds no
entry and the hub fetches the upstream jar: `apply` warns
`maven_bazel_hub_unpatched` there, and the document said `not_affected`.

The check is removed. Such a checkout gets `affected`, and the statement
says why no mode patches the hub, in the words of the hosted command's
warning: the block was changed by hand (`maven_bazel_unreadable`). The
unit test of `upstream` holds both blocks, and the docs and the CLI
contract say which one keeps the statement of a project without Bazel.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review November 25, 2026 09:58
@cursor

cursor Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes VEX attestation semantics for Maven in Bazel workspaces (documents may flip from not_affected to affected), which affects compliance reporting; logic is extensive but heavily tested.

Overview
VEX in Bazel workspaces now treats Maven like other hub ecosystems: when a patch exists in Maven/Gradle’s tree or in agent mode’s local jar, but a pinned rules_jvm_external hub still builds the plain jar and MODULE.bazel has no entry for that patch, statements are affected (with hub lock, maven.install location, and remediation via hosted/vendored get, or the maven_bazel_* reason when no entry can be written). Previously those cases were attested as patched/not_affected while Bazel still used the upstream jar.

Implementation routes Maven through bazel::maven::upstream from built::unbuilt, with Maven-specific action text in vex.rs (including --no-bazel / ship-Maven-vs-Bazel wording). Docs, CLI_CONTRACT.md, CI path filters for the agent + VEX flow, e2e tests (with and without real Bazel), and a small loc budget bump for bazel/ complete the change.

Reviewed by Cursor Bugbot for commit 6016a39. Configure here.

@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Nov 25, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

[agent] PR shepherd: review brief for the approver

What it does. In a Bazel workspace where a pinned rules_jvm_external hub (maven.install with a lock) fetches a jar, vex / --vex now says affected for a Maven patch of that jar if the MODULE.bazel block has no entry for that patch. This holds in every mode: agent, a hosted pin of a pom.xml or Gradle file, and a vendored copy. Before, it said not_affected while bazel build used the upstream jar. The action statement names the hosted or vendored command that patches the hub, or the maven_bazel_* reason those modes give for writing no entry.

Risk: medium. It changes no file a user's install or build reads. Only the VEX output changes, and it gets stricter: some documents that said not_affected will now say affected, also after a hosted or vendored command that declined. That is the first "decision for the maintainer" in the description. Any doubt about the hub (a Bazel before 7.0, an rc file that turns Bzlmod off, an override, a block changed by hand) still gives the old not_affected statement. The PR is stacked on #2224 (base bazel-vex/04-cargo-nuget-installed).

Look here.

  • vex.rs:1953: Maven hosted pins are now judged too. This is the one-condition switch behind decision 1.
  • vex.rs:2009: the Maven wording. The other ecosystems' statements keep the same text.
  • built.rs:364: jars merges the Maven verdicts into the table's results.
  • maven.rs:1764 and :1774: upstream and its check that Bazel actually reads MODULE.bazel (release, WORKSPACE, rc options).
  • maven.rs:1787: an entry for a different patch of the same jar still gives affected.

Verified. I read the diff against the base branch (9 files, +984/−132). Non-Maven purls are left alone (upstream returns None for them). The shared action-statement text for the other ecosystems is unchanged, and CHANGELOG.md is untouched. CI on 6016a39: ci-ok and clippy are green. Every maven / bazel leg passed, including 7.4.0 and 7.7.2, as did the Windows Maven and Gradle vendor e2e jobs and Cursor Bugbot. There are no review threads. The only red checks are test (windows-latest, 1) and e2e-windows (… e2e_redirect_pnpm_build …), which fail on main too (#2238, #2235), plus their ci-ok (windows only) rollup.

Changes I made. None.

Open questions.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant