Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/api/v1/scan/{scan_request_id}/report should send http 400 when the sbom_media_type is missed for sbom scan #444

Open
stonezdj opened this issue Feb 24, 2024 · 1 comment

Comments

@stonezdj
Copy link

What steps did you take and what happened:

After send a SBOM request to /api/v1/scan
and the subsequent request to retrieve the sbom
GET /api/v1/scan/{scan_request_id}/report?sbom_media_type=xxxx, if the sbom_media_type is missed in the parameter
Current return code is 404 not found.

What did you expect to happen:

The API should return 400 to the client and also log the error message in the trivy.log so that user could diagnostic the current issue, the error message should like that: the sbom_media_type is missed for sbom scan report

Environment:

  • Harbor version: v2.10.0
  • Harbor Scanner Adapter for Trivy version: sbom prototype
  • Harbor installation process: docker-compose
@knqyf263
Copy link
Collaborator

Fixed in f9211e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants