retire 4.3.1 → 4.3.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.3.2]
4
+
5
+ ### Bugfix
6
+
7
+ - Fixes #420 where ignore was not honoured
8
+
9
+ ## [4.3.2]
10
+
11
+ ### Bugfix
12
+
13
+ - Types did not work for `lib/retire.js` due to symlinked type file
14
+
3
15
  ## [4.3.1]
4
16
 
5
17
  ### Bugfix
package/README.md CHANGED
@@ -30,7 +30,7 @@ Options:
30
30
  --exitwith <code> Custom exit code (default: 13) when vulnerabilities are found
31
31
  --colors Enable color output (console output only)
32
32
  --insecure Enable fetching remote jsrepo/noderepo files from hosts using an insecure or self-signed SSL (TLS) certificate
33
- --ext <extensions> Comman separated list of file extensions for javascript files. The default is "js"
33
+ --ext <extensions> Comma separated list of file extensions for JavaScript files. The default is "js"
34
34
  --cacert <path> Use the specified certificate file to verify the peer used for fetching remote jsrepo/noderepo files
35
35
  --includeOsv Include OSV advisories in the output
36
36
  -h, --help display help for command
package/lib/cli.js CHANGED
@@ -69,7 +69,7 @@ const prg = commander_1.program
69
69
  .option('--exitwith <code>', 'Custom exit code (default: 13) when vulnerabilities are found')
70
70
  .option('--colors', 'Enable color output (console output only)')
71
71
  .option('--insecure', 'Enable fetching remote jsrepo/noderepo files from hosts using an insecure or self-signed SSL (TLS) certificate')
72
- .option('--ext <extensions>', 'Comman separated list of file extensions for javascript files. The default is "js"')
72
+ .option('--ext <extensions>', 'Comma separated list of file extensions for JavaScript files. The default is "js"')
73
73
  .option('--cacert <path>', 'Use the specified certificate file to verify the peer used for fetching remote jsrepo/noderepo files')
74
74
  .option('--includeOsv', 'Include OSV advisories in the output')
75
75
  .parse()
@@ -96,8 +96,8 @@ if (!(severity in types_1.severityLevels)) {
96
96
  const config = {
97
97
  path: scanpath,
98
98
  ignore: {
99
- paths: (_g = (_f = (_e = prg.ignore) === null || _e === void 0 ? void 0 : _e.split(',')) === null || _f === void 0 ? void 0 : _f.map((x) => path_1.default.resolve(x))) !== null && _g !== void 0 ? _g : [],
100
- pathsAsString: [],
99
+ paths: [],
100
+ pathsAsString: (_g = (_f = (_e = prg.ignore) === null || _e === void 0 ? void 0 : _e.split(',')) === null || _f === void 0 ? void 0 : _f.map((x) => path_1.default.resolve(x))) !== null && _g !== void 0 ? _g : [],
101
101
  descriptors: [],
102
102
  },
103
103
  colorwarn,
@@ -0,0 +1,15 @@
1
+ import { Repository, Component, Hasher } from './types';
2
+
3
+ export declare function check(component: string, version: string, repo: Repository): Component[];
4
+
5
+ export declare function replaceVersion(jsRepoJsonAsText: string): string;
6
+
7
+ export declare function isVulnerable(results: Component[]): boolean;
8
+
9
+ export declare function scanUri(uri: string, repo: Repository): Component[];
10
+
11
+ export declare function scanFileName(fileName: string, repo: Repository): Component[];
12
+
13
+ export declare function scanFileContent(content: string, repo: Repository, hasher: Hasher): Component[];
14
+
15
+ export declare const version: string;
package/lib/retire.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  var exports = exports || {};
7
- exports.version = '4.3.1';
7
+ exports.version = '4.3.3';
8
8
 
9
9
  function isDefined(o) {
10
10
  return typeof o !== 'undefined';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Erlend Oftedal <erlend@oftedal.no>",
3
3
  "name": "retire",
4
4
  "description": "Retire is a tool for detecting use of vulnerable libraries",
5
- "version": "4.3.1",
5
+ "version": "4.3.3",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "scripts": {
38
38
  "test": "./test",
39
- "build": "tsc && chmod ugo+x lib/cli.js",
39
+ "build": "tsc && chmod ugo+x lib/cli.js && cp src/retire.d.ts lib/retire.d.ts",
40
40
  "watch": "tsc --watch ",
41
41
  "typecheck": "tsc --noEmit",
42
42
  "lint": "eslint . --ext .ts --fix --ignore-path ../.gitignore",