Skip to content

Commit

Permalink
Create tfsec-analysis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro-Ostapenko-97 authored Aug 19, 2021
1 parent ec1762b commit 490735f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/tfsec-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: tfsec
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '00 12 * * 6'

jobs:
tfsec:
name: Run tfsec sarif report
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Clone repo
uses: actions/checkout@v2

- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.14.9

- name: Terraform fmt
id: fmt
run: terraform fmt -check
continue-on-error: true

- name: Terraform Init
id: init
run: terraform init

- name: Terraform Validate
id: validate
run: terraform validate -no-color

- name: Run tfsec
uses: tfsec/tfsec-sarif-action@9a83b5c3524f825c020e356335855741fd02745f
with:
sarif_file: tfsec.sarif

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: tfsec.sarif

0 comments on commit 490735f

Please sign in to comment.