Skip to content

Commit

Permalink
feat: added terraform scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg2020 committed May 15, 2024
1 parent 1d0a345 commit 9d3a94f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,14 @@ jobs:
permissions:
contents: read
secrets: inherit

security-terraform:
name: Security Terraform
needs:
- terraform-lint
- terraform-account
- terraform-env

uses: ./.github/workflows/security-terraform.yaml
permissions:
contents: read
19 changes: 19 additions & 0 deletions .github/workflows/security-terraform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Security Terraform

on:
workflow_call:

jobs:
terraform-scan:
name: Terraform Scan
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Trivy
uses: aquasecurity/trivy-action@master

- name: Scan Terraform
run: |
find infra/terrform -type d -exec trivy config --severity HIGH,CRITICAL --exit-code 1 --format table {} \;

0 comments on commit 9d3a94f

Please sign in to comment.