Skip to content

Commit 9aa657d

Browse files
committed
run images scanning
1 parent a88e323 commit 9aa657d

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This workflow is never used by any external repository.
2+
# It is created solely for testing purposes when developing new actions.
3+
# Feel free to change it however you want.
4+
name: "Scan containers"
5+
6+
on:
7+
workflow_call:
8+
push:
9+
paths:
10+
- '.github/workflows/0-scan-containers.yaml'
11+
branches: [ 'v4-beta' ]
12+
13+
jobs:
14+
run-test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: milaboratory/github-ci/actions/docker/scan-repo@v4-beta
19+
with:
20+
registry: containers.pl-open.science
21+
repository: milaboratories/pl-containers

actions/docker/scan-repo/action.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ inputs:
1111
registry:
1212
description: |
1313
Docker registry (i.e. quay.io, containers.pl-open.science and so on)
14-
required: false
15-
default: 'containers.pl-open.science'
14+
required: true
1615
repository:
1716
description: |
1817
Repository inside the registry (i.e. milaboratories/pl-containers)
19-
required: false
20-
default: 'milaboratories/pl-containers'
18+
required: true
2119
tag:
2220
description: |
2321
Tag to scan. Empty value starts all tags scanning.
@@ -55,7 +53,7 @@ inputs:
5553
description: |
5654
Format of the report.
5755
required: false
58-
default: 'table'
56+
default: 'json'
5957

6058
outputs:
6159
report:

actions/docker/scan-repo/scan-images.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ if [ "${success}" == "true" ]; then
154154
exit 0
155155
fi
156156

157-
if [ -n "${REPORT_FILE}" ]; then
157+
log "Found issues in scanned images."
158+
if [ -n "${REPORT_FILE}" ] && [ "${REPORT_FORMAT}" == "json" ]; then
158159
log ""
159160
log "CVEs found:"
160161
cat "${REPORT_FILE}" |

0 commit comments

Comments
 (0)