mirror of
https://github.com/rocky-linux/sig-cloud-instance-images.git
synced 2024-12-18 07:08:30 +00:00
Modify scanning (#13)
Scan the non-library image which is more up to date Upload files to a github pages branch for public viewing
This commit is contained in:
parent
7312f86c8b
commit
55a0144e4f
22
.github/workflows/scan.yml
vendored
22
.github/workflows/scan.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/library/rockylinux:8'
|
||||
image-ref: 'docker.io/rockylinux/rockylinux:8'
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
exit-code: '1'
|
||||
@ -31,22 +31,26 @@ jobs:
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
|
||||
- name: Create public folder
|
||||
run: |
|
||||
mkdir -p public/
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
if: always()
|
||||
with:
|
||||
image-ref: 'docker.io/library/rockylinux:8'
|
||||
format: 'table'
|
||||
output: 'trivy-results'
|
||||
image-ref: 'docker.io/rockylinux/rockylinux:8'
|
||||
template: '@contrib/html.tpl'
|
||||
output: 'public/index.html'
|
||||
exit-code: '1'
|
||||
ignore-unfixed: true
|
||||
vuln-type: 'os,library'
|
||||
severity: 'CRITICAL,HIGH,MEDIUM'
|
||||
|
||||
- name: Save scan results as an artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
- name: Save scan results to github pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
with:
|
||||
name: 'trivy-results'
|
||||
path: 'trivy-results'
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./public
|
||||
|
Loading…
Reference in New Issue
Block a user