我已创建以下调用来导出 JFrog X-ray SBOM 数据curl -u $USER_NAME:$API_KEY -X POST $ARTIFACT_DOMAIN_URL/xray/api/v1/component/exportDetails \-H \'Content-Type: application/
我创建了以下调用来导出 JFrog X-ray SBOM 数据
curl -u $USER_NAME:$API_KEY -X POST $ARTIFACT_DOMAIN_URL/xray/api/v1/component/exportDetails \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-o "test.json" \
-d '{
"component_name": "docker://test-docker-image:latest",
"package_type": "docker",
"sha_256": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"violations": true,
"include_ignored_violations": false,
"license": true,
"exclude_unknown": false,
"security": true,
"malicious_code": false,
"iac": false,
"services": false,
"applications": false,
"output_format": "json",
"spdx": false,
"cyclonedx": true,
"cyclonedx_format": "json",
"vex": false,
"operational_risk": false
}'
输出写在 test.json 文件中,但它是二进制格式,我无法读取它,也无法在终端上看到结果。
如果我尝试在终端上查看输出,我会收到以下警告消息
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
如果有人知道这个问题的解决方案或除了从 UI 导出 X 射线 SBOM 数据的任何其他方法,请告诉我。