Skip to content

Commit

Permalink
feat(maven): Allow configurable resultsPerPage in Maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
aikebah committed Jul 15, 2024
1 parent 3976ae6 commit 2daf8ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,13 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
@Parameter(property = "nvdApiDelay")
private Integer nvdApiDelay;

/**
* The number records for a single page from NVD API (must be <=2000).
*/
@SuppressWarnings("CanBeFinal")
@Parameter(property = "nvdApiResultsPerPage")
private Integer nvdApiResultsPerPage;

/**
* The path to dotnet core.
*/
Expand Down Expand Up @@ -2354,6 +2361,7 @@ protected void populateSettings() {
settings.setStringIfNotEmpty(Settings.KEYS.DB_FILE_NAME, dbFilename);
settings.setStringIfNotNull(Settings.KEYS.NVD_API_ENDPOINT, nvdApiEndpoint);
settings.setIntIfNotNull(Settings.KEYS.NVD_API_DELAY, nvdApiDelay);
settings.setIntIfNotNull(Settings.KEYS.NVD_API_RESULTS_PER_PAGE, nvdApiResultsPerPage);
settings.setStringIfNotEmpty(Settings.KEYS.NVD_API_DATAFEED_URL, nvdDatafeedUrl);
settings.setIntIfNotNull(Settings.KEYS.NVD_API_VALID_FOR_HOURS, nvdValidForHours);
settings.setIntIfNotNull(Settings.KEYS.NVD_API_MAX_RETRY_COUNT, nvdMaxRetryCount);
Expand Down
1 change: 1 addition & 0 deletions maven/src/site/markdown/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ nvdApiEndpoint | The NVD API endpoint URL; setting this is uncommon.
nvdApiServerId | The id of a server defined in the settings.xml that configures the credentials (password is used as ApiKey) for accessing the NVD API. | &nbsp; |
nvdMaxRetryCount | The maximum number of retry requests for a single call to the NVD API. | 10 |
nvdApiDelay | The number of milliseconds to wait between calls to the NVD API. | 3500 with an NVD API Key or 8000 without an API Key . |
nvdApiResultsPerPage | The number records for a single page from NVD API (must be <=2000). | 2000 |
nvdDatafeedUrl | The URL for the NVD API Data feed that can be generated using https://github.com/jeremylong/Open-Vulnerability-Project/tree/main/vulnz#caching-the-nvd-cve-data - example value `https://internal.server/cache/nvdcve-{0}.json.gz` | &nbsp; |
nvdDatafeedServerId | The id of a server defined in the settings.xml that configures the credentials (username and password) for accessing the NVD API Data feed.| &nbsp; |
nvdUser | Credentials used for basic authentication for the NVD API Data feed. | &nbsp; |
Expand Down

0 comments on commit 2daf8ff

Please sign in to comment.