Skip to content

Commit 8d4f96f

Browse files
committed
Migrate from nvd-clojure to clj-watson
More robust and less false positives.
1 parent 7ffc445 commit 8d4f96f

File tree

5 files changed

+22
-34
lines changed

5 files changed

+22
-34
lines changed

.github/workflows/dependency-vulnerabilities.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
"NVD-check":
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-22.04
1616

1717
steps:
1818

@@ -32,15 +32,17 @@ jobs:
3232
# the most recent cache for nvd-clojure
3333
# and update that
3434
restore-keys: "nvd-clojure-"
35-
35+
36+
- uses: actions/setup-java@v4
37+
with:
38+
distribution: 'temurin'
39+
java-version: '21'
40+
3641
- name: Install clj runtime
3742
run: |
3843
.github/workflows/install-binaries.sh
3944
echo "${PWD}/bin" >> $GITHUB_PATH
4045
41-
- name: Install NVD clojure
42-
run: .github/workflows/install-nvd-clojure-tool.sh
43-
4446
- name: Check that NVD Secret is set
4547
env:
4648
NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }}
@@ -49,5 +51,6 @@ jobs:
4951

5052
- name: Check clojure dependencies with NVD
5153
env:
52-
NVD_API_TOKEN: ${{ secrets.NVD_API_TOKEN }}
53-
run: clojure -J-Dclojure.main.report=stderr -Tnvd nvd.task/check :config-filename '".nvd-config.json"' :classpath "\"$(clojure -Spath)\""
54+
CLJ_WATSON_NVD_API_KEY: "${{ secrets.NVD_API_TOKEN }}"
55+
run: |
56+
clojure -M:clj-watson scan -p deps.edn -f -w .watson.properties

.github/workflows/install-nvd-clojure-tool.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.nvd-suppressions.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,4 @@
44
SPDX-FileContributor: Joost Diepenmaat
55
-->
66
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
7-
<!-- This is an automatically generated config file by nvd-clojure. -->
8-
<!-- Feel free to tweak it, version-control it and remove any comment. -->
9-
<!-- You can find suppression examples in https://jeremylong.github.io/DependencyCheck/general/suppression.html -->
10-
<suppress>
11-
<notes>This is a vulnerability in clojure before 1.9.0, which we are not using</notes>
12-
<cve>CVE-2017-20189</cve>
13-
</suppress>
147
</suppressions>

.watson.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-FileCopyrightText: 2024, 2025 SURF B.V.
2+
# SPDX-License-Identifier: EPL-2.0 WITH Classpath-exception-2.0
3+
4+
suppression.file=.nvd-suppressions.xml

deps.edn

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@
1515
nl.jomco/spider {:mvn/version "0.2.1"}}
1616
:aliases {:test {:extra-deps {lambdaisland/kaocha {:mvn/version "RELEASE"}}
1717
:main-opts ["-m" "kaocha.runner"]}
18+
1819
:clj-kondo {:replace-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
1920
:main-opts ["-m" "clj-kondo.main"]}
21+
2022
:outdated {:replace-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
21-
:main-opts ["-m" "antq.core"]}}}
23+
:main-opts ["-m" "antq.core"]}
24+
25+
:clj-watson {:replace-deps
26+
{io.github.clj-holmes/clj-watson
27+
{:git/tag "v6.0.1" :git/sha "b520351"}}
28+
:main-opts ["-m" "clj-watson.cli"]}}}

0 commit comments

Comments
 (0)