Sarath S Kumar
03/08/2023, 2:00 PMRB
03/08/2023, 2:01 PMSarath S Kumar
03/08/2023, 2:01 PMRB
03/08/2023, 2:07 PMSarath S Kumar
03/08/2023, 2:11 PMRB
03/08/2023, 2:12 PMChastity Blackwell
03/08/2023, 2:13 PMRB
03/08/2023, 2:13 PMSarath S Kumar
03/08/2023, 2:20 PMChastity Blackwell
03/08/2023, 2:22 PMSarath S Kumar
03/08/2023, 2:24 PMChastity Blackwell
03/08/2023, 2:24 PMname: validate
on:
push:
branches:
- master
pull_request:
branches:
- master
# Pre-commit checking code was cribbed from trussworks/shared-actions
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install prereqs for checks
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install terraform-docs
brew install gh
pip install pre-commit
- name: Cache
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-dot-cache-{{ hashFiles('.pre-commit-config.yaml') }}
- name: Pre-commit checks
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
pre-commit run --all-files --show-diff-on-failure
repos:
- repo: <https://github.com/pre-commit/pre-commit-hooks>
rev: v3.4.0
hooks:
- id: trailing-whitespace
- repo: <https://github.com/antonbabenko/pre-commit-terraform>
rev: v1.47.0
hooks:
- id: terraform_fmt
- id: terraform_docs
# - id: terraform_validate
- repo: <https://github.com/igorshubovych/markdownlint-cli>
rev: v0.32.2
hooks:
- id: markdownlint
wby
03/08/2023, 3:07 PMChastity Blackwell
03/08/2023, 3:07 PMwby
03/08/2023, 3:08 PMtfsec
to trivy
š
so far, Iām not liking working with trivy as muchChastity Blackwell
03/08/2023, 3:11 PMwby
03/08/2023, 3:12 PMtrivy
does that even worse. tfsec
fixed at least most of the problems with that that I had in the pastChastity Blackwell
03/08/2023, 3:13 PMwby
03/08/2023, 3:13 PMtrivy
uses the same scanning engine; I guess hopefully they fix all the remaining bugs, because they havenāt updated tfsec at all in a whiletf fmt
and commit the results if there are unformatted files, and a daily integration test that tests core modules (using test kitchen)Chastity Blackwell
03/08/2023, 3:19 PMSarath S Kumar
03/08/2023, 3:21 PMwby
03/08/2023, 3:36 PM- --hook-config=--retry-once-with-cleanup=true
if you didnāt already have it.Chastity Blackwell
03/08/2023, 3:45 PMwby
03/08/2023, 3:49 PMChastity Blackwell
03/08/2023, 3:53 PMwby
03/08/2023, 6:00 PM