|
15 | 15 | # schedule:
|
16 | 16 | # - cron: '31 6 * * 0'
|
17 | 17 |
|
18 |
| -# jobs: |
19 |
| -# Anchore-Build-Scan: |
20 |
| -# runs-on: ubuntu-latest |
21 |
| -# steps: |
22 |
| -# - name: Checkout the code |
23 |
| -# uses: actions/checkout@v4 |
24 |
| -# - name: Build the Docker image |
25 |
| -# run: docker build . --file Dockerfile --tag localbuild/testimage:latest |
26 |
| -# - name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled |
27 |
| -# uses: anchore/scan-action@v5 |
28 |
| -# id: scan |
29 |
| -# with: |
30 |
| -# image: "localbuild/testimage:latest" |
31 |
| -# fail-build: false |
32 |
| -# - name: Upload Anchore Scan Report |
33 |
| -# uses: github/codeql-action/upload-sarif@v3 |
34 |
| -# with: |
35 |
| -# sarif_file: ${{ steps.scan.outputs.sarif }} |
36 |
| -# - name: Fail build if scan has vulns |
37 |
| -# uses: anchore/scan-action@v5 |
38 |
| -# with: |
39 |
| -# image: "localbuild/testimage:latest" |
40 |
| -# severity-cutoff: critical |
| 18 | +jobs: |
| 19 | + Anchore-Build-Scan: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - name: Checkout the code |
| 23 | + uses: actions/checkout@v4 |
| 24 | + - name: Build the Docker image |
| 25 | + run: docker build . --file Dockerfile --tag localbuild/testimage:latest |
| 26 | + - name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled |
| 27 | + uses: anchore/scan-action@v5 |
| 28 | + id: scan |
| 29 | + with: |
| 30 | + image: "localbuild/testimage:latest" |
| 31 | + fail-build: false |
| 32 | + - name: Upload Anchore Scan Report |
| 33 | + uses: github/codeql-action/upload-sarif@v3 |
| 34 | + with: |
| 35 | + sarif_file: ${{ steps.scan.outputs.sarif }} |
| 36 | + - name: Fail build if scan has vulns |
| 37 | + uses: anchore/scan-action@v5 |
| 38 | + with: |
| 39 | + image: "localbuild/testimage:latest" |
| 40 | + severity-cutoff: critical |
41 | 41 |
|
0 commit comments