Skip to content

Commit

Permalink
Merge pull request #5143 from A-Fitz-Nelnet/maven-prop-npm_audit_url
Browse files Browse the repository at this point in the history
Add Maven property for Node Audit Analyzer URL
  • Loading branch information
jeremylong committed Dec 15, 2022
2 parents 2fc0f15 + e4645a4 commit 5435749
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,13 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
@Parameter(property = "nodeAuditAnalyzerEnabled")
private Boolean nodeAuditAnalyzerEnabled;

/**
* The Node Audit API URL for the Node Audit Analyzer.
*/
@SuppressWarnings("CanBeFinal")
@Parameter(property = "nodeAuditAnalyzerUrl")
private String nodeAuditAnalyzerUrl;

/**
* Sets whether or not the Yarn Audit Analyzer should be used.
*/
Expand Down Expand Up @@ -520,7 +527,7 @@ public abstract class BaseDependencyCheckMojo extends AbstractMojo implements Ma
@Parameter(property = "nodeAuditSkipDevDependencies")
private Boolean nodeAuditSkipDevDependencies;
/**
* Sets whether or not the Node Audit Analyzer should skip devDependencies.
* Sets whether or not the Node.js Analyzer should skip devDependencies.
*/
@SuppressWarnings("CanBeFinal")
@Parameter(property = "nodePackageSkipDevDependencies")
Expand Down Expand Up @@ -2151,6 +2158,7 @@ protected void populateSettings() {
settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_CPANFILE_ENABLED, cpanfileAnalyzerEnabled);
settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_ENABLED, nodeAnalyzerEnabled);
settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_AUDIT_ENABLED, nodeAuditAnalyzerEnabled);
settings.setStringIfNotNull(Settings.KEYS.ANALYZER_NODE_AUDIT_URL, nodeAuditAnalyzerUrl);
settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_AUDIT_USE_CACHE, nodeAuditAnalyzerUseCache);
settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_PACKAGE_SKIPDEV, nodePackageSkipDevDependencies);
settings.setBooleanIfNotNull(Settings.KEYS.ANALYZER_NODE_AUDIT_SKIPDEV, nodeAuditSkipDevDependencies);
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 @@ -92,6 +92,7 @@ nodeAnalyzerEnabled | Sets whether the [retired](../analyzers/in
nodeAuditAnalyzerEnabled | Sets whether the Node Audit Analyzer should be used. This analyzer requires an internet connection. | true
nodeAuditAnalyzerUseCache | Sets whether the Node Audit Analyzer will cache results. Cached results expire after 24 hours. | true
nodeAuditSkipDevDependencies | Sets whether the Node Audit Analyzer will skip devDependencies. | false
nodeAuditAnalyzerUrl | The Node Audit API URL for the Node Audit Analyzer. | https://registry.npmjs.org/-/npm/v1/security/audits
nodePackageSkipDevDependencies | Sets whether the Node Package Analyzer will skip devDependencies. | false
retireJsAnalyzerEnabled | Sets whether the RetireJS Analyzer should be used. | true
retireJsForceUpdate | Sets whether the RetireJS Analyzer should update regardless of the `autoupdate` setting. | false
Expand Down

0 comments on commit 5435749

Please sign in to comment.