Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test sarif format upload #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/snyk-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run Snyk test on push

on:
push:
branches:
- master**
- sarif-output

jobs:
run-snyk-test:
runs-on: ubuntu-latest
permissions:
security-events: write

steps:
- name: Setup Java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4
with:
distribution: 'temurin'
java-version: |
8
11

- uses: hivemq/hivemq-checkout-composite-action@db2d49f686c47a1eca28b7722bc3425c0d0e5101 # v1
with:
path: hivemq-azure-cluster-discovery-extension
ref: ${{ github.ref_name }}}
token: ${{ secrets.JENKINS_GITHUB_TOKEN }}

- uses: hivemq/hivemq-checkout-composite-action@db2d49f686c47a1eca28b7722bc3425c0d0e5101 # v1
with:
repository: hivemq/hivemq-extension-sdk
path: hivemq-extension-sdk
ref: ${{ github.ref_name }}}
token: ${{ secrets.JENKINS_GITHUB_TOKEN }}

- name: Setup Snyk
uses: snyk/actions/setup@master

- name: Run Snyk test
shell: bash
run: >
snyk test --configuration-matching=^runtimeClasspath$ --org=hivemqgmbhnxlfpb2wza --sarif-file-output=sarif-output -d hivemq-azure-cluster-discovery-extension
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
ORG_GRADLE_PROJECT_hivemqCommonsUsername: ${{ secrets.JENKINS_GITHUB_USERNAME }}
ORG_GRADLE_PROJECT_hivemqCommonsPassword: ${{ secrets.JENKINS_GITHUB_TOKEN }}
continue-on-error: true

- name: Upload sarif output
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-output
checkout_path: hivemq-azure-cluster-discovery-extension
category: snyk-cve-scan

Loading