Skip to content

Commit

Permalink
docs: Add Trivy migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
simar7 committed Jan 9, 2023
1 parent ada8914 commit 44b97cb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
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 Distribuition | Embedded and Updated via Registry | Embedded |
| Custom Policies | Rego | Rego, JSON, and YAML |
| Supported Formats | Dockerfile, JSON, YAML, Terraform, CloudFormation etc. | Terraform Only |


# 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

0 comments on commit 44b97cb

Please sign in to comment.