Skip to content

Commit 2510d74

Browse files
CCM-13883: Trivy Optimisation (#339)
* CCM-13883: Trivy Optimisation * CCM-13883: Trivy Optimisation * CCM-13883: Trivy Optimisation
1 parent 0517359 commit 2510d74

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

.github/actions/trivy-iac/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ runs:
88
run: |
99
components_exit_code=0
1010
modules_exit_code=0
11-
11+
asdf plugin add trivy || true
12+
asdf install trivy || true
1213
./scripts/terraform/trivy-scan.sh --mode iac ./infrastructure/terraform/components || components_exit_code=$?
1314
./scripts/terraform/trivy-scan.sh --mode iac ./infrastructure/terraform/modules || modules_exit_code=$?
1415

.github/actions/trivy-package/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ runs:
77
shell: bash
88
run: |
99
exit_code=0
10-
10+
asdf plugin add trivy || true
11+
asdf install trivy || true
1112
./scripts/terraform/trivy-scan.sh --mode package . || exit_code=$?
1213
1314
if [ $exit_code -ne 0 ]; then

.github/workflows/stage-1-commit.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,6 @@ jobs:
169169
uses: actions/checkout@v4
170170
- name: "Setup ASDF"
171171
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
172-
- name: "Repo setup"
173-
uses: ./.github/actions/node-install
174-
with:
175-
node-version: ${{ inputs.nodejs_version }}
176-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177-
- name: "Perform Setup"
178-
uses: ./.github/actions/setup
179172
- name: "Trivy IaC Scan"
180173
uses: ./.github/actions/trivy-iac
181174
trivy-package:
@@ -191,13 +184,6 @@ jobs:
191184
uses: actions/checkout@v4
192185
- name: "Setup ASDF"
193186
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
194-
- name: "Repo setup"
195-
uses: ./.github/actions/node-install
196-
with:
197-
node-version: ${{ inputs.nodejs_version }}
198-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
199-
- name: "Perform Setup"
200-
uses: ./.github/actions/setup
201187
- name: "Trivy Package Scan"
202188
uses: ./.github/actions/trivy-package
203189
count-lines-of-code:

0 commit comments

Comments
 (0)