feat(fix): add --dynamic-sbom-inference - #1563
Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Open
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 7 commits into
Conversation
Generate Socket facts for every Gradle, sbt and Maven build root, upload them with the other manifests and have Coana attribute Maven artifacts only through them, so a fix lands only in the modules that resolve the vulnerable dependency. The generated files are restored after each PR-mode reset and removed once the fix is done. Facts files already present are still refused. PR mode now commits the files Coana reports writing, falling back to the uploaded manifest names, so build-script edits are no longer dropped.
Untracked files the fix reports writing, such as new sbt override files, were left out of the commit because only git's tracked changes were considered.
The facts files merge components by version across a build, so they over-approximate which projects resolve a dependency. socket fix --dynamic-sbom-inference now keeps the sidecar's per-project classpaths, without resolving artifact paths, and passes it to compute-fixes-and-upgrade-purls.
Jeppe Fredsgaard Blaabjerg (jfblaa)
marked this pull request as ready for review
September 26, 2026 16:42
Jeppe Fredsgaard Blaabjerg (jfblaa)
requested a review
from Martin Torp (mtorp)
September 26, 2026 16:42
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b9e5dfc. Configure here.
…om-inference # Conflicts: # CHANGELOG.md
This branch has not been deployed
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.

LLM Description written by Claude Code:claude-opus-5-5
Summary
socket fix --dynamic-sbom-inferencegenerates Socket facts for every Gradle, sbt and Maven build root, uploads them, and has Coana attribute Maven artifacts only through them. A fix then lands only in the modules that actually resolve the vulnerable dependency, instead of everywhere depscan's coordinate-merged SBOM points.gradle.properties, sbtproject/*.scala) and files the fix creates are no longer dropped from fix PRs.Note
Medium Risk
Opt-in flag runs real JVM builds and changes Coana inputs and PR commit contents; incorrect attribution or missing files would affect automated fix PRs.
Overview
Adds
socket fix --dynamic-sbom-inference, wiring the fix flow through the same per-build-root Socket facts generation used for scans. For Gradle, sbt, and Maven it generates.socket.facts.jsonper independent build root, uploads them with the manifest tar, and passes--maven-use-only-socket-factsplus a--compute-artifacts-sidecarclasspath sidecar into Coana so fixes land only in modules that actually resolve the vulnerable dependency. Generated facts are backed up and restored after each PR-mode branch reset, then removed when the run finishes; pre-existing facts files in the repo are still rejected.PR-mode fix commits no longer filter changes to uploaded manifest basenames only. When Coana reports
modifiedFiles, the CLI commits exactly those paths from unstaged and untracked git listings (via newgitUntrackedFiles), so edits likegradle.properties, sbtproject/*.scala, and newly created override files are included in fix PRs.Supporting changes:
generateSocketFactsForFix, optional sidecar collection inrunDynamicSbomInference/accumulateSidecarwithout resolving artifact paths, bundled@coana-tech/cli15.11.0, and unit tests for the new fix path.Reviewed by Cursor Bugbot for commit b9e5dfc. Configure here.