Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
aquasecurity

GitHub Action

Run tfsec with sarif upload

v0.0.3

Run tfsec with sarif upload

aquasecurity

Run tfsec with sarif upload

Run tfsec against terraform code base and upload the sarif output to the github repo

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run tfsec with sarif upload

uses: aquasecurity/[email protected]

Learn more about this action in aquasecurity/tfsec-sarif-action

Choose a version

tfsec-sarif-action

Description

This Github Action will run the tfsec sarif check then add the report to the repo for upload.

Example usage

name: tfsec
on:
  push:
    branches:
      - main
  pull_request:
jobs:
  tfsec:
    name: tfsec sarif report
    runs-on: ubuntu-latest

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

      - name: tfsec
        uses: tfsec/tfsec-sarif-action@master
        with:
          sarif_file: tfsec.sarif         
          github_token: ${{ secrets.github_token }}

      - 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