diff --git a/.github/actions/trivy/action.yaml b/.github/actions/trivy/action.yaml index be940ce..91cc57b 100644 --- a/.github/actions/trivy/action.yaml +++ b/.github/actions/trivy/action.yaml @@ -1,17 +1,18 @@ -name: "Trivy Scan" -runs: - using: "composite" - steps: - - name: "Trivy Terraform IAC Scan" - shell: bash - run: | - components_exit_code=0 - modules_exit_code=0 +#TODO - Re-visit Trivy usage https://nhsd-jira.digital.nhs.uk/browse/CCM-15549 +# name: "Trivy Scan" +# runs: +# using: "composite" +# steps: +# - name: "Trivy Terraform IAC Scan" +# shell: bash +# run: | +# components_exit_code=0 +# modules_exit_code=0 - ./scripts/terraform/trivy.sh ./infrastructure/terraform/components || components_exit_code=$? - ./scripts/terraform/trivy.sh ./infrastructure/terraform/modules || modules_exit_code=$? +# ./scripts/terraform/trivy.sh ./infrastructure/terraform/components || components_exit_code=$? +# ./scripts/terraform/trivy.sh ./infrastructure/terraform/modules || modules_exit_code=$? - if [ $components_exit_code -ne 0 ] || [ $modules_exit_code -ne 0 ]; then - echo "Trivy misconfigurations detected." - exit 1 - fi +# if [ $components_exit_code -ne 0 ] || [ $modules_exit_code -ne 0 ]; then +# echo "Trivy misconfigurations detected." +# exit 1 +# fi diff --git a/.github/workflows/stage-1-commit.yaml b/.github/workflows/stage-1-commit.yaml index fae4e3f..642cb07 100644 --- a/.github/workflows/stage-1-commit.yaml +++ b/.github/workflows/stage-1-commit.yaml @@ -148,21 +148,22 @@ jobs: uses: actions/checkout@v5 - name: "Lint Terraform" uses: ./.github/actions/lint-terraform - trivy: - name: "Trivy Scan" - runs-on: ubuntu-latest - timeout-minutes: 5 - needs: detect-terraform-changes - if: needs.detect-terraform-changes.outputs.terraform_changed == 'true' - steps: - - name: "Checkout code" - uses: actions/checkout@v5 - - name: "Setup ASDF" - uses: asdf-vm/actions/setup@v4 - - name: "Perform Setup" - uses: ./.github/actions/setup - - name: "Trivy Scan" - uses: ./.github/actions/trivy + #TODO - Re-visit Trivy usage https://nhsd-jira.digital.nhs.uk/browse/CCM-15549 + # trivy: + # name: "Trivy Scan" + # runs-on: ubuntu-latest + # timeout-minutes: 5 + # needs: detect-terraform-changes + # if: needs.detect-terraform-changes.outputs.terraform_changed == 'true' + # steps: + # - name: "Checkout code" + # uses: actions/checkout@v5 + # - name: "Setup ASDF" + # uses: asdf-vm/actions/setup@v4 + # - name: "Perform Setup" + # uses: ./.github/actions/setup + # - name: "Trivy Scan" + # uses: ./.github/actions/trivy count-lines-of-code: name: "Count lines of code" runs-on: ubuntu-latest diff --git a/.tool-versions b/.tool-versions index 7a8fad9..e760641 100644 --- a/.tool-versions +++ b/.tool-versions @@ -5,9 +5,9 @@ nodejs 22.12.0 pre-commit 3.6.0 terraform 1.9.2 terraform-docs 0.19.0 -trivy 0.61.0 vale 3.6.0 python 3.13.2 +# trivy 0.61.0 - TODO - Re-visit Trivy usage https://nhsd-jira.digital.nhs.uk/browse/CCM-15549 # ============================================================================== # The section below is reserved for Docker image versions.