Skip to content

Check dependency vulnerabilities #779

Check dependency vulnerabilities

Check dependency vulnerabilities #779

# SPDX-FileCopyrightText: 2024 Jomco B.V.
# SPDX-FileCopyrightText: 2024 Stichting Connekt
# SPDX-FileContributor: Joost Diepenmaat <joost@jomco.nl>
# SPDX-FileContributor: Remco van 't Veer <remco@jomco.nl>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Check dependency vulnerabilities
on:
push:
schedule:
- cron: '0 1 * * 1,2,3,4,5' # every workday
jobs:
"NVD-check":
runs-on: ubuntu-22.04
steps:
# NVD data can change every day, so we use a cache key based on today's date
- name: Get current date
id: date
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT
- uses: actions/checkout@v6
- uses: actions/cache@v5
with:
path: "~/.m2"
# store as today's cache
key: "nvd-clojure-${{ steps.date.outputs.date }}"
# if today's cache does not yet exist, fetch from whatever iss
# the most recent cache for nvd-clojure
# and update that
restore-keys: "nvd-clojure-"
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
- name: Install clj runtime
run: |
cd "$HOME"
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh
chmod +x posix-install.sh
sudo ./posix-install.sh
- name: Check that NVD Secret is set
env:
NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }}
if: ${{ env.NVD_API_TOKEN == '' }}
run: echo "NVD_API_TOKEN secret is empty"; exit 1
- name: Check clojure dependencies
env:
CLJ_WATSON_NVD_API_KEY: "${{ secrets.NVD_API_TOKEN }}"
run: make watson