File tree Expand file tree Collapse file tree 4 files changed +13
-60
lines changed Expand file tree Collapse file tree 4 files changed +13
-60
lines changed Original file line number Diff line number Diff line change 1515 fail-build : false # Set to true to fail the build if vulnerabilities are found
1616 imageName : " webapp01"
1717 tag : ${{ github.sha }}
18+
19+ permissions :
20+ contents : read # for actions/checkout to fetch code
21+ security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
22+ actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
1823
1924jobs :
2025 anchore-grype-scan :
2126 name : Anchore Grype Vulnerability Scan
2227
2328 runs-on : ubuntu-latest
2429
25- permissions :
26- contents : read # for actions/checkout to fetch code
27- security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
28- actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
29-
3030 steps :
3131 - name : Checkout code
3232 uses : actions/checkout@v4
3333
3434 - name : Build an image from Dockerfile
3535 uses : docker/build-push-action@v4
3636 with :
37+ context : ./src/webapp01
38+ file : ./src/webapp01/Dockerfile
3739 tags : " ${{ env.imageName }}:${{ env.tag }}"
3840 push : false
3941 load : true
Original file line number Diff line number Diff line change 1616 imageName : " webapp01"
1717 tag : ${{ github.sha }}
1818
19+ permissions :
20+ contents : read # for actions/checkout to fetch code
21+ security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
22+ actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
23+
1924jobs :
2025 trivy :
2126 name : Trivy vulnerability scanner
2227
2328 runs-on : ubuntu-latest
2429
25- permissions :
26- contents : read # for actions/checkout to fetch code
27- security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
28- actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
29-
3030 steps :
3131 - name : Checkout code
3232 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1- name : " CodeQL Advanced"
1+ name : " SAST - Code Scanning - CodeQL Advanced"
22
33on :
44 push :
2020 permissions :
2121 # required for all workflows
2222 security-events : write
23-
2423 # required to fetch internal or private CodeQL packs
2524 packages : read
26-
2725 # only required for workflows in private repositories
2826 actions : read
2927 contents : read
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments