Skip to content

Commit e9e6a6a

Browse files
committed
feat: add pip file scanning
1 parent dcc1dd9 commit e9e6a6a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/python.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,35 @@ jobs:
379379
echo "[Debug] PWD[${PWD}]";
380380
echo "[Debug] ****************************";
381381
git push
382+
383+
384+
385+
vulnerability-scan:
386+
name: Repo scan
387+
runs-on: ubuntu-latest
388+
steps:
389+
390+
- name: Run Trivy vulnerability scanner (sarif Report)
391+
if:
392+
(${{
393+
inputs.DOCKER_SCAN_IMAGE_VULNERABILITY
394+
}})
395+
uses: aquasecurity/trivy-action@0.20.0
396+
with:
397+
image-ref: '${{ inputs.DOCKER_BUILD_REGISTRY }}/${{ inputs.DOCKER_BUILD_IMAGE_NAME }}:${{ inputs.DOCKER_BUILD_IMAGE_TAG }}'
398+
format: 'sarif'
399+
output: 'trivy-results.sarif'
400+
severity: 'LOW,MEDIUM,HIGH,CRITICAL'
401+
vuln-type: 'os'
402+
scanners: vuln
403+
ignore-unfixed: true
404+
405+
- name: Upload Trivy scan results to GitHub Security tab
406+
if:
407+
(${{
408+
inputs.DOCKER_SCAN_IMAGE_VULNERABILITY
409+
}})
410+
uses: github/codeql-action/upload-sarif@v3
411+
with:
412+
sarif_file: 'trivy-results.sarif'
413+

0 commit comments

Comments
 (0)