Patrick de Ruiter 1262a96f93
Some checks failed
Code Quality & Security Scan / Checkov Security Scan (push) Failing after 1m58s
Code Quality & Security Scan / SonarQube Trigger (push) Has been skipped
Add Checkov compliance scanning to CI pipeline
- Added Checkov security scan job that runs before SonarQube
- Configured for Terraform-specific IaC compliance checks
- Outputs results in CLI and SARIF formats
- Uploads scan results as artifacts for review
- SonarQube job now depends on Checkov passing
- Renamed workflow to reflect both quality and security scanning
2025-11-01 22:36:25 +01:00

50 lines
1.2 KiB
YAML

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
name: Code Quality & Security Scan
jobs:
checkov:
name: Checkov Security Scan
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Checkov
uses: bridgecrewio/checkov-action@v12
with:
directory: .
framework: terraform
output_format: cli,sarif
output_file_path: console,results.sarif
soft_fail: false
- name: Upload Checkov results
if: always()
uses: actions/upload-artifact@v4
with:
name: checkov-results
path: results.sarif
sonarqube:
name: SonarQube Trigger
runs-on: ubuntu-latest
needs: checkov
steps:
- name: Checking out
uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v6
env:
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}