Skip to content

Xray component resolution - #1355

Open
attiasas wants to merge 17 commits into
jfrog:masterfrom
attiasas:xray_component_resolution
Open

Xray component resolution#1355
attiasas wants to merge 17 commits into
jfrog:masterfrom
attiasas:xray_component_resolution

Conversation

@attiasas

@attiasas attiasas commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add client support for Xray Zero Touch Remediation (POST api/v1/ztr/lockfile/remediate). The API resolves lockfile dependencies against a virtual repository and returns an updated lockfile plus a list of packages whose integrity was changed.

Treats HTTP 503 as “feature disabled”: Remediate returns the original lockfile and disabled=true instead of an error.

Changes

  • Add ZeroTouchRemediationService and Remediate() in xray/services/zerotouchremediation.go, calling api/v1/ztr/lockfile/remediate with scoped project key support. Retries are disabled for this request (no retry on 5xx).
  • Add request/response types: ComponentResolutionRequest (build-tool, repo, lockfile as string), ComponentResolutionResponse (lockfile string, changes), and Change (package, before_integrity, after_integrity).
  • Expose XrayServicesManager.ZeroTouchRemediation() in xray/manager.go.
  • Extend the Xray mock server with a Zero Touch Remediation handler and npm/maven fixtures, including a disabled (503) case.
  • Add integration tests in tests/xrayzerotouchremediation_test.go.
  • Document usage in README.md under “Zero Touch Remediation”.

Testing

Integration tests added:

  • TestZeroTouchRemediationService_Remediate_NpmBuildTool_NoChanges
  • TestZeroTouchRemediationService_Remediate_Disabled_NoChanges
  • TestZeroTouchRemediationService_Remediate_MavenBuildTool_Changes

Run with: go test -tags=itest ./tests/ -run TestZeroTouchRemediationService

@attiasas attiasas added safe to test Approve running integration tests on a pull request new feature Automatically generated release notes labels Jun 17, 2026
@attiasas attiasas added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Jun 18, 2026
@attiasas attiasas added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Jun 23, 2026
@attiasas attiasas added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Jun 23, 2026
@attiasas attiasas removed the safe to test Approve running integration tests on a pull request label Jun 23, 2026
@attiasas attiasas added the safe to test Approve running integration tests on a pull request label Jun 23, 2026
@attiasas
attiasas deployed to build-gate August 27, 2026 07:18 — with GitHub Actions Active
@attiasas
attiasas deployed to build-gate August 27, 2026 08:28 — with GitHub Actions Active
@attiasas
attiasas requested a review from a team August 27, 2026 08:40
@attiasas
attiasas deployed to build-gate August 27, 2026 09:06 — with GitHub Actions Active
@attiasas
attiasas deployed to build-gate August 27, 2026 10:31 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

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


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 safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant