Snyk Monitor #4
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
# SPDX-License-Identifier: Apache-2.0 | |
name: "Snyk Monitor" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
security-events: write | |
jobs: | |
snyk: | |
name: Snyk Monitor | |
runs-on: hiero-client-sdk-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Setup Java | |
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
with: | |
distribution: temurin | |
java-version: "17.0.13" | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 | |
with: | |
gradle-version: wrapper | |
- name: Disable Gradle Configuration Cache | |
run: sed -i 's/^org.gradle.configuration-cache=.*$/org.gradle.configuration-cache=false/' gradle.properties | |
- name: Compile | |
run: ./gradlew assemble | |
- name: Setup NodeJS | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version: 18 | |
- name: Setup Snyk | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
run: npm install -g snyk | |
- name: Run Snyk Monitor | |
continue-on-error: true | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
run: snyk monitor --all-projects --policy-path=.snyk --trust-policies |