Link Search Menu Expand Document

Installation

Install with brew/linuxbrew:

brew install tfsec

Install with Chocolatey:

choco install tfsec

You can also grab the binary for your system from the releases page.

Alternatively, install with Go:

go get -u github.com/tfsec/tfsec/cmd/tfsec

Usage

tfsec will scan the specified directory. If no directory is specified, the current working directory will be used.

The exit status will be non-zero if tfsec finds problems, otherwise the exit status will be zero.

tfsec .

Use with Docker

As an alternative to installing and running tfsec on your system, you may run tfsec in a Docker container.

To run:

docker run --rm -it -v "$(pwd):/src" tfsec/tfsec /src

Use as GitHub Action

If you want to run tfsec on your repository as a GitHub Action, you can use https://github.com/marketplace/actions/run-tfsec-with-sarif-upload. See github action page for more details