Skip to content

Commit 53c749d

Browse files
CCM-13883: Trivy Optimisation
1 parent 8f7cdab commit 53c749d

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
@@ -166,13 +166,6 @@ jobs:
166166
uses: actions/checkout@v4
167167
- name: "Setup ASDF"
168168
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
169-
- name: "Repo setup"
170-
uses: ./.github/actions/node-install
171-
with:
172-
node-version: ${{ inputs.nodejs_version }}
173-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
174-
- name: "Perform Setup"
175-
uses: ./.github/actions/setup
176169
- name: "Trivy IaC Scan"
177170
uses: ./.github/actions/trivy-iac
178171
trivy-package:
@@ -188,13 +181,6 @@ jobs:
188181
uses: actions/checkout@v4
189182
- name: "Setup ASDF"
190183
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
191-
- name: "Repo setup"
192-
uses: ./.github/actions/node-install
193-
with:
194-
node-version: ${{ inputs.nodejs_version }}
195-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
196-
- name: "Perform Setup"
197-
uses: ./.github/actions/setup
198184
- name: "Trivy Package Scan"
199185
uses: ./.github/actions/trivy-package
200186
count-lines-of-code:

0 commit comments

Comments
 (0)