-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
tfsec deprecated, replaced by Trivy. Create a new hook for Trivy #550
Comments
As trivy is not only for terraform, maybe it makes sense to use https://github.com/mxab/pre-commit-trivy It was added to docs here: aquasecurity/trivy#3203 |
Nice, let's them just add to docs info about |
Of course, if the repo author adds a LICENCE (mxab/pre-commit-trivy#12), otherwise his hooks are not usable |
I'd actually rather not use that hook as it requires Docker and is pinned to the version of trivy specified in the hook configuration, which means I'm reliant on the author to keep updating the hook. Given trivy is a single binary, I can (and do) install that by other means, so a hook that just tries to run |
Maybe that's something the author of https://github.com/mxab/pre-commit-trivy/ would accept to implement, especially easy to add without breaking anything IMO as the current hooks are suffixed by |
On the other hand, I see that |
Well, then you can just copy-paste There is a full doc on how to add docs and so on - https://github.com/antonbabenko/pre-commit-terraform/blob/master/.github/CONTRIBUTING.md#add-new-hook Also, we will need a deprecation notice to The hook notice can be just common::colorify "yellow" "tfsec tool was deprecated, and replaced by trivy. You can check trivy hook here:"
common::colorify "yellow" "https://github.com/antonbabenko/pre-commit-terraform/tree/master#terraform_trivy" at the end of In any case, notice will show only when something will go wrong (hook found issues and failed). That's planned |
Wondering if someone has picked up this in any meaninful way. I'm very keen on this feature and not sure at what point this is standing. Is this waiting for someone to actually come with the PR for the mentioned changes? |
Exactly. And it can be you :) |
This issue has been resolved in version 1.85.0 🎉 |
What problem are you facing?
tfsec is deprecated and it's recommended to migrate to use Trivy instead.
How could pre-commit-terraform help solve your problem?
A new hook that runs
trivy config ...
in some form would therefore be useful. Trivy seems to currently honour existingtfsec:ignore:*
comment blocks so you can switch hooks without needing to rewrite existing comments.The text was updated successfully, but these errors were encountered: