{{ message }}
Submit resolved Gradle dependency graph to Dependabot#288
Merged
Conversation
Three open Dependabot alerts (CVE-2026-34477, CVE-2026-34478, CVE-2026-34480) flag log4j-core < 2.25.4 with manifest_path settings.gradle.kts and relationship "transitive". They come from the SpotBugs Gradle plugin: spotbugs:4.8.6 (and 4.9.x) declares log4j-core 2.23.1 / 2.24.3 transitively in its POM. The build already forces log4j-core 2.25.4 in the spotbugs configuration (build.gradle.kts:113), so the resolved classpath is patched. But Dependabot's dependency graph for this repo is built by static analysis of the build files, which cannot see resolutionStrategy.force, so it keeps reporting the unforced transitive version. Add a workflow that runs gradle/actions/dependency-submission on push to main. The action resolves every configuration and submits the resulting graph to GitHub, replacing the static one. Dependabot then sees log4j-core 2.25.4 everywhere and auto-closes these false positives. It also covers any future transitive declarations from plugin POMs. Signed-off-by: Matteo Merli <mmerli@apache.org>
6fccfca to
a2f431b
Compare
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
spotbugsconfiguration (build.gradle.kts:113), so the resolved classpath is patched. Dependabot's static analysis of the build files cannot seeresolutionStrategy.force, so the alerts persist.gradle/actions/dependency-submission@v4on push to main. It resolves every configuration and submits the actual graph to GitHub. Dependabot then sees log4j-core 2.25.4 everywhere and auto-closes these false positives, and any future plugin-POM noise of the same shape.Test plan
settings.gradle.ktsno longer listslog4j-core: = 2.23.1(via GraphQLdependencyGraphManifestsor the repo's Insights → Dependency graph view)