2022-12-14 15:12:23 +00:00
|
|
|
name: Snyk
|
|
|
|
|
2023-06-01 07:03:09 +00:00
|
|
|
on:
|
2022-12-14 15:12:23 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analysis:
|
|
|
|
name: Analysis of Quarkus and Operator
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository == 'keycloak/keycloak'
|
|
|
|
steps:
|
2023-09-06 11:40:06 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
- name: Build Keycloak
|
|
|
|
uses: ./.github/actions/build-keycloak
|
|
|
|
|
|
|
|
- uses: snyk/actions/setup@master
|
|
|
|
|
|
|
|
- name: Check for vulnerabilities in Quarkus
|
2023-05-17 16:31:34 +00:00
|
|
|
run: snyk test --policy-path=${GITHUB_WORKSPACE}/.github/snyk/.snyk --all-projects --prune-repeated-subdependencies --exclude=tests --sarif-file-output=quarkus-report.sarif quarkus/deployment
|
2022-12-14 15:12:23 +00:00
|
|
|
continue-on-error: true
|
|
|
|
env:
|
|
|
|
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
|
|
|
|
|
|
|
- name: Upload Quarkus scanner results to GitHub
|
2023-08-29 10:53:18 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2.21.5
|
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: |
|
2022-12-09 15:44:22 +00:00
|
|
|
./mvnw -Poperator -pl operator -am -DskipTests clean install --batch-mode
|
2023-01-27 06:42:36 +00:00
|
|
|
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-08-29 10:53:18 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2.21.5
|
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
|