owasp-dependency-check
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -10,3 +10,4 @@ #!/usr/bin/env node | ||
.option('--bin <path>', 'directory to which the dependency-check CLI will be installed', './dependency-check-bin') | ||
.option('--force-install', 'install the dependency-check CLI even if there already is one (will be overwritten)'); | ||
.option('--force-install', 'install the dependency-check CLI even if there already is one (will be overwritten)') | ||
.option('--odc-version <version>', 'the version of the dependency-check CLI to install in format "v1.2.3" or "latest"', 'latest'); | ||
@@ -13,0 +14,0 @@ program.addHelpText('after', ` |
@@ -13,7 +13,8 @@ const os = require('os'); | ||
const IS_WIN = os.platform() === 'win32'; | ||
const NAME_RE = /^dependency\-check\-\d\.\d\.\d\-release\.zip$/; | ||
const RELEASE_URL = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases/latest'; | ||
const NAME_RE = /^dependency\-check\-\d+\.\d+\.\d+\-release\.zip$/; | ||
const LATEST_RELEASE_URL = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases/latest'; | ||
const TAG_RELEASE_URL = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases/tags/'; | ||
function getBinDir() { | ||
return path.resolve(process.cwd(), program.opts().bin); | ||
return path.resolve(process.cwd(), program.opts().bin, program.opts().odcVersion); | ||
} | ||
@@ -73,3 +74,5 @@ | ||
const res = await fetch(RELEASE_URL); | ||
// if odc version is latest use latest URL, otherwise use version URL | ||
const url = program.opts().odcVersion === 'latest' ? LATEST_RELEASE_URL : TAG_RELEASE_URL + program.opts().odcVersion; | ||
const res = await fetch(url); | ||
const json = await res.json(); | ||
@@ -76,0 +79,0 @@ |
{ | ||
"name": "owasp-dependency-check", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "A Node.js wrapper for the CLI version of OWASP dependency-check tool.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -22,2 +22,6 @@ # owasp-dependency-check | ||
## Options | ||
### Owasp Dependency Core options | ||
You can specify any options which the [OWASP depencency-check CLI tool](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/index.html) provides. For example, to generate a HTML and JSON report, use: | ||
@@ -28,4 +32,8 @@ | ||
... | ||
"owasp": "owasp-dependency-check --project \"YOUR PROJECT NAME\" -f HTML JSON" | ||
"owasp": "owasp-dependency-check --project \"YOUR PROJECT NAME\" -f HTML -f JSON" | ||
} | ||
``` | ||
### Additional options | ||
Use `owasp-dependency-check --help` to check other options. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8973
184
38