Skip to content

Conversation

@montokapro
Copy link

Addresses: #59

I ran into the same confusion, and the posts in this issue were very helpful! This PR adds them to the documentation.

@nMoncho
Copy link
Owner

nMoncho commented Nov 26, 2025

Hi @montokapro, thank you for your contribution.
Could you kindly update the commit message to use conventional commits?
Something like docs: Clarify Getting Started section with proper NVD API Key setup

@montokapro montokapro force-pushed the issue-59-documentation branch from 4ab6828 to 6cf145f Compare November 26, 2025 22:04
@montokapro
Copy link
Author

Done! Thanks for clarifying the convention!

@nMoncho
Copy link
Owner

nMoncho commented Nov 28, 2025

hi @montokapro sorry that this took so long. I was in the middle of something at work.
I just checked the snippet on a sample project, could you kindly check the same on your side, and adjust the PR if that's the case, otherwise please let me know and I can do it.

I tried and worked successfully:

import net.nmoncho.sbt.dependencycheck.settings._

dependencyCheckNvdApi := NvdApiSettings("MY-UUID-NVD-KEY")

The apiKey named parameter isn't required. Could please confirm with me? Sorry again about this back and forth.

@montokapro
Copy link
Author

hi @montokapro sorry that this took so long

No worries! I am grateful that you maintain this project!

import net.nmoncho.sbt.dependencycheck.settings._

dependencyCheckNvdApi := NvdApiSettings("MY-UUID-NVD-KEY")

This does work for me, though regardless of which approach I take, I get the warning

WARN  org.owasp.dependencycheck.data.update.NvdApiDataSource - An NVD API Key was not provided - it is highly recommended to use an NVD API key as the update can take a VERY long time without an API Key

I will try again this weekend with no api key, verify this does not work, and then change this PR as you suggested. I assumed this warning was for a specific API call, and not whichever one was necessary for sbt -Dlog4j2.level=info dependency-check to complete successfully.

@nMoncho
Copy link
Owner

nMoncho commented Nov 29, 2025

@montokapro that's weird. I'm a bit puzzled by this behavior, as the named parameter shouldn't be required, as the apiKey is in the first position.

I did a fresh setup with a Docker container, to make sure I'd have a clean environment , and I could not reproduce this warning.

I tried these different setups

import net.nmoncho.sbt.dependencycheck.settings._

dependencyCheckNvdApi := NvdApiSettings("MY-UUID-NVD-KEY")

☝️ doesn't issue the warning

import net.nmoncho.sbt.dependencycheck.settings._

ThisBuild / dependencyCheckNvdApi := NvdApiSettings("MY-UUID-NVD-KEY")

☝️ doesn't issue the warning

import net.nmoncho.sbt.dependencycheck.settings._

// dependencyCheckNvdApi := NvdApiSettings("MY-UUID-NVD-KEY")

☝️ does issue the warning

@montokapro
Copy link
Author

I guess I added dependencyCheckNvdApi to the wrong place, and the plugin worked for me regardless! I can run a dependency check even without setting an API key, and continue to get the warning I described.

I've updated the README as you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants