@@ -30,11 +30,12 @@ jobs:
30
30
exclude :
31
31
- os_version : RL8
32
32
build : openstack.openhpc-cuda
33
-
34
33
env :
35
34
ANSIBLE_FORCE_COLOR : True
36
35
OS_CLOUD : openstack
37
36
CI_CLOUD : ${{ github.event.inputs.ci_cloud }}
37
+ BUILD : " ${{ matrix.build }}-${{ matrix.os_version }}"
38
+
38
39
steps :
39
40
- uses : actions/checkout@v2
40
41
@@ -101,53 +102,14 @@ jobs:
101
102
sleep 5
102
103
done
103
104
IMAGE_NAME=$(openstack image show -f value -c name $IMAGE_ID)
104
- echo "image-name=${IMAGE_NAME}" >> "$GITHUB_OUTPUT"
105
- echo "image-id=$IMAGE_ID" >> "$GITHUB_OUTPUT"
106
-
107
- - name : Download image
108
- run : |
109
- . venv/bin/activate
110
- sudo mkdir /mnt/images
111
- sudo chmod 777 /mnt/images
112
- openstack image save --file /mnt/images/${{ steps.manifest.outputs.image-name }}.qcow2 ${{ steps.manifest.outputs.image-name }}
113
-
114
- - name : Set up QEMU
115
- uses : docker/setup-qemu-action@v3
116
-
117
- - name : install libguestfs
118
- run : |
119
- sudo apt -y update
120
- sudo apt -y install libguestfs-tools
121
-
122
- - name : mkdir for mount
123
- run : sudo mkdir -p './${{ steps.manifest.outputs.image-name }}'
124
-
125
- - name : mount qcow2 file
126
- run : sudo guestmount -a /mnt/images/${{ steps.manifest.outputs.image-name }}.qcow2 -i --ro -o allow_other './${{ steps.manifest.outputs.image-name }}'
127
-
128
- - name : Run Trivy vulnerability scanner
129
- uses :
aquasecurity/[email protected]
130
- with :
131
- scan-type : fs
132
- scan-ref : " ${{ steps.manifest.outputs.image-name }}"
133
- scanners : " vuln"
134
- format : sarif
135
- output : " ${{ steps.manifest.outputs.image-name }}.sarif"
136
- # turn off secret scanning to speed things up
137
-
138
- - name : Upload Trivy scan results to GitHub Security tab
139
- uses : github/codeql-action/upload-sarif@v3
140
- with :
141
- sarif_file : " ${{ steps.manifest.outputs.image-name }}.sarif"
142
- category : " ${{ matrix.os_version }}-${{ matrix.build }}"
105
+ echo "$IMAGE_ID" > image-id-"${{ env.BUILD }}".txt
106
+ echo "$IMAGE_NAME" > image-name-"${{ env.BUILD }}".txt
143
107
144
- - name : Fail if scan has CRITICAL vulnerabilities
145
- uses :
aquasecurity/[email protected]
108
+ - name : Upload manifest artifact
109
+ uses : actions/upload-artifact@v4
146
110
with :
147
- scan-type : fs
148
- scan-ref : " ${{ steps.manifest.outputs.image-name }}"
149
- scanners : " vuln"
150
- format : table
151
- exit-code : ' 1'
152
- severity : ' CRITICAL'
153
- ignore-unfixed : true
111
+ name : image-details
112
+ path : |
113
+ image-id-${{ env.BUILD }}".txt
114
+ image-name-"${{ env.BUILD }}".txt
115
+ overwrite : true
0 commit comments