Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ body:
label: Installation compliance
description:
options:
- label: I have read again and made sure that I'm following **exactly** the instructions for my tool of choice ([Leiningen](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#leiningen), [Clojure CLI](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#clojure-cli), [Clojure CLI Tool](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#clojure-cli-tool)).
- label: I have read again and made sure that I'm following **exactly** the instructions for my tool of choice ([Leiningen](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#leiningen), [Clojure CLI](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#clojure-cli), [Clojure CLI Tool](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#clojure-cli-tool)).
required: true
- label: I understand that false positives [can be skipped locally](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#configuration-options) and should be reported to [DependencyCheck](https://github.com/jeremylong/DependencyCheck).
- label: I understand that false positives [can be skipped locally](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#configuration-options) and should be reported to [DependencyCheck](https://github.com/jeremylong/DependencyCheck).
required: false

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ body:
label: Installation compliance
description:
options:
- label: I have read again and made sure that I'm following **exactly** the instructions for my tool of choice ([Leiningen](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#leiningen), [Clojure CLI](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#clojure-cli), [Clojure CLI Tool](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#clojure-cli-tool)).
- label: I have read again and made sure that I'm following **exactly** the instructions for my tool of choice ([Leiningen](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#leiningen), [Clojure CLI](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#clojure-cli), [Clojure CLI Tool](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#clojure-cli-tool)).
required: true
- label: I understand that false positives [can be skipped locally](https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#configuration-options) and should be reported to [DependencyCheck](https://github.com/jeremylong/DependencyCheck).
- label: I understand that false positives [can be skipped locally](https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#configuration-options) and should be reported to [DependencyCheck](https://github.com/jeremylong/DependencyCheck).
required: false

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Changes from 5.0.0 to 5.1.0

* Update `dependency-check-core` from 12.1.0 to [12.1.3](https://github.com/dependency-check/DependencyCheck/blob/main/CHANGELOG.md#version-1213-2025-06-10).
* Support [reporting on vulnerabilities with a score of 0](https://github.com/rm-hull/nvd-clojure/pull/187)

## Changes from 4.0.0 to 5.0.0

* Update `dependency-check-core` to the 12.x series ([12.1.0](https://github.com/dependency-check/DependencyCheck/blob/main/CHANGELOG.md#version-1210-2025-02-16))
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Example usage:
# copy a one-off Clojars token to your clipboard
# GIT_TAG=v5.0.0 CLOJARS_USERNAME=$USER CLOJARS_PASSWORD=$(pbpaste) make deploy
# GIT_TAG=v5.1.0 CLOJARS_USERNAME=$USER CLOJARS_PASSWORD=$(pbpaste) make deploy

deploy: check-env
lein clean
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ will be checked for known security vulnerabilities. `nvd-clojure` passes them to

### Installation and basic usage

> _Please see also:_ [Avoiding classpath interference](https://github.com/rm-hull/nvd-clojure/blob/v5.0.0/FAQ.md#what-is-classpath-interference)
> _Please see also:_ [Avoiding classpath interference](https://github.com/rm-hull/nvd-clojure/blob/v5.1.0/FAQ.md#what-is-classpath-interference)

#### Leiningen

<details>

Please create a separate project consisting of `[nvd-clojure/nvd-clojure "5.0.0"]`. Said project can be located inside the targeted repo's Git repository.
Please create a separate project consisting of `[nvd-clojure/nvd-clojure "5.1.0"]`. Said project can be located inside the targeted repo's Git repository.

```clj
(defproject nvd-helper "local"
:description "nvd-clojure helper project"
:dependencies [[nvd-clojure "5.0.0"]
:dependencies [[nvd-clojure "5.1.0"]
[org.clojure/clojure "1.12.0"]]
:jvm-opts ["-Dclojure.main.report=stderr"])
```
Expand All @@ -54,7 +54,7 @@ If you are using a multi-modules solution (e.g. `lein-monolith`), you should ens

<details>

Please create a separate project consisting exclusively of `nvd-clojure/nvd-clojure {:mvn/version "5.0.0"}`. Said project can be located inside the targeted repo's Git repository.
Please create a separate project consisting exclusively of `nvd-clojure/nvd-clojure {:mvn/version "5.1.0"}`. Said project can be located inside the targeted repo's Git repository.

Please do not add nvd-clojure as a dependency in the deps.edn of the project to be analysed.

Expand Down Expand Up @@ -155,7 +155,7 @@ dependency relationships are:
dependencies, and suggest upgraded versions, and can optionally be configured
to update the project file.

(Note that that is only one of the multiple ways of remediating a given vulnerability, please see [FAQ](https://github.com/rm-hull/nvd-clojure/blob/v5.0.0/FAQ.md#how-to-remediate-a-cve-is-it-a-good-idea-to-automate-remediation))
(Note that that is only one of the multiple ways of remediating a given vulnerability, please see [FAQ](https://github.com/rm-hull/nvd-clojure/blob/v5.1.0/FAQ.md#how-to-remediate-a-cve-is-it-a-good-idea-to-automate-remediation))

## Configuration

Expand Down Expand Up @@ -183,10 +183,10 @@ There are some specific settings below which are worthy of a few comments:
* `:nvd-api` - map of:
* :key - **MANDATORY** (unless you set an `NVD_API_TOKEN` environment variable) - must contain an API key that you can obtain in https://nvd.nist.gov/developers/request-an-api-key
* other keys: `:endpoint`, `:delay`, `:max-retry-count`, `:valid-for-hours`, `:datafeed` - advanced, please refer to the source code.
* `:fail-threshold` default value `0`; checks the highest CVSS score across all dependencies, and fails if this threshold is breached.
- As CVSS score ranges from `0..10`, the default value will cause a build to fail even for the lowest rated
vulnerability.
* `:fail-threshold` default value `0`; checks the highest CVSS score across all dependencies, and fails if this threshold is breached (i.e. the highest score is greater than the threshold).
- As CVSS score ranges from `0..10`, the default value will cause a build to fail if at least one vulnerability with a score > 0 is detected.
- Set to `11` if you never want the build to fail.
- Set to `-1` if you also want the build to fail when any vulnerabilities of score 0 or higher were detected (useful to be alerted of vulnerabilities which haven't yet been assigned a CVSS score, so have a score of 0).
* `:data-directory` default value is the data dir of `DependencyCheck`, e.g. `~/.m2/repository/org/owasp/dependency-check-utils/3.2.1/data/`
- It shouldn't normally be necessary to change this
* `:suppression-file` default unset
Expand All @@ -212,7 +212,7 @@ You can also set logging properties directly through Java system properties (the
clojure -J-Dclojure.main.report=stderr -J-Dorg.slf4j.simpleLogger.log.org.apache.commons=error -Tnvd nvd.task/check # ...
```

## [FAQ](https://github.com/rm-hull/nvd-clojure/blob/v5.0.0/FAQ.md)
## [FAQ](https://github.com/rm-hull/nvd-clojure/blob/v5.1.0/FAQ.md)

## Attribution

Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject nvd-clojure "5.0.0"
(defproject nvd-clojure "5.1.0"
:description "National Vulnerability Database dependency checker"
:url "https://github.com/rm-hull/nvd-clojure"
:license {:name "The MIT License (MIT)"
Expand Down
2 changes: 1 addition & 1 deletion resources/nvd_clojure/default_config_content.edn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

;; Feel free to tweak it, version-control it and remove any comment.

;; Configuration reference: https://github.com/rm-hull/nvd-clojure/tree/v5.0.0#configuration-options
;; Configuration reference: https://github.com/rm-hull/nvd-clojure/tree/v5.1.0#configuration-options

{;; You can use the `:suppression-file` in order to silence false positives.
;; This file will be automatically created, with whatever filename is specified here, if it didn't exist already.
Expand Down
6 changes: 4 additions & 2 deletions src/nvd/report.clj
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@

(defn fail-build? [project]
(let [^Engine engine (:engine project)
highest-score (long (apply max 0 (scores engine)))
all-scores (scores engine)
highest-score (long (apply max 0 all-scores))
fail-threshold (long (get-in project [:nvd :fail-threshold] 0))]
(->
project
(assoc-in [:nvd :highest-score] highest-score)
(assoc :failed? (> highest-score fail-threshold)))))
(assoc :failed? (and (seq all-scores)
(> highest-score fail-threshold))))))