From e26d4315baa0b9a5e334ee229ea63259aef67aff Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Thu, 21 Nov 2024 05:55:04 -0500 Subject: [PATCH] fix: expose analyzer.node.audit.url resolves #408 --- .../gradle/extension/NodeAuditExtension.groovy | 4 ++++ .../owasp/dependencycheck/gradle/tasks/ConfiguredTask.groovy | 1 + 2 files changed, 5 insertions(+) diff --git a/src/main/groovy/org/owasp/dependencycheck/gradle/extension/NodeAuditExtension.groovy b/src/main/groovy/org/owasp/dependencycheck/gradle/extension/NodeAuditExtension.groovy index 9fc8214..2566887 100644 --- a/src/main/groovy/org/owasp/dependencycheck/gradle/extension/NodeAuditExtension.groovy +++ b/src/main/groovy/org/owasp/dependencycheck/gradle/extension/NodeAuditExtension.groovy @@ -50,4 +50,8 @@ class NodeAuditExtension { * The path to `pnpm`. */ String pnpmPath + /** + * The URL to the NPM Audit API. + */ + String url } diff --git a/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/ConfiguredTask.groovy b/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/ConfiguredTask.groovy index 4ce30b4..e09ba40 100644 --- a/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/ConfiguredTask.groovy +++ b/src/main/groovy/org/owasp/dependencycheck/gradle/tasks/ConfiguredTask.groovy @@ -165,6 +165,7 @@ abstract class ConfiguredTask extends DefaultTask { settings.setBooleanIfNotNull(ANALYZER_NODE_AUDIT_ENABLED, select(config.analyzers.nodeAudit.enabled, config.analyzers.nodeAuditEnabled)) settings.setBooleanIfNotNull(ANALYZER_NODE_AUDIT_USE_CACHE, config.analyzers.nodeAudit.useCache) settings.setBooleanIfNotNull(ANALYZER_NODE_AUDIT_SKIPDEV, config.analyzers.nodeAudit.skipDevDependencies) + settings.setStringIfNotEmpty(ANALYZER_NODE_AUDIT_URL, config.analyzers.nodeAudit.url) settings.setBooleanIfNotNull(ANALYZER_YARN_AUDIT_ENABLED, config.analyzers.nodeAudit.yarnEnabled) settings.setStringIfNotNull(ANALYZER_YARN_PATH, config.analyzers.nodeAudit.yarnPath); settings.setBooleanIfNotNull(ANALYZER_PNPM_AUDIT_ENABLED, config.analyzers.nodeAudit.pnpmEnabled)