Skip to content

XRAY-144809 - CA command [Maven]: Add option to consider plugin deps#771

Merged
attiasas merged 3 commits into
jfrog:devfrom
gauriy-tech:feature/XRAY-144809-include-mvn-plugins
Jun 9, 2026
Merged

XRAY-144809 - CA command [Maven]: Add option to consider plugin deps#771
attiasas merged 3 commits into
jfrog:devfrom
gauriy-tech:feature/XRAY-144809-include-mvn-plugins

Conversation

@gauriy-tech

@gauriy-tech gauriy-tech commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Full details about the RCA and Fix is described here https://jfrog-int.atlassian.net/browse/XRAY-144809?focusedCommentId=1115010

After Fix
Screenshot 2026-06-01 at 10 40 30 PM
Screenshot 2026-06-01 at 10 58 21 PM

Before Fix
Before_Fix

@gauriy-tech gauriy-tech force-pushed the feature/XRAY-144809-include-mvn-plugins branch from cda523a to 61a0c42 Compare June 1, 2026 05:20
@gauriy-tech gauriy-tech force-pushed the feature/XRAY-144809-include-mvn-plugins branch from 61a0c42 to 93373e9 Compare June 2, 2026 05:34
Comment thread sca/bom/buildinfo/technologies/java/mvn_test.go
Comment thread sca/bom/buildinfo/technologies/java/mvn.go
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn_test.go
Comment thread sca/bom/buildinfo/technologies/java/mvn_test.go Outdated
@gauriy-tech gauriy-tech force-pushed the feature/XRAY-144809-include-mvn-plugins branch from 93373e9 to 086f4ce Compare June 8, 2026 04:52
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
Comment thread sca/bom/buildinfo/technologies/java/mvn.go Outdated
@gauriy-tech gauriy-tech force-pushed the feature/XRAY-144809-include-mvn-plugins branch from 086f4ce to 5e9df69 Compare June 8, 2026 07:11
@gauriy-tech gauriy-tech force-pushed the feature/XRAY-144809-include-mvn-plugins branch from 5e9df69 to 1eaaa16 Compare June 8, 2026 08:03
@gauriy-tech

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@attiasas attiasas requested a review from a team June 8, 2026 09:55

@attiasas attiasas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!
Please add an integration test case with a project replicating that.
I would consider also adding this option to jf audit command. most of the logic is the same, users may want to include this in their scan as well

Comment thread cli/docs/flags.go
@attiasas

attiasas commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Also, why this is not implemented in maven-dep-tree? I may be a better solution
https://github.com/jfrog/maven-dep-tree

@gauriy-tech

Copy link
Copy Markdown
Contributor Author

This is needed by a customer, we have consider it to take as a long term solution in https://github.com/jfrog/maven-dep-tree in upcoming quarter

@gauriy-tech

Copy link
Copy Markdown
Contributor Author

Keeping it for curation scope for this PR , will connect with audit team to discuss enabling for their workflow

@gauriy-tech gauriy-tech force-pushed the feature/XRAY-144809-include-mvn-plugins branch from 1eaaa16 to 11f8efd Compare June 9, 2026 07:10
@gauriy-tech

Copy link
Copy Markdown
Contributor Author

Added an integration test case maven tree - one blocked plugin dependency in TestDoCurationAudit (commands/curation/curationaudit_test.go), with a new fixture under tests/testdata/projects/package-managers/maven/maven-curation-plugin-deps/.

What it tests (real mvn run against the mock curation server):

jf ca --mvn-include-plugin-deps detects a curation-blocked artifact that only enters the build via a Maven build plugin's transitive closure — the exact "0 blocked in jf ca but build is blocked" scenario.
Fixture pins maven-jar-plugin:3.4.1, whose fixed closure pulls org.ow2.asm:asm:9.8 (via plexus-archiver:4.9.2). asm is not in mvn dependency:tree, so without the flag it's invisible.
Verifies the end-to-end path: flag wiring → dependency:resolve-plugins → parse → inject into dep graph → curation HEAD probe → blocked PackageStatus (org.ow2.asm:asm:9.8, maven, {pol1, cond1}).

…include-mvn-plugins

# Conflicts:
#	commands/curation/curationaudit.go
#	sca/bom/buildinfo/technologies/common.go
@attiasas

attiasas commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This is needed by a customer, we have consider it to take as a long term solution in https://github.com/jfrog/maven-dep-tree in upcoming quarter

Should be documented that this is a "temp" fix. I whould rather you add it to the actual maven-dep-tree repo and we will add this only if its urgent until actually implemented. should be documented and tracked

@gauriy-tech

Copy link
Copy Markdown
Contributor Author

This is needed by a customer, we have consider it to take as a long term solution in https://github.com/jfrog/maven-dep-tree in upcoming quarter - https://jfrog-int.atlassian.net/browse/XRAY-145307

@gauriy-tech gauriy-tech requested a review from attiasas June 9, 2026 07:40
@attiasas attiasas added new feature Automatically generated release notes safe to test Approve running integration tests on a pull request labels Jun 9, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Jun 9, 2026
@attiasas attiasas changed the title XRAY-144809 - Fixed maven to consider plugin deps during jf ca XRAY-144809 - CA command [Maven]: Add option to consider plugin deps Jun 9, 2026

@attiasas attiasas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for now. pending to see logic moved to maven-dep-tree

@attiasas attiasas merged commit be8d63a into jfrog:dev Jun 9, 2026
57 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants