Skip to content

use githu-comment

use githu-comment #142

name: trivy dependency check for package.json
# https://github.com/aquasecurity/trivy-action#usage
on:
push:
schedule:
# 日曜日の午前0時に実行
- cron: '0 0 * * 0'
jobs:
trivy-scan:
runs-on: ubuntu-latest
steps:
- name: clone application source code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: use trivy
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
#exit-code: 1
scanners: 'vuln'
vuln-type: 'library'
hide-progress: true
format: 'sarif'
output: 'sca-report.sarif'
severity: 'CRITICAL,HIGH'
- name: save report as pipeline artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: sca-report.sarif
path: sca-report.sarif
- name: publish trivy alerts
uses: github/codeql-action/upload-sarif@a073c66b2accf653a511d88537804dcafa07812e # v2.25.10
with:
sarif_file: 'sca-report.sarif'
category: trivy