harbor
harbor copied to clipboard
It needs to provide the log view for the failure sbom generation
I scanned one artifact, and see the failure in the job as below. But, the UI shows the NOT generated, rather the link for the log view.
2024-04-23T05:37:13Z [INFO] [/pkg/scan/job.go:412]: { "uuid": "6461acfc-0132-11ef-b933-0242ac140009", "name": "Trivy", "description": "The Trivy scanner adapter", "url": "http://trivy-adapter:8080", "disabled": false, "is_default": true, "health": "healthy", "auth": "", "access_credential": "[HIDDEN]", "skip_certVerify": false, "use_internal_addr": true, "adapter": "Trivy", "vendor": "Aqua Security", "version": "v0.50.1", "create_time": "2024-04-23T05:29:01.590215Z", "update_time": "2024-04-23T05:29:01.590217Z" } 2024-04-23T05:37:13Z [INFO] [/pkg/scan/job.go:412]: { "registry": { "url": "http://core:8080", "authorization": "[HIDDEN]" }, "artifact": { "namespace_id": 2, "repository": "redis/redis", "tag": "", "digest": "sha256:c8bddd2d737b53d6a1ddce98aa07d940b5ed99e8edcbb62c9f7d4248ef51f6ad", "mime_type": "application/vnd.oci.image.manifest.v1+json", "size": 2279950 }, "enabled_capabilities": null } 2024-04-23T05:37:13Z [INFO] [/pkg/scan/job.go:174]: Report mime types: [application/vnd.security.sbom.report+json; version=1.0] 2024-04-23T05:37:13Z [INFO] [/pkg/scan/job.go:231]: Get report for mime type: application/vnd.security.sbom.report+json; version=1.0 2024-04-23T05:37:15Z [INFO] [/pkg/scan/job.go:257]: Report with mime type application/vnd.security.sbom.report+json; version=1.0 is not ready yet, retry after 5 seconds 2024-04-23T05:37:20Z [INFO] [/pkg/scan/job.go:257]: Report with mime type application/vnd.security.sbom.report+json; version=1.0 is not ready yet, retry after 5 seconds 2024-04-23T05:37:25Z [ERROR] [/pkg/scan/job.go:296]: scan job: fetch scan report, mimetype application/vnd.security.sbom.report+json; version=1.0: running trivy wrapper: running trivy: exit status 1: 2024-04-23T05:37:22.861Z INFO"--format spdx" and "--format spdx-json" disable security scanning 2024-04-23T05:37:22.954Z FATAL image scan error: scan error: scan failed: failed analysis: analyze error: pipeline error: failed to analyze layer (sha256:dd41297d45723839bbb1a320db59d9b1c01a6a7d6667e8fff9577e9498e11cd6): walk error: failed to extract the archive: archive/tar: invalid tar header : general response handler: unexpected status code: 500, expected: 200
Are you sure the sbom_overview field is return to UI with scan_status=error
With the pr #20358 merged, it could display the log and status is Error