2022-12-14 15:12:23 +00:00
|
|
|
name: Snyk
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: 0 0 * * *
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analysis:
|
|
|
|
name: Analysis of Quarkus and Operator
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository == 'keycloak/keycloak'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Build Keycloak
|
|
|
|
uses: ./.github/actions/build-keycloak
|
|
|
|
|
|
|
|
- uses: snyk/actions/setup@master
|
|
|
|
|
|
|
|
- name: Check for vulnerabilities in Quarkus
|
|
|
|
run: snyk test --policy-path=${GITHUB_WORKSPACE}/.github/snyk/.snyk --all-projects --prune-repeated-subdependencies --exclude=tests --sarif-file-output=quarkus-report.sarif quarkus
|
|
|
|
continue-on-error: true
|
|
|
|
env:
|
|
|
|
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
|
|
|
|
|
|
|
- name: Upload Quarkus scanner results to GitHub
|
2023-04-17 12:27:58 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2.2.12
|
2022-12-14 15:12:23 +00:00
|
|
|
with:
|
|
|
|
sarif_file: quarkus-report.sarif
|
2023-01-30 18:38:09 +00:00
|
|
|
category: snyk-quarkus-report
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
- name: Check for vulnerabilities in Operator
|
2023-01-27 06:42:36 +00:00
|
|
|
run: |
|
|
|
|
mvn -Poperator -pl operator -am -DskipTests clean install
|
|
|
|
snyk test --policy-path=${GITHUB_WORKSPACE}/.github/snyk/.snyk --all-projects --prune-repeated-subdependencies --exclude=tests --sarif-file-output=operator-report.sarif operator
|
2022-12-14 15:12:23 +00:00
|
|
|
continue-on-error: true
|
|
|
|
env:
|
|
|
|
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
|
|
|
|
|
|
|
- name: Upload Operator scanner results to GitHub
|
2023-04-17 12:27:58 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2.2.12
|
2022-12-14 15:12:23 +00:00
|
|
|
with:
|
|
|
|
sarif_file: operator-report.sarif
|
2023-01-30 18:38:09 +00:00
|
|
|
category: snyk-operator-report
|