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

fix: handling when image contains no trivy-target #1405

Merged
merged 3 commits into from
Mar 1, 2022
Merged

fix: handling when image contains no trivy-target #1405

merged 3 commits into from
Mar 1, 2022

Conversation

Nikkely
Copy link
Contributor

@Nikkely Nikkely commented Mar 1, 2022

What did you implement:

I added error handling to trivy-to-vuls.
If Trivy scan the image that is not Trivy supported OS or Libraries, Vuls behave the result is not parsable and is error.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  1. write a test code
  2. I have tried to parse result of ./trivy -q image --list-all-pkgs -f json hello-world:latest and confirmed outputting error as expected
  3. I have tried to parse result of ./trivy -q image --list-all-packages -f json ubuntu:latest and confirmed outputing no error as usual

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

@Nikkely Nikkely requested a review from kotakanbe March 1, 2022 09:17
@kotakanbe kotakanbe merged commit 2f05864 into future-architect:master Mar 1, 2022
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.

None yet

2 participants