|
1 |
| -name: Trivy Artifact Scanning |
2 |
| -on: |
3 |
| - # push: |
4 |
| - # branches: [ master ] |
5 |
| - # paths: |
6 |
| - # - "plural/**" |
7 |
| - # - ".github/workflows/trivy-artifact-scan.yaml" |
8 |
| - # pull_request: |
9 |
| - # branches: [ master ] |
10 |
| - # paths: |
11 |
| - # - "plural/**" |
12 |
| - # - ".github/workflows/trivy-artifact-scan.yaml" |
13 |
| - # schedule: |
14 |
| - # - cron: '0 0 * * 1' |
15 |
| - workflow_dispatch: |
16 |
| -jobs: |
17 |
| - trivy-scan: |
18 |
| - name: Trivy IaC scan |
19 |
| - runs-on: ubuntu-20.04 |
20 |
| - permissions: |
21 |
| - contents: read # for actions/checkout to fetch code |
22 |
| - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results |
23 |
| - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status |
24 |
| - steps: |
25 |
| - - name: Checkout code |
26 |
| - uses: actions/checkout@v3 |
27 |
| - - name: Run Trivy vulnerability scanner in IaC mode |
28 |
| - uses: aquasecurity/trivy-action@master |
29 |
| - with: |
30 |
| - scan-type: 'fs' |
31 |
| - scan-ref: 'plural' |
32 |
| - hide-progress: false |
33 |
| - format: 'sarif' |
34 |
| - output: 'trivy-results.sarif' |
35 |
| - security-checks: 'vuln,secret,config' |
36 |
| - ignore-unfixed: true |
37 |
| - #severity: 'CRITICAL,HIGH' |
38 |
| - env: |
39 |
| - TRIVY_SKIP_DB_UPDATE: true |
40 |
| - TRIVY_SKIP_JAVA_DB_UPDATE: true |
41 |
| - - name: Upload Trivy scan results to GitHub Security tab |
42 |
| - uses: github/codeql-action/upload-sarif@v2 |
43 |
| - with: |
44 |
| - sarif_file: 'trivy-results.sarif' |
| 1 | +# name: Trivy Artifact Scanning |
| 2 | +# on: |
| 3 | +# # push: |
| 4 | +# # branches: [ master ] |
| 5 | +# # paths: |
| 6 | +# # - "plural/**" |
| 7 | +# # - ".github/workflows/trivy-artifact-scan.yaml" |
| 8 | +# # pull_request: |
| 9 | +# # branches: [ master ] |
| 10 | +# # paths: |
| 11 | +# # - "plural/**" |
| 12 | +# # - ".github/workflows/trivy-artifact-scan.yaml" |
| 13 | +# # schedule: |
| 14 | +# # - cron: '0 0 * * 1' |
| 15 | +# workflow_dispatch: |
| 16 | +# jobs: |
| 17 | +# trivy-scan: |
| 18 | +# name: Trivy IaC scan |
| 19 | +# runs-on: ubuntu-20.04 |
| 20 | +# permissions: |
| 21 | +# contents: read # for actions/checkout to fetch code |
| 22 | +# security-events: write # for github/codeql-action/upload-sarif to upload SARIF results |
| 23 | +# actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status |
| 24 | +# steps: |
| 25 | +# - name: Checkout code |
| 26 | +# uses: actions/checkout@v3 |
| 27 | +# - name: Run Trivy vulnerability scanner in IaC mode |
| 28 | +# uses: aquasecurity/trivy-action@master |
| 29 | +# with: |
| 30 | +# scan-type: 'fs' |
| 31 | +# scan-ref: 'plural' |
| 32 | +# hide-progress: false |
| 33 | +# format: 'sarif' |
| 34 | +# output: 'trivy-results.sarif' |
| 35 | +# security-checks: 'vuln,secret,config' |
| 36 | +# ignore-unfixed: true |
| 37 | +# #severity: 'CRITICAL,HIGH' |
| 38 | +# env: |
| 39 | +# TRIVY_SKIP_DB_UPDATE: true |
| 40 | +# TRIVY_SKIP_JAVA_DB_UPDATE: true |
| 41 | +# - name: Upload Trivy scan results to GitHub Security tab |
| 42 | +# uses: github/codeql-action/upload-sarif@v2 |
| 43 | +# with: |
| 44 | +# sarif_file: 'trivy-results.sarif' |
0 commit comments