[bug] Quick fix for handling non 200 status codes when loading specs from URI #1250
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
TRIVY_VERSION: 0.44.1 | |
name: License scan | |
jobs: | |
license: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install trivy | |
run: | | |
wget https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.deb | |
sudo dpkg -i trivy_${TRIVY_VERSION}_Linux-64bit.deb | |
- name: Create license report artifact | |
run: trivy fs --scanners license --skip-dirs ".github" . | tee license-report.txt | |
- name: Upload license report artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: license-report | |
path: license-report.txt | |
- name: Check for unknown licenses | |
run: trivy fs --scanners license --skip-dirs ".github" --exit-code 1 --severity UNKNOWN . || echo "::warning::Unknown licenses found, please verify" | |
- name: Check for forbidden licenses and fail | |
run: trivy fs --scanners license --skip-dirs ".github" --exit-code 1 --severity CRITICAL,HIGH . |