Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/fmt-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Terraform Validation

on:
pull_request:
branches:
- main

jobs:
terraform:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.8.2"
- name: Terraform fmt
run: task fmt:check

22 changes: 22 additions & 0 deletions .github/workflows/scan-trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Trivy Terraform Scan

on:
pull_request:
branches: [main]
schedule:
- cron: '0 3 * * *' # Nightly at 03:00 UTC
workflow_dispatch:

jobs:
trivy:
runs-on: ubuntu-latest

permissions:
contents: read
issues: write

steps:
- uses: actions/checkout@v4

- name: Trivy scan
uses: corelight/shared-actions/trivy-terraform-scan@main
25 changes: 25 additions & 0 deletions .github/workflows/tag-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Bump version
on:
pull_request:
types:
- closed
branches:
- main

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
TAG_PREFIX: 'v'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Empty file added scripts/trivy/.trivyignore.yml
Empty file.
19 changes: 19 additions & 0 deletions scripts/trivy/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
scan:
security-checks:
- secret
- config

ignorefile: scripts/trivy/.trivyignore.yml

severity:
- HIGH
- CRITICAL

misconfiguration:
scanners:
- terraform
config:
terraform:
file_patterns:
- "**/*.tf"
ignore_unfixed: true
Loading