Skip to content

Conversation

@eyalk007
Copy link
Collaborator

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

When JFrog CLI auto-detects multiple working directories, ConvertToSimpleJson flattens all results together, losing the association between vulnerabilities and their specific working directories. In cases of multi-module, this causes fixes to be attempted at root level and not the correct target.

This fix:

  • Processes each target separately using ConvertTargetToSimpleJson
  • Maintains working directory association for accurate fixing
  • Handles both single and multiple auto-detected targets uniformly

@eyalk007 eyalk007 requested a review from orto17 December 18, 2025 16:05
@eyalk007 eyalk007 self-assigned this Dec 18, 2025
@eyalk007 eyalk007 added the bug Something isn't working label Dec 18, 2025
@eyalk007 eyalk007 added the safe to test Approve running integration tests on a pull request label Dec 18, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 18, 2025
@eyalk007 eyalk007 force-pushed the fix-multi-target-flattening branch from e6cc8fc to fa8cc30 Compare December 18, 2025 20:17
When JFrog CLI auto-detects multiple working directories, ConvertToSimpleJson
flattens all results together, losing the association between vulnerabilities
and their specific working directories.

This fix:
1. Uses IncludeTargets parameter to filter each target separately
2. Limits package handler file walks to current directory only
   - Prevents fixing vulnerabilities in auto-detected subdirectory targets
   - Each target processes its own descriptor files independently

Depends on: IncludeTargets feature in jfrog-cli-security
(currently in attiasas/convert_include_targets branch)
Removed comment about subdirectories being separate targets.
@eyalk007 eyalk007 added the safe to test Approve running integration tests on a pull request label Jan 1, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jan 1, 2026
@eyalk007 eyalk007 added the safe to test Approve running integration tests on a pull request label Jan 1, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jan 1, 2026
With file walk limited to current directory, subdirectory descriptors are no
longer updated. This is intentional to prevent cross-contamination when CLI
auto-detects subdirectories as separate targets.
@eyalk007 eyalk007 added the safe to test Approve running integration tests on a pull request label Jan 1, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Jan 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2026

👍 Frogbot scanned this pull request and did not find any new security issues.


@eyalk007 eyalk007 merged commit fd9d100 into jfrog:dev Jan 1, 2026
30 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants