Skip to content

Commit 6140215

Browse files
committed
move stuff around
1 parent 6941697 commit 6140215

2 files changed

Lines changed: 50 additions & 30 deletions

File tree

.github/workflows/quality-checks.yml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,33 @@ jobs:
249249
250250
- name: Run unit tests
251251
run: make test
252+
- name: Build docker images
253+
if: ${{ inputs.run_docker_scan == true }}
254+
run: |
255+
make docker-build
256+
- name: Determine docker images to scan
257+
id: normalized_docker_images
258+
run: |
259+
if [ "${{ inputs.run_docker_scan }}" != "true" ]; then
260+
echo "Docker scanning disabled; emitting empty image list."
261+
echo 'images=[]' >> "$GITHUB_OUTPUT"
262+
exit 0
263+
fi
264+
265+
INPUT='${{ inputs.docker_images }}'
266+
267+
268+
if [ -z "$INPUT" ]; then
269+
INPUT="[]"
270+
fi
271+
272+
if [ "$INPUT" = "[]" ]; then
273+
echo "No docker images provided"
274+
exit 1
275+
else
276+
echo "Using provided docker images: $INPUT"
277+
echo "images=$INPUT" >> "$GITHUB_OUTPUT"
278+
fi
252279
253280
- name: Generate SBOM
254281
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
@@ -317,35 +344,6 @@ jobs:
317344
output: "dependency_results_java.txt"
318345
exit-code: "1"
319346
trivy-config: trivy.yaml
320-
- name: Build docker images
321-
if: ${{ inputs.run_docker_scan == true }}
322-
run: |
323-
make docker-build
324-
325-
- name: Determine docker images to scan
326-
id: normalized_docker_images
327-
run: |
328-
if [ "${{ inputs.run_docker_scan }}" != "true" ]; then
329-
echo "Docker scanning disabled; emitting empty image list."
330-
echo 'images=[]' >> "$GITHUB_OUTPUT"
331-
exit 0
332-
fi
333-
334-
INPUT='${{ inputs.docker_images }}'
335-
336-
337-
if [ -z "$INPUT" ]; then
338-
INPUT="[]"
339-
fi
340-
341-
if [ "$INPUT" = "[]" ]; then
342-
echo "No docker images provided"
343-
exit 1
344-
else
345-
echo "Using provided docker images: $INPUT"
346-
echo "images=$INPUT" >> "$GITHUB_OUTPUT"
347-
fi
348-
349347
- name: Show vulnerability output
350348
if: always()
351349
run: |

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ A collection of common workflows used by other EPS repositories
44

55
The workflows that are available to use are
66

7+
## Adding exclusions to trivy scanning
8+
The quality checks job uses trivy to scan for vulnerabilities.
9+
There may be times you want to add an exclusion for a known vulnerability that we are happy to accept
10+
To do this, in the calling repo, add trivy.yaml with this content
11+
```
12+
ignorefile: ".trivyignore.yaml"
13+
```
14+
and add a .trivyignore.yaml with this content
15+
```
16+
vulnerabilities:
17+
- id: CVE-2026-24842
18+
paths:
19+
- "package-lock.json"
20+
statement: downstream dependency for tar - waiting for new npm release
21+
expired_at: 2026-06-01
22+
```
23+
See https://trivy.dev/docs/latest/configuration/filtering/#trivyignoreyaml for more details
24+
725
## combine dependabot prs
826

927
This workflow can be called to combine multiple open Dependabot PRs into a single PR.
@@ -96,17 +114,21 @@ jobs:
96114
This workflow runs common quality checks.
97115
To use this, you must have the following Makefile targets defined
98116
- install
99-
- check-licences
100117
- lint
101118
- test
119+
- install-node (only for cdk projects)
120+
- compile (only for cdk projects)
102121
- cdk-synth (only for cdk projects)
122+
- docker-build (only if run_docker_scan is set to true)
103123

104124
#### Inputs
105125

106126
- `install_java`: Whether to install java or not
107127
- `run_sonar`: Whether to run sonar checks or not.
108128
- `asdfVersion`: Override the version of asdf to install.
109129
- `reinstall_poetry`: If you are using this from a primarily python based project, you should set this to true to force a poetry reinstallation after python is installed
130+
- `run_docker_scan`: whether to run a scan of docker images
131+
- `docker_images`: array of docker images to scan. These must match images produced by make docker-build
110132

111133
#### Secret Inputs
112134
- `SONAR_TOKEN`: Token used to authenticate to sonar

0 commit comments

Comments
 (0)