Commit 7c17074
ci(infra): run tfsec + checkov on Terraform plan in CI (#373)
* ci(infra): run tfsec + checkov on Terraform plan in CI
Add IaC security scanning gate that runs tfsec and checkov against all
Terraform changes on pull requests and pushes to main.
- .github/workflows/terraform-scan.yml: CI workflow with two parallel jobs running
tfsec and checkov against infrastructure/terraform/ directory
- infrastructure/terraform/.tfsec.yml: tfsec config enforcing HIGH minimum severity
Closes #166
* fix(ci): resolve tfsec format error and add checkov baseline
- tfsec: change format from 'table' to 'text' (table is not a valid
format for aquasecurity/tfsec-action)
- checkov: add .checkov.baseline to acknowledge 85 pre-existing
findings so CI only fails on new regressions
- Workflow: add baseline and quiet params to checkov step
* docs(infra): add note about regenerating checkov baseline to README
* fix(ci): correct checkov baseline path and suppress tfsec false-positive on ALB
- Fix checkov baseline path to be relative to workspace root
(infrastructure/terraform/.checkov.baseline) instead of scan dir
- Add tfsec:ignore for aws-ec2-no-public-ingress-sgr on ALB security
group — ALB must accept public HTTP(S) traffic by design
* fix(ci): regenerate checkov baseline to cover new terraform files from upstream merge
---------
Co-authored-by: irefavor15-dotcom <irefavor15@gmail.com>1 parent e37574e commit 7c17074
5 files changed
Lines changed: 1058 additions & 0 deletions
File tree
- .github/workflows
- infrastructure/terraform
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
0 commit comments