scan #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: scan | |
on: | |
workflow_run: | |
workflows: [docker_publish] | |
types: [completed] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
scan-python: | |
name: Scan Microsoft official base image | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github/workflows/scan/html.tpl | |
sparse-checkout-cone-mode: false | |
- name: Run Trivy vulnerability scanner for Microsoft official image | |
uses: aquasecurity/[email protected] | |
with: | |
image-ref: "ghcr.io/jim60105/youtubelivechattodiscord:latest" | |
vuln-type: "os,library" | |
scanners: vuln | |
severity: "CRITICAL,HIGH" | |
format: "template" | |
template: "@.github/workflows/scan/html.tpl" | |
output: "trivy-results-microsoft.html" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: trivy-results | |
path: trivy-results-microsoft.html | |
retention-days: 90 | |
scan-ubi: | |
name: Scan Red Hat UBI base image | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github/workflows/scan/html.tpl | |
sparse-checkout-cone-mode: false | |
- name: Run Trivy vulnerability scanner for UBI image | |
uses: aquasecurity/[email protected] | |
with: | |
image-ref: "ghcr.io/jim60105/youtubelivechattodiscord:ubi" | |
vuln-type: "os,library" | |
scanners: vuln | |
severity: "CRITICAL,HIGH" | |
format: "template" | |
template: "@.github/workflows/scan/html.tpl" | |
output: "trivy-results-ubi.html" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: trivy-results | |
path: trivy-results-ubi.html | |
retention-days: 90 |