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

docs: Add Trivy migration guide #1961

Merged
merged 1 commit into from Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs/guides/trivy.md
@@ -0,0 +1,47 @@
# Moving towards configuration scanning with Trivy
Overtime we've taken [trivy][trivy] to be the go-to scanning tool for a vareity of things. This also includes terraform scanning.

This section describes some differences between Trivy and tfsec.

| Feature | Trivy | tfsec |
|----------------------|--------------------------------------------------------|----------------------|
| Policy Distribution | Embedded and Updated via Registry | Embedded |
| Custom Policies | Rego | Rego, JSON, and YAML |
| Supported Formats | Dockerfile, JSON, YAML, Terraform, CloudFormation etc. | Terraform Only |
itaysk marked this conversation as resolved.
Show resolved Hide resolved


# Comparison with examples
## Simple scan
### With Trivy
```shell
$ trivy config <dir>
```
### With tfsec
```shell
$ tfsec <dir>
```

## Passing tfvars
### With Trivy
```shell
$ trivy --tf-vars <vars.tf> <dir>
```
### With tfsec
```shell
$ tfsec <dir> --tf-vars-file <vars.tf>
```

## Report formats
### With Trivy
```shell
$ trivy config --format <format-type> <dir>
```

### With tfsec
```shell
$ tfsec <dir> --format <format-type>
```

We welcome any feedback if you find features that today are not available with Trivy misconfigration scanning that are available in tfsec.

[trivy]: https://github.com/aquasecurity/trivy
1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -25,6 +25,7 @@ theme:
nav:
- HOME: index.md
- Guides:
- Migration: guides/trivy.md
- Installation: guides/installation.md
- Signature Verification: guides/signing.md
- Quick Start: guides/quickstart.md
Expand Down