0

我正在使用 Xray post API 进行伪影扫描

https://artifacts.org/xray/api/v1/scanArtifact

作为回应,我得到了以下信息

{
    "info": "Scan of artifact is in progress"
}

我如何获得此扫描的结果,是否有用于此的 API?

4

1 回答 1

0

您可以使用以下 api 来获取 am artifact 的 Xray Scan 结果:

https://artifacts-company.org/artifactory/ui/artifactxray?path=hello-world/v1/manifest.json&repoKey=my-local-repository

这将返回以下响应:

{
    "xrayIndexStatus": "High",
    "xrayIndexStatusLastUpdatedTimestamp": "15-01-21 08:24:23 +00:00",
    "xrayBlocked": false,
    "xrayBlockReason": "",
    "detailsUrl": "https://artifacts-company.org/web/#/component/details/docker:~2F~2Fhello-world"
}

然后,您可以使用字段 xrayIndexStatus 来获取扫描状态作为结果。

于 2021-01-19T16:43:37.363 回答