Skip to content

Commit

Permalink
fixup! feat: scanning the entire repository
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelaepure10 committed Jun 5, 2024
1 parent 4c256d7 commit 5e56d3f
Showing 1 changed file with 22 additions and 29 deletions.
51 changes: 22 additions & 29 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,36 +51,19 @@ jobs:
#skip-dirs: "ignored-dir"
#trivy-config: trivy.yaml

#- name: Upload Trivy scan results as artifact
# uses: actions/upload-artifact@v2
# with:
# name: trivy-results
# path: trivy-results.sarif

#- name: Upload Trivy scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: 'trivy-results.sarif'
- name: Run Trivy scan
run: |
trivy fs --target /home/runner/work/hale/hale --debug --format sarif --output trivy-results.sarif

#- name: Create Pull Request
# uses: peter-evans/create-pull-request@v5
#- name: Run Trivy vulnerability scanner
# uses: aquasecurity/[email protected]
# with:
# commit-message: update vulnerability list
# title: 'ci: Update vulnerability list'
# body: Update the vulnerability list
# branch: update-vulnerabilities
# base: master

- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
target: '/home/runner/work/hale/hale' # specify the target directory or file
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
debug: true
# scan-type: 'fs'
# target: '/home/runner/work/hale/hale'
# format: 'sarif'
# output: 'trivy-results.sarif'
# severity: 'CRITICAL,HIGH'
# debug: true

- name: Upload Trivy scan results to file
uses: actions/upload-artifact@v2
Expand All @@ -91,4 +74,14 @@ jobs:
# - name: Upload Trivy scan results to GitHub Security tab
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: 'trivy-results.sarif'
# sarif_file: 'trivy-results.sarif'


#- name: Create Pull Request
# uses: peter-evans/create-pull-request@v5
# with:
# commit-message: update vulnerability list
# title: 'ci: Update vulnerability list'
# body: Update the vulnerability list
# branch: update-vulnerabilities
# base: master

0 comments on commit 5e56d3f

Please sign in to comment.