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

feat: support sbom list as request body #292

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

xieshenzh
Copy link
Contributor

@xieshenzh xieshenzh commented Feb 20, 2024

To support reporting package vulnerabilities in base images:

  1. added new API batch-analysis to handle the requests with a dictionary of sboms as payload

Jira: https://issues.redhat.com/browse/APPENG-2250 and https://issues.redhat.com/browse/APPENG-2251

@xieshenzh xieshenzh force-pushed the api-sbom-list branch 2 times, most recently from 22d793d to 1e03a21 Compare February 20, 2024 21:55
@xieshenzh
Copy link
Contributor Author

xieshenzh commented Feb 21, 2024

Pending merging of the api changes to pass CI compilation: RHEcosystemAppEng/exhort-api-spec#13

Copy link
Collaborator

@ruromero ruromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution doesn't conform with the OpenApi spec where the /analysis endpoint returns an AnalysisReport object. See https://github.com/RHEcosystemAppEng/exhort-api-spec/blob/main/api/v4/openapi.yaml#L53

I recommend creating a new endpoint /batchanalysis for that purpose. With that you won't need to add the list parameter to the MediaType

Copy link
Collaborator

@ruromero ruromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove all references to rootRef and use a dictionary in the requests so that you can use the keys to identify the different SBOMs.

@xieshenzh xieshenzh force-pushed the api-sbom-list branch 8 times, most recently from 3239ff2 to 7149dc7 Compare March 1, 2024 22:42
@xieshenzh xieshenzh marked this pull request as ready for review March 1, 2024 22:57
Copy link
Collaborator

@ruromero ruromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the solution.
Looks good

@ruromero ruromero merged commit adce51f into RHEcosystemAppEng:main Mar 5, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants