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

Migrate from tfsec to trivy #74

Open
sebastiencaty opened this issue Jan 7, 2025 · 7 comments
Open

Migrate from tfsec to trivy #74

sebastiencaty opened this issue Jan 7, 2025 · 7 comments

Comments

@sebastiencaty
Copy link

tfsec is moving away to trivy, it's mostly the same thing so it shouldn't be too difficult.

aquasecurity/tfsec#1994
https://github.com/aquasecurity/tfsec/blob/master/tfsec-to-trivy-migration-guide.md

I can help with this.

I have also made some changes to the dockerfile and requirements version file to update version for vulnerabilities while testing for compatibility locally. If you're interested I'd also like to help with this.

@MatthewJohn
Copy link
Owner

Created gitlab issue: https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/552
gitlab-issue-id:552

@MatthewJohn
Copy link
Owner

Hey @sebastiencaty,

That would be great, if you're happy to - I've had the ticket sat on the backlog for a while https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/440
If you're happy to take a look, it would be great. If you're happy to include a ticket reference in any commits and 'fix: ' prefixes, as per https://matthewjohn.github.io/terrareg/CONTRIBUTING/, it would be great :)

Many thanks

@MatthewJohn
Copy link
Owner

Just to be aware, the "hardest" (or at least most cumbersome) part of switching from tfsec to trivy will be updating the tests, worth seeing:

@markdjones82
Copy link
Contributor

tfsec is moving away to trivy, it's mostly the same thing so it shouldn't be too difficult.

aquasecurity/tfsec#1994 https://github.com/aquasecurity/tfsec/blob/master/tfsec-to-trivy-migration-guide.md

I can help with this.

I have also made some changes to the dockerfile and requirements version file to update version for vulnerabilities while testing for compatibility locally. If you're interested I'd also like to help with this.

Nice, we also have a Dockerfile and requirements with updated versions with vulnerabilities as that is a big deal at our company at the moment. So, I am on board with this.

@MatthewJohn We don't use infracost or some of the other features and to remove Go vulnerabilities I comment out those downloads. What do you guys think about a "minimal" version Dockerfile as well for just the base module download feature? This reduces vulnerabilities. My only concern is that it might break your tests?

@MatthewJohn
Copy link
Owner

MatthewJohn commented Jan 16, 2025

We don't use infracost or some of the other features and to remove Go vulnerabilities I comment out those downloads

Hmm, certainly makes sense - I wonder to what extent it's worth taking to - e.g. tfswitch, tfsec etc

@markdjones82
Copy link
Contributor

markdjones82 commented Jan 16, 2025

I actually realized we still need tfswitch/tfsec when I tried to remove those downloads. Didnt realize they were part of the module indexing. That being said, I've gotten most of the vulnerabilities we are getting hits on by updating go package download and updating others. Infracost had a ton so removing that was good for now.

I'm not sure how easy it would be to add a new flag to turn off tfswitch/tfsec. It seems pretty embedded, but I'm far from an app code expert. Just enough to be dangerous.

@MatthewJohn
Copy link
Owner

Didnt realize they were part of the module indexing

Infracost is also part of module indexing (though also depends on API key, or maybe some other config, can't remember off the top of my head) - so if one can be disabled, they can all be (made to be) disablable :)

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

No branches or pull requests

3 participants