🔧 Update delius-core alarms #26742
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform Static Code Analysis | |
# Runs changed scan on pull request, full scan on workflow_dispatch and scheduled. | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 7 * * 1-5' | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'terraform/**' | |
- '.github/workflows/terraform-static-analysis.yml' | |
permissions: | |
contents: read | |
jobs: | |
terraform-static-analysis: | |
permissions: | |
pull-requests: write | |
name: Terraform Static Analysis | |
runs-on: ubuntu-latest | |
if: github.event_name != 'workflow_dispatch' && github.event_name != 'schedule' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Run Analysis | |
uses: ministryofjustice/github-actions/terraform-static-analysis@8e1bfc920f829ce408a5ef84118fbc160e559066 # v18.1.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
scan_type: changed | |
trivy_severity: HIGH,CRITICAL | |
trivy_ignore: ./.trivyignore.yaml | |
checkov_exclude: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39 | |
tflint_exclude: terraform_unused_declarations | |
tflint_call_module_type: none | |
tfsec_trivy: trivy | |
terraform-static-analysis-full-scan: | |
permissions: | |
contents: read | |
actions: read | |
security-events: write | |
pull-requests: write | |
name: Terraform Static Analysis - scan all directories | |
runs-on: ubuntu-latest | |
if: github.event_name == 'workflow_dispatch' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Run Analysis | |
uses: ministryofjustice/github-actions/terraform-static-analysis@8e1bfc920f829ce408a5ef84118fbc160e559066 # v18.1.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
scan_type: full | |
tfsec_trivy: trivy | |
trivy_skip_dir: "" | |
trivy_severity: HIGH,CRITICAL | |
trivy_ignore: ./.trivyignore.yaml | |
tfsec_exclude: aws-ssm-secret-use-customer-key,github-repositories-private,aws-vpc-no-excessive-port-access,github-repositories-require-signed-commits | |
checkov_exclude: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39 | |
tflint_exclude: terraform_unused_declarations | |
tflint_call_module_type: none | |
terraform-static-analysis-scheduled-scan: | |
name: Terraform Static Analysis - scheduled scan of all directories | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Run Analysis | |
uses: ministryofjustice/github-actions/terraform-static-analysis@8e1bfc920f829ce408a5ef84118fbc160e559066 # v18.1.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
scan_type: full | |
tfsec_trivy: trivy | |
trivy_severity: HIGH,CRITICAL | |
trivy_ignore: ./.trivyignore.yaml | |
tfsec_exclude: aws-ssm-secret-use-customer-key,github-repositories-private,aws-vpc-no-excessive-port-access,github-repositories-require-signed-commits | |
checkov_exclude: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39 | |
tflint_exclude: terraform_unused_declarations | |
tflint_call_module_type: none |