Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

/api/v1/scan API should return 400 to the client when the enabled_capabilities.produces_mime_types not specified #443

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

Comments

@stonezdj
Copy link

stonezdj commented Feb 24, 2024

What steps did you take and what happened:

Install the prototype trivy scanner and send a request to POST /api/v1/scan, the enabled_capabilities.produces_mime_types is missed in the request json

What did you expect to happen:

The HTTP response code should be 400 and log error message like that: enabled_capabilities.produces_mime_types is not specified in the request in the trivy log, so that user could get the http 400 error and check the trivy log to diagnostic.

Environment:

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

Fixed in 3bc7455

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

No branches or pull requests

2 participants