mirror of
https://github.com/rocky-linux/sig-cloud-instance-images.git
synced 2024-12-18 15:18:35 +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
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
image-ref: 'docker.io/library/rockylinux:8'
|
image-ref: 'docker.io/rockylinux/rockylinux:8'
|
||||||
format: 'sarif'
|
format: 'sarif'
|
||||||
output: 'trivy-results.sarif'
|
output: 'trivy-results.sarif'
|
||||||
exit-code: '1'
|
exit-code: '1'
|
||||||
@ -31,22 +31,26 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
sarif_file: 'trivy-results.sarif'
|
sarif_file: 'trivy-results.sarif'
|
||||||
|
|
||||||
|
- name: Create public folder
|
||||||
|
run: |
|
||||||
|
mkdir -p public/
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
image-ref: 'docker.io/library/rockylinux:8'
|
image-ref: 'docker.io/rockylinux/rockylinux:8'
|
||||||
format: 'table'
|
template: '@contrib/html.tpl'
|
||||||
output: 'trivy-results'
|
output: 'public/index.html'
|
||||||
exit-code: '1'
|
exit-code: '1'
|
||||||
ignore-unfixed: true
|
ignore-unfixed: true
|
||||||
vuln-type: 'os,library'
|
vuln-type: 'os,library'
|
||||||
severity: 'CRITICAL,HIGH,MEDIUM'
|
severity: 'CRITICAL,HIGH,MEDIUM'
|
||||||
|
|
||||||
- name: Save scan results as an artifact
|
- name: Save scan results to github pages
|
||||||
uses: actions/upload-artifact@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: always()
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
name: 'trivy-results'
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path: 'trivy-results'
|
publish_dir: ./public
|
||||||
|
Loading…
Reference in New Issue
Block a user