From 68e783296c6fcef3b94a8127e7ed8acf4b734ba4 Mon Sep 17 00:00:00 2001 From: Ruben Aleman Date: Thu, 14 Mar 2024 09:13:20 +0100 Subject: [PATCH 1/2] feat: Add checkov github action --- .github/workflows/scan.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/scan.yaml diff --git a/.github/workflows/scan.yaml b/.github/workflows/scan.yaml new file mode 100644 index 0000000..1204be3 --- /dev/null +++ b/.github/workflows/scan.yaml @@ -0,0 +1,35 @@ +name: checkov +on: + push: + branches: [ "main"] + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: read-all + +jobs: + scan: + permissions: + contents: read + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Checkov GitHub Action + uses: bridgecrewio/checkov-action@v12 + with: + output_format: cli,sarif + output_file_path: console,results.sarif + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v2 + + if: success() || failure() + with: + sarif_file: results.sarif From 42c375e748e79b49f797cca8d8e04df924fde27b Mon Sep 17 00:00:00 2001 From: Ruben Aleman Date: Thu, 14 Mar 2024 09:36:49 +0100 Subject: [PATCH 2/2] feat: Add terraform test github action --- .github/workflows/terraform-test.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/terraform-test.yaml diff --git a/.github/workflows/terraform-test.yaml b/.github/workflows/terraform-test.yaml new file mode 100644 index 0000000..7a2614b --- /dev/null +++ b/.github/workflows/terraform-test.yaml @@ -0,0 +1,22 @@ +name: terraform-test +on: + push: + branches: [ "main"] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +permissions: read-all + +jobs: + terraform_test: + runs-on: ubuntu-latest + container: hashicorp/terraform:1.7.5 + permissions: + contents: read + actions: read + steps: + - uses: actions/checkout@v4 + - run: terraform init + - run: terraform test