|
26 | 26 | echo "DNS_API_IMAGE=${IMAGE}" >> $GITHUB_ENV |
27 | 27 |
|
28 | 28 | - name: Run Trivy vulnerability scanner - DNS API |
| 29 | + id: trivy-api |
| 30 | + continue-on-error: true |
29 | 31 | uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2 |
30 | 32 | with: |
31 | 33 | image-ref: ${{ env.DNS_API_IMAGE }} |
|
38 | 40 | echo "DNS_PROXY_IMAGE=${IMAGE}" >> $GITHUB_ENV |
39 | 41 |
|
40 | 42 | - name: Run Trivy vulnerability scanner - DNS Proxy |
| 43 | + id: trivy-proxy |
| 44 | + continue-on-error: true |
41 | 45 | uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2 |
42 | 46 | with: |
43 | 47 | image-ref: ${{ env.DNS_PROXY_IMAGE }} |
|
50 | 54 | echo "DNS_FRONTEND_IMAGE=${IMAGE}" >> $GITHUB_ENV |
51 | 55 |
|
52 | 56 | - name: Run Trivy vulnerability scanner - DNS Frontend |
| 57 | + id: trivy-frontend |
| 58 | + continue-on-error: true |
53 | 59 | uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2 |
54 | 60 | with: |
55 | 61 | image-ref: ${{ env.DNS_FRONTEND_IMAGE }} |
|
62 | 68 | echo "DNS_BLOCKLISTS_IMAGE=${IMAGE}" >> $GITHUB_ENV |
63 | 69 |
|
64 | 70 | - name: Run Trivy vulnerability scanner - DNS blocklists |
| 71 | + id: trivy-blocklists |
| 72 | + continue-on-error: true |
65 | 73 | uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2 |
66 | 74 | with: |
67 | 75 | image-ref: ${{ env.DNS_BLOCKLISTS_IMAGE }} |
|
74 | 82 | echo "DNS_CHECK_IMAGE=${IMAGE}" >> $GITHUB_ENV |
75 | 83 |
|
76 | 84 | - name: Run Trivy vulnerability scanner - DNS check |
| 85 | + id: trivy-dnscheck |
| 86 | + continue-on-error: true |
77 | 87 | uses: aquasecurity/trivy-action@97e0b3872f55f89b95b2f65b3dbab56962816478 # v0.34.2 |
78 | 88 | with: |
79 | 89 | image-ref: ${{ env.DNS_CHECK_IMAGE }} |
80 | 90 | trivy-config: ./.github/trivy.yaml |
| 91 | + |
| 92 | + - name: Check Trivy scan results |
| 93 | + if: always() |
| 94 | + run: | |
| 95 | + VULN_FOUND=false |
| 96 | + if [ "${{ steps.trivy-api.outcome }}" = "failure" ]; then |
| 97 | + echo "::warning::Trivy found vulnerabilities in DNS API image" |
| 98 | + VULN_FOUND=true |
| 99 | + fi |
| 100 | + if [ "${{ steps.trivy-proxy.outcome }}" = "failure" ]; then |
| 101 | + echo "::warning::Trivy found vulnerabilities in DNS Proxy image" |
| 102 | + VULN_FOUND=true |
| 103 | + fi |
| 104 | + if [ "${{ steps.trivy-frontend.outcome }}" = "failure" ]; then |
| 105 | + echo "::warning::Trivy found vulnerabilities in DNS Frontend image" |
| 106 | + VULN_FOUND=true |
| 107 | + fi |
| 108 | + if [ "${{ steps.trivy-blocklists.outcome }}" = "failure" ]; then |
| 109 | + echo "::warning::Trivy found vulnerabilities in DNS Blocklists image" |
| 110 | + VULN_FOUND=true |
| 111 | + fi |
| 112 | + if [ "${{ steps.trivy-dnscheck.outcome }}" = "failure" ]; then |
| 113 | + echo "::warning::Trivy found vulnerabilities in DNS Check image" |
| 114 | + VULN_FOUND=true |
| 115 | + fi |
| 116 | + if [ "$VULN_FOUND" = "true" ]; then |
| 117 | + echo "::warning::Vulnerabilities detected — review Trivy scan steps above and create a separate PR to upgrade affected dependencies" |
| 118 | + fi |
0 commit comments