Skip to content

Commit

Permalink
gh: add dependency checks
Browse files Browse the repository at this point in the history
  • Loading branch information
joodie authored and remvee committed Jan 29, 2024
1 parent 808ca53 commit 172643f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
- name: Run linters
run: bin/clojure -M:clj-kondo --lint src test

- name: Install NVD clojure
run: bin/clojure -Ttools install nvd-clojure/nvd-clojure '{:mvn/version "RELEASE"}' :as nvd;

- name: Check NVD
run: bin/clojure -J-Dclojure.main.report=stderr -Tnvd nvd.task/check :classpath \""$(bin/clojure -Spath)\""

create_release:
if: startsWith(github.ref, 'refs/tags/v0') || startsWith(github.ref, 'refs/tags/v1')
runs-on: ubuntu-latest
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run dependency checks

on:
push:
schedule:
- cron: '0 1 * * 1'

jobs:
checks:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with: { path: "~/.m2", key: "${{ runner.os }}-${{ hashFiles('deps.edn') }}-m2" }
- uses: actions/cache@v4
with:
key: "clojure-${{ runner.os }}-${{ hashFiles('.github/workflows/install-binaries.sh') }}"
path: |
./bin
./lib
- name: Install NVD clojure
run: bin/clojure -Ttools install nvd-clojure/nvd-clojure '{:mvn/version "RELEASE"}' :as nvd;

- name: Check NVD Secret is configured
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 NVD
env:
NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }}
run: bin/clojure -J-Dclojure.main.report=stderr -Tnvd nvd.task/check :config-filename '".nvd-config.json"' :classpath "\"$(bin/clojure -Spath)\""
1 change: 1 addition & 0 deletions .nvd-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"nvd": {"suppression-file": ".nvd-suppressions.xml"}}
3 changes: 3 additions & 0 deletions .nvd-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
</suppressions>

0 comments on commit 172643f

Please sign in to comment.