retire 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +2 -1
- package/bin/retire +3 -2
- package/lib/resolve.js +2 -1
- package/lib/retire.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Options:
|
|
|
30
30
|
--jsrepo <path|url> Local or internal version of repo
|
|
31
31
|
--noderepo <path|url> Local or internal version of repo
|
|
32
32
|
--cachedir <path> Path to use for local cache instead of /tmp/.retire-cache
|
|
33
|
-
--proxy <url> Proxy url (http://some.
|
|
33
|
+
--proxy <url> Proxy url (http://some.host:8080)
|
|
34
34
|
--outputformat <format> Valid formats: text, json, jsonsimple, depcheck (experimental), cyclonedx and cyclonedxJSON
|
|
35
35
|
--outputpath <path> File to which output should be written
|
|
36
36
|
--ignore <paths> Comma delimited list of paths to ignore
|
|
@@ -39,6 +39,7 @@ Options:
|
|
|
39
39
|
--exitwith <code> Custom exit code (default: 13) when vulnerabilities are found
|
|
40
40
|
--colors Enable color output (console output only)
|
|
41
41
|
--insecure Enable fetching remote jsrepo/noderepo files from hosts using an insecure or self-signed SSL (TLS) certificate
|
|
42
|
+
--ext <extensions> Comman separated list of file extensions for javascript files. The default is "js"
|
|
42
43
|
--cacert <path> Use the specified certificate file to verify the peer used for fetching remote jsrepo/noderepo files
|
|
43
44
|
````
|
|
44
45
|
|
package/bin/retire
CHANGED
|
@@ -51,7 +51,7 @@ program
|
|
|
51
51
|
.option('--jsrepo <path|url>', 'Local or internal version of repo')
|
|
52
52
|
.option('--noderepo <path|url>', 'Local or internal version of repo')
|
|
53
53
|
.option('--cachedir <path>', 'Path to use for local cache instead of /tmp/.retire-cache')
|
|
54
|
-
.option('--proxy <url>', 'Proxy url (http://some.
|
|
54
|
+
.option('--proxy <url>', 'Proxy url (http://some.host:8080)')
|
|
55
55
|
.option('--outputformat <format>', 'Valid formats: text, json, jsonsimple, depcheck (experimental), cyclonedx and cyclonedxJSON')
|
|
56
56
|
.option('--outputpath <path>', 'File to which output should be written')
|
|
57
57
|
.option('--ignore <paths>', 'Comma delimited list of paths to ignore')
|
|
@@ -60,13 +60,14 @@ program
|
|
|
60
60
|
.option('--exitwith <code>', 'Custom exit code (default: 13) when vulnerabilities are found')
|
|
61
61
|
.option('--colors', 'Enable color output (console output only)')
|
|
62
62
|
.option('--insecure', 'Enable fetching remote jsrepo/noderepo files from hosts using an insecure or self-signed SSL (TLS) certificate')
|
|
63
|
+
.option('--ext <extensions>', 'Comman separated list of file extensions for javascript files. The default is "js"')
|
|
63
64
|
.option('--cacert <path>', 'Use the specified certificate file to verify the peer used for fetching remote jsrepo/noderepo files')
|
|
64
65
|
.parse(process.argv);
|
|
65
66
|
|
|
66
67
|
var config = utils.extend({ path: '.' }, utils.pick(program, [
|
|
67
68
|
'package', 'node', 'js', 'jspath', 'verbose', 'nodepath', 'path', 'jsrepo', 'noderepo',
|
|
68
69
|
'dropexternal', 'nocache', 'proxy', 'ignore', 'ignorefile', 'outputformat', 'outputpath',
|
|
69
|
-
'severity', 'exitwith', 'colors', 'includemeta', 'cachedir', 'insecure', 'cacert'
|
|
70
|
+
'severity', 'exitwith', 'colors', 'includemeta', 'cachedir', 'insecure', 'cacert', 'ext'
|
|
70
71
|
]));
|
|
71
72
|
|
|
72
73
|
if (!config.nocache && !config.cachedir) {
|
package/lib/resolve.js
CHANGED
|
@@ -69,8 +69,9 @@ function getNodeDependencies(path, limit) {
|
|
|
69
69
|
|
|
70
70
|
function scanJsFiles(path, options) {
|
|
71
71
|
var finder = walkdir.find(path, { "follow_symlinks" : false, "no_return": true });
|
|
72
|
+
var ext = (options.ext || "js").split(",").map(e => "." + e);
|
|
72
73
|
function onFile(file){
|
|
73
|
-
if (file.
|
|
74
|
+
if (ext.some(e => file.endsWith(e))) {
|
|
74
75
|
finder.emit('jsfile', file);
|
|
75
76
|
}
|
|
76
77
|
if (file.match(/\/bower.json$/)) {
|
package/lib/retire.js
CHANGED
package/package.json
CHANGED