Skip to content

Support all attributes in Central Configs#670

Open
attiasas wants to merge 53 commits into
jfrog:devfrom
attiasas:pass_wd_to_xray_lib
Open

Support all attributes in Central Configs#670
attiasas wants to merge 53 commits into
jfrog:devfrom
attiasas:pass_wd_to_xray_lib

Conversation

@attiasas
Copy link
Copy Markdown
Collaborator

@attiasas attiasas commented Feb 12, 2026

feat(audit): config-profile scan targets, include/exclude, and xray-lib working dirs

Depends on:

Analyzer-Manager minimum version: 1.33.0

Summary

Aligns audit, git audit, SCA (Xray-Lib), and JAS scanners with JFrog Platform config profiles: per-target include/exclude patterns, scanner enablement, secret validation, partial results, and custom analyzer download paths. Passes resolved include directories and exclusions into Xray-Lib instead of global ignore patterns, and refactors scan execution around an enriched ScanTarget model.

Changes

  • Audit / scan orchestration (commands/audit/, commands/scan/, commands/git/audit/): target discovery via GetTargetsInfo; populate ScanTarget with include/exclude and central-config modules; honor config-profile scanner toggles and allow_partial_results; wire custom releases repo for Xray-Lib plugin download.
  • Xray-Lib BOM (sca/bom/xrayplugin/): pass IncludeDirs and per-target SCA exclusions to the plugin; remove WithTotalTargets / WithIgnorePatterns; support WithCentralRemoteReleasesDetails for profile-driven dependency downloads.
  • JAS scanners (jas/, jas/runner/): run against results.ScanTarget (include roots, profile exclusions); consolidate config-profile skip logic; fix SARIF invocation working directory to reflect scan target, not analyzer-manager temp dir; per-target secret validation via IsSecretValidationActive.
  • Results model (utils/results/): ScanTarget gains Include, Exclude, Technologies[], CentralConfigModules; skippable GeneralErrors / TargetErrors for partial results; helpers for central-config scan requests and exclusions; expanded unit tests.
  • Path / exclusion utilities (utils/paths.go, utils/techutils.go): pattern handling for include/exclude during recursive scans.
  • Git audit (commands/git/audit/): fetch config profile by clone URL; hidden --use-config-profile flag (default true); validate single-module profile constraints.
  • CLI (cli/docs/flags.go, cli/gitcommands.go): expose WorkingDirs on audit; add hidden use-config-profile.
  • Output / parsers (utils/results/conversion/, utils/results/output/): adapt to multi-technology targets and updated error shapes.
  • Dependencies (go.mod, go.sum): bump jfrog-client-go and jfrog-cli-artifactory.

Notes

  • Behavioral / API shifts: single Technology on ScanTarget replaced by Technologies[]; GeneralError replaced by GeneralErrors (SkippableError); JAS ScannerCmd adds target-based Run with DeprecatedRun for legacy jfrog-apps-config modules.
  • Git audit config profile is limited to one module with path_from_root: "." (enforced in verifyConfigProfile).
  • In the new flow, jfrog-apps-config.yml is deprecated – flags, env vars, or central JFrog Platform config should be used instead.
  • The old graph-based flow is untouched and still loads jfrog-apps-config as before.

@attiasas attiasas added the ignore for release Automatically generated release notes label Feb 12, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Feb 12, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Feb 12, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Feb 17, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Feb 17, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Feb 19, 2026
Comment thread utils/paths.go
Comment thread commands/audit/audit.go Outdated
Comment thread jas/applicability/applicabilitymanager.go Outdated
Comment thread jas/iac/iacscanner.go Outdated
Comment thread jas/sast/sastscanner.go Outdated
Comment thread jas/secrets/secretsscanner.go Outdated
Comment thread jas/common.go Outdated
Comment thread jas/common_test.go
Comment thread sca/bom/bomgenerator.go
Comment thread sca/bom/bomgenerator.go
Comment thread sca/scan/scascan.go
log.Debug(fmt.Sprintf("%sSkipping SCA for %s as requested by input...", logPrefix, params.ScanResults.Target))
return false, nil
}
if params.ScanResults == nil {
Copy link
Copy Markdown
Contributor

@eranturgeman eranturgeman May 10, 2026

Choose a reason for hiding this comment

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

I see this check existed before, but I dont think it is really a possible usecase. we can leave it for safety though

}

func TestPrepareSimpleJsonVulnerabilities_Technology(t *testing.T) {
testCases := []struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe add another testcase with multi-rows and different technologies?

Comment thread jas/applicability/applicabilitymanager.go
Comment thread jas/iac/iacscanner.go
Comment thread jas/sast/sastscanner.go
Comment thread utils/utils_test.go
Comment thread utils/utils.go
Copy link
Copy Markdown
Contributor

@eranturgeman eranturgeman left a comment

Choose a reason for hiding this comment

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

LGTM! see my comments

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.

2 participants