File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 grype :
1212 name : Container Scan
1313 runs-on : ubuntu-latest
14+ env :
15+ GRYPE_VERSION : " 0.111.0"
1416 steps :
1517 - name : Checkout
1618 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
2022 id : scan
2123 with :
2224 image : ghcr.io/coopernetes/git-proxy-java:latest
25+ grype-version : ${{ env.GRYPE_VERSION }}
2326 fail-build : true
2427 severity-cutoff : high
2528 only-fixed : true
3033 # in the GitHub Security tab (high CVSS score ≠ high actual risk for this workload).
3134 # The build still fails on high/critical with a fix available via fail-build: true above.
3235
36+ - name : Install grype
37+ if : always()
38+ run : |
39+ curl -sSfL -o /tmp/grype.tar.gz \
40+ https://github.com/anchore/grype/releases/download/v${GRYPE_VERSION}/grype_${GRYPE_VERSION}_linux_amd64.tar.gz
41+ curl -sSfL -o /tmp/grype_checksums.txt \
42+ https://github.com/anchore/grype/releases/download/v${GRYPE_VERSION}/grype_${GRYPE_VERSION}_checksums.txt
43+ grep "grype_${GRYPE_VERSION}_linux_amd64.tar.gz" /tmp/grype_checksums.txt | sha256sum --check --ignore-missing
44+ tar -xzf /tmp/grype.tar.gz -C /usr/local/bin grype
45+
3346 - name : Generate human-readable report
3447 if : always()
3548 run : |
Original file line number Diff line number Diff line change 8686 contents : read
8787 security-events : write
8888 if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
89+ env :
90+ GRYPE_VERSION : " 0.111.0"
8991 steps :
9092 - name : Checkout
9193 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
9597 id : scan
9698 with :
9799 image : ghcr.io/${{ github.repository }}@${{ needs.build-and-push.outputs.digest }}
100+ grype-version : ${{ env.GRYPE_VERSION }}
98101 fail-build : true
99102 severity-cutoff : high
100103 only-fixed : true
@@ -105,6 +108,16 @@ jobs:
105108 # in the GitHub Security tab (high CVSS score ≠ high actual risk for this workload).
106109 # The build still fails on high/critical with a fix available via fail-build: true above.
107110
111+ - name : Install grype
112+ if : always()
113+ run : |
114+ curl -sSfL -o /tmp/grype.tar.gz \
115+ https://github.com/anchore/grype/releases/download/v${GRYPE_VERSION}/grype_${GRYPE_VERSION}_linux_amd64.tar.gz
116+ curl -sSfL -o /tmp/grype_checksums.txt \
117+ https://github.com/anchore/grype/releases/download/v${GRYPE_VERSION}/grype_${GRYPE_VERSION}_checksums.txt
118+ grep "grype_${GRYPE_VERSION}_linux_amd64.tar.gz" /tmp/grype_checksums.txt | sha256sum --check --ignore-missing
119+ tar -xzf /tmp/grype.tar.gz -C /usr/local/bin grype
120+
108121 - name : Generate human-readable report
109122 if : always()
110123 run : |
You can’t perform that action at this time.
0 commit comments