Skip to content

Add validation error if required package not installed for the AM#604

Open
attiasas wants to merge 14 commits intojfrog:devfrom
attiasas:guard_am_requirments
Open

Add validation error if required package not installed for the AM#604
attiasas wants to merge 14 commits intojfrog:devfrom
attiasas:guard_am_requirments

Conversation

@attiasas
Copy link
Collaborator

@attiasas attiasas commented Nov 4, 2025

Add pre-flight validation for required system tools before Advanced Security scans

Summary

This PR adds a validation step that checks whether required system executables (git, unzip, curl) are installed before running JFrog Advanced Security (JAS) scans. If any tool is missing from the system PATH, a clear error is returned early — preventing confusing downstream failures from the Analyzer Manager.

Changes

  • jas/analyzermanager.go — Added a scannersRequiredInstalledSoftware list (git, unzip, curl) and a new ValidateRequiredInstalledSoftware() function that uses exec.LookPath to verify each tool is available.
  • commands/audit/audit.go — Call the new validation after confirming JAS entitlement and that a JAS scan is actually requested (via IsJASRequested), returning early with a general error if validation fails.
  • commands/scan/scan.go — Same validation gate added in the binary-scan init path (initScanCmdResults), so both audit and scan commands are covered.

Notes

  • The validation is only performed when the user is entitled for JAS and a JAS-type scan is actually requested, avoiding unnecessary checks for SCA-only workflows.
  • Glibc may not be installed on some OS
  • According to: Required Packages

  • 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.

@attiasas attiasas added the improvement Automatically generated release notes label Nov 4, 2025
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Nov 4, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 4, 2025
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Nov 23, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 23, 2025
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Nov 23, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 23, 2025
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Feb 24, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Feb 24, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Feb 25, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Feb 25, 2026
@attiasas attiasas requested a review from a team February 25, 2026 13:32
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Mar 10, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 10, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Mar 10, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant