Skip to content

Commit

Permalink
feat: add license and vulnerability scanner (#66)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Treier <richard.treier@sovity.de>
  • Loading branch information
omarsilva1 and richardtreier authored Jan 26, 2023
1 parent f5ccc42 commit a291c4e
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/license_scan_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
format: table
vulnerability:
type:
- os
- library
ignore-unfixed: true
scan:
security-checks:
- license
license-full: true
severity:
- UNKNOWN
- HIGH
- CRITICAL
38 changes: 38 additions & 0 deletions .github/workflows/license_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Trivy License Scans

on:
pull_request:
branches: [ "main" ]


jobs:
license_scan:
name: license_scan
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Run license scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'rootfs'
scan-ref: '.'
trivy-config: ".github/license_scan_config.yml"
exit-code: 1

- name: Run vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
security-checks: vuln, config
severity: CRITICAL
exit-code: 1
3 changes: 3 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This concerns the dev dependency @angular-devkit/build-angular.
# This dependency uses webpack-merge@5.8.0 that uses wildcard which uses minimist 1.2.0 (which is causing the error)
CVE-2021-44906
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a291c4e

Please sign in to comment.