Skip to content
New issue

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

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

Already on GitHub? # to your account

Feature: Add support for --ignore-unfixed #9

Closed
zoispag opened this issue Jun 22, 2020 · 3 comments · Fixed by #10
Closed

Feature: Add support for --ignore-unfixed #9

zoispag opened this issue Jun 22, 2020 · 3 comments · Fixed by #10

Comments

@zoispag
Copy link
Contributor

zoispag commented Jun 22, 2020

Would it be possible to add support for --ignore-unfixed flag in the action?

I tried many things but I haven't figured it out the proper syntax yet to open a Pull Request.

So far I've tried:

  • - '${{ inputs.ignore-unfixed == true && echo --ignore-unfixed }}'
  • - '${{ inputs.ignore-unfixed }} == true && echo "--ignore-unfixed"'
  • - '${{ inputs.ignore-unfixed }} == "true" && echo "--ignore-unfixed"' &
  • - '${{ inputs.ignore-unfixed == "true" && echo "--ignore-unfixed" }}'

Not sure how these ${{ }} are expanded. Any help is appreciated.

@danielpacak
Copy link
Contributor

danielpacak commented Jun 22, 2020

Hi @zoispag Got your point. What about taking the advantage of the fact that running trivy as

trivy image alpine:3

is equivalent of

trivy image --ignore-unfixed=false alpine:3

Having said that, I believe you could define a new optional input param and set its default value to false, and then finally add it to the action's command:

trivy image --ignore-unfixed=${{ inputs.ignore-unfixed }} alpine:3

WDYT?

@zoispag
Copy link
Contributor Author

zoispag commented Jun 22, 2020

I will give it a try right away and I will let you know. Thanks for the immediate response @danielpacak .

@zoispag
Copy link
Contributor Author

zoispag commented Jun 22, 2020

It works. I will open a PR right away :)

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

Successfully merging a pull request may close this issue.

2 participants