jfrog-client-go icon indicating copy to clipboard operation
jfrog-client-go copied to clipboard

build scan command with flag --project is returning xray_details_url without project key

Open bhanurp opened this issue 2 years ago • 0 comments

Describe the bug

jf bs <BUILD_NAME> <BUILD_NUMBER> --project MyProject --format json should return "xray_data_url" with projectKey as query param as shown below

[ { "xray_data_url": "http://localhost:8046/xray/ui/scans-list/builds-scans/docker-local-build/scan-descendants/359014?version=359014\u0026package_id=build%3A%2F%2F%5Bbhanu-build-info%5D%2Fdocker-local-build\u0026build_repository=bhanu-build-info\u0026component_id=build%3A%2F%2F%5Bbhanu-build-info%5D%2Fdocker-local-build%3A359014\u0026page_type=security-vulnerabilities\u0026exposure_status=to_fix\u0026projectKey=bhanu" } ]

Current behavior

The response is shown without projectKey in the query params

[ { "xray_data_url": "http://localhost:8046/xray/ui/scans-list/builds-scans/docker-local-build/scan-descendants/359014?version=359014\u0026package_id=build%3A%2F%2F%5Bbhanu-build-info%5D%2Fdocker-local-build\u0026build_repository=bhanu-build-info\u0026component_id=build%3A%2F%2F%5Bbhanu-build-info%5D%2Fdocker-local-build%3A359014\u0026page_type=security-vulnerabilities\u0026exposure_status=to_fix" } ]

Reproduction steps

Use below command for build scan associated with any project apart from default and see that projectKey is missing in query params returned in xray_data_url.

jf bs docker-local-build 1 --fail=false --format=json --project <PROJECT_NAME>

Expected behavior

Should return projectKey as query param in xray_data_url

JFrog Client-Go version

1.35.0

JFrog CLI version (if applicable)

No response

Operating system type and version

mac, linux

JFrog Artifactory version

No response

JFrog Xray version

3.83.7

bhanurp avatar Dec 08 '23 11:12 bhanurp