@nodesecure/rc 1.3.0 → 1.5.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.
Files changed (39) hide show
  1. package/README.md +75 -20
  2. package/dist/constants.d.ts +2 -2
  3. package/dist/constants.js +2 -2
  4. package/dist/functions/memoize.d.ts +14 -0
  5. package/dist/functions/memoize.js +20 -0
  6. package/dist/functions/memoize.js.map +1 -0
  7. package/dist/functions/read.d.ts +27 -21
  8. package/dist/functions/read.js +33 -31
  9. package/dist/functions/read.js.map +1 -1
  10. package/dist/functions/write.d.ts +19 -19
  11. package/dist/functions/write.js +25 -27
  12. package/dist/functions/write.js.map +1 -1
  13. package/dist/index.d.ts +5 -4
  14. package/dist/index.js +5 -4
  15. package/dist/index.js.map +1 -1
  16. package/dist/projects/ci.d.ts +25 -25
  17. package/dist/projects/ci.js +10 -10
  18. package/dist/projects/report.d.ts +69 -69
  19. package/dist/projects/report.js +32 -32
  20. package/dist/projects/scanner.d.ts +18 -0
  21. package/dist/projects/scanner.js +7 -0
  22. package/dist/projects/scanner.js.map +1 -0
  23. package/dist/rc.d.ts +43 -40
  24. package/dist/rc.js +33 -32
  25. package/dist/rc.js.map +1 -1
  26. package/dist/schema/defs/author.json +13 -0
  27. package/dist/schema/defs/ci.json +58 -58
  28. package/dist/schema/defs/ciWarnings.json +8 -8
  29. package/dist/schema/defs/report.json +98 -98
  30. package/dist/schema/defs/reportChart.json +27 -27
  31. package/dist/schema/defs/scanner.json +12 -0
  32. package/dist/schema/loader.d.ts +1 -1
  33. package/dist/schema/loader.js +19 -19
  34. package/dist/schema/nodesecurerc.json +42 -39
  35. package/dist/utils/index.d.ts +1 -1
  36. package/dist/utils/index.js +1 -1
  37. package/dist/utils/readJSON.d.ts +1 -1
  38. package/dist/utils/readJSON.js +6 -6
  39. package/package.json +16 -17
@@ -1,69 +1,69 @@
1
- /**
2
- * Configuration dedicated for NodeSecure Report
3
- * @see https://github.com/NodeSecure/report
4
- */
5
- export interface ReportConfiguration {
6
- /**
7
- * @default `light`
8
- */
9
- theme?: "light" | "dark";
10
- title: string;
11
- /**
12
- * URL to a logo to show on the final HTML/PDF Report
13
- */
14
- logoUrl: string;
15
- /**
16
- * Show/categorize internal dependencies as transitive
17
- * @default false
18
- */
19
- includeTransitiveInternal?: boolean;
20
- npm?: {
21
- /**
22
- * NPM organization prefix starting with @
23
- * @example `@nodesecure`
24
- */
25
- organizationPrefix: string;
26
- packages: string[];
27
- };
28
- git?: {
29
- /**
30
- * GitHub organization URL
31
- * @example `https://github.com/NodeSecure`
32
- */
33
- organizationUrl: string;
34
- /**
35
- * List of repositories (name are enough, no need to provide .git url or any equivalent)
36
- */
37
- repositories: string[];
38
- };
39
- /**
40
- * @default html,pdf
41
- */
42
- reporters?: ("html" | "pdf")[];
43
- charts?: ReportChart[];
44
- }
45
- export interface ReportChart {
46
- /**
47
- * List of available charts.
48
- */
49
- name: "Extensions" | "Licenses" | "Warnings" | "Flags";
50
- /**
51
- * @default true
52
- */
53
- display?: boolean;
54
- /**
55
- * Chart.js chart type.
56
- *
57
- * @see https://www.chartjs.org/docs/latest/charts
58
- * @default `bar`
59
- */
60
- type?: "bar" | "horizontalBar" | "polarArea" | "doughnut";
61
- /**
62
- * D3 Interpolation color. Will be picked randomly by default if not provided.
63
- * @see https://github.com/d3/d3-scale-chromatic/blob/main/README.md
64
- */
65
- interpolation?: string;
66
- }
67
- export declare function generateReportConfiguration(): {
68
- report: Partial<ReportConfiguration>;
69
- };
1
+ /**
2
+ * Configuration dedicated for NodeSecure Report
3
+ * @see https://github.com/NodeSecure/report
4
+ */
5
+ export interface ReportConfiguration {
6
+ /**
7
+ * @default `light`
8
+ */
9
+ theme?: "light" | "dark";
10
+ title: string;
11
+ /**
12
+ * URL to a logo to show on the final HTML/PDF Report
13
+ */
14
+ logoUrl: string;
15
+ /**
16
+ * Show/categorize internal dependencies as transitive
17
+ * @default false
18
+ */
19
+ includeTransitiveInternal?: boolean;
20
+ npm?: {
21
+ /**
22
+ * NPM organization prefix starting with @
23
+ * @example `@nodesecure`
24
+ */
25
+ organizationPrefix: string;
26
+ packages: string[];
27
+ };
28
+ git?: {
29
+ /**
30
+ * GitHub organization URL
31
+ * @example `https://github.com/NodeSecure`
32
+ */
33
+ organizationUrl: string;
34
+ /**
35
+ * List of repositories (name are enough, no need to provide .git url or any equivalent)
36
+ */
37
+ repositories: string[];
38
+ };
39
+ /**
40
+ * @default html,pdf
41
+ */
42
+ reporters?: ("html" | "pdf")[];
43
+ charts?: ReportChart[];
44
+ }
45
+ export interface ReportChart {
46
+ /**
47
+ * List of available charts.
48
+ */
49
+ name: "Extensions" | "Licenses" | "Warnings" | "Flags";
50
+ /**
51
+ * @default true
52
+ */
53
+ display?: boolean;
54
+ /**
55
+ * Chart.js chart type.
56
+ *
57
+ * @see https://www.chartjs.org/docs/latest/charts
58
+ * @default `bar`
59
+ */
60
+ type?: "bar" | "horizontalBar" | "polarArea" | "doughnut";
61
+ /**
62
+ * D3 Interpolation color. Will be picked randomly by default if not provided.
63
+ * @see https://github.com/d3/d3-scale-chromatic/blob/main/README.md
64
+ */
65
+ interpolation?: string;
66
+ }
67
+ export declare function generateReportConfiguration(): {
68
+ report: Partial<ReportConfiguration>;
69
+ };
@@ -1,33 +1,33 @@
1
- export function generateReportConfiguration() {
2
- const report = {
3
- theme: "light",
4
- includeTransitiveInternal: false,
5
- reporters: ["html", "pdf"],
6
- charts: [
7
- {
8
- name: "Extensions",
9
- display: true,
10
- interpolation: "d3.interpolateRainbow"
11
- },
12
- {
13
- name: "Licenses",
14
- display: true,
15
- interpolation: "d3.interpolateCool"
16
- },
17
- {
18
- name: "Warnings",
19
- display: true,
20
- type: "horizontalBar",
21
- interpolation: "d3.interpolateInferno"
22
- },
23
- {
24
- name: "Flags",
25
- display: true,
26
- type: "horizontalBar",
27
- interpolation: "d3.interpolateSinebow"
28
- }
29
- ]
30
- };
31
- return { report };
32
- }
1
+ export function generateReportConfiguration() {
2
+ const report = {
3
+ theme: "light",
4
+ includeTransitiveInternal: false,
5
+ reporters: ["html", "pdf"],
6
+ charts: [
7
+ {
8
+ name: "Extensions",
9
+ display: true,
10
+ interpolation: "d3.interpolateRainbow"
11
+ },
12
+ {
13
+ name: "Licenses",
14
+ display: true,
15
+ interpolation: "d3.interpolateCool"
16
+ },
17
+ {
18
+ name: "Warnings",
19
+ display: true,
20
+ type: "horizontalBar",
21
+ interpolation: "d3.interpolateInferno"
22
+ },
23
+ {
24
+ name: "Flags",
25
+ display: true,
26
+ type: "horizontalBar",
27
+ interpolation: "d3.interpolateSinebow"
28
+ }
29
+ ]
30
+ };
31
+ return { report };
32
+ }
33
33
  //# sourceMappingURL=report.js.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Configuration dedicated for NodeSecure scanner
3
+ * @see https://github.com/NodeSecure/scanner
4
+ */
5
+ export interface ScannerConfiguration {
6
+ /**
7
+ * List of NPM users/authors flagged
8
+ * @see https://github.com/NodeSecure/authors
9
+ */
10
+ flaggedAuthors: Author[];
11
+ }
12
+ export type Author = {
13
+ name: string;
14
+ email: string;
15
+ };
16
+ export declare function generateScannerConfiguration(): {
17
+ scanner: ScannerConfiguration;
18
+ };
@@ -0,0 +1,7 @@
1
+ export function generateScannerConfiguration() {
2
+ const scanner = {
3
+ flaggedAuthors: []
4
+ };
5
+ return { scanner };
6
+ }
7
+ //# sourceMappingURL=scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/projects/scanner.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,4BAA4B;IAC1C,MAAM,OAAO,GAAyB;QACpC,cAAc,EAAE,EAAE;KACnB,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
package/dist/rc.d.ts CHANGED
@@ -1,40 +1,43 @@
1
- import i18n from "@nodesecure/i18n";
2
- import * as vuln from "@nodesecure/vuln";
3
- import { generateCIConfiguration, CiConfiguration, CiWarnings } from "./projects/ci.js";
4
- import { generateReportConfiguration, ReportConfiguration, ReportChart } from "./projects/report.js";
5
- export declare const JSONSchema: any;
6
- export interface RC {
7
- /** version of the rc package used to generate the nodesecurerc file */
8
- version: string;
9
- /**
10
- * Language to use for i18n (translation in NodeSecure tools).
11
- * @see https://developer.mozilla.org/en-US/docs/Glossary/I18N
12
- * @see https://github.com/NodeSecure/i18n
13
- *
14
- * @default `english`
15
- */
16
- i18n?: i18n.languages;
17
- /**
18
- * Vulnerability strategy to use. Can be disabled by using `none` as value.
19
- * @see https://github.com/NodeSecure/vuln#available-strategy
20
- *
21
- * @default `npm`
22
- */
23
- strategy?: vuln.Strategy.Kind;
24
- /** NodeSecure ci Object configuration */
25
- ci?: CiConfiguration;
26
- /** NodeSecure report Object configuration */
27
- report?: ReportConfiguration;
28
- }
29
- export type RCGenerationMode = "minimal" | "ci" | "report" | "complete";
30
- /**
31
- * @example
32
- * generateDefaultRC("complete");
33
- * generateDefaultRC(["ci", "report"]); // minimal + ci + report
34
- */
35
- export declare function generateDefaultRC(mode?: RCGenerationMode | RCGenerationMode[]): RC;
36
- /**
37
- * Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
38
- */
39
- export declare function homedir(): string;
40
- export { generateCIConfiguration, CiConfiguration, CiWarnings, generateReportConfiguration, ReportConfiguration, ReportChart };
1
+ import i18n from "@nodesecure/i18n";
2
+ import * as vuln from "@nodesecure/vuln";
3
+ import { generateCIConfiguration, CiConfiguration, CiWarnings } from "./projects/ci.js";
4
+ import { generateReportConfiguration, ReportConfiguration, ReportChart } from "./projects/report.js";
5
+ import { generateScannerConfiguration, ScannerConfiguration, Author } from "./projects/scanner.js";
6
+ export declare const JSONSchema: any;
7
+ export interface RC {
8
+ /** version of the rc package used to generate the nodesecurerc file */
9
+ version: string;
10
+ /**
11
+ * Language to use for i18n (translation in NodeSecure tools).
12
+ * @see https://developer.mozilla.org/en-US/docs/Glossary/I18N
13
+ * @see https://github.com/NodeSecure/i18n
14
+ *
15
+ * @default `english`
16
+ */
17
+ i18n?: i18n.languages;
18
+ /**
19
+ * Vulnerability strategy to use. Can be disabled by using `none` as value.
20
+ * @see https://github.com/NodeSecure/vuln#available-strategy
21
+ *
22
+ * @default `npm`
23
+ */
24
+ strategy?: vuln.Strategy.Kind;
25
+ /** NodeSecure scanner Object configuration */
26
+ scanner?: ScannerConfiguration;
27
+ /** NodeSecure ci Object configuration */
28
+ ci?: CiConfiguration;
29
+ /** NodeSecure report Object configuration */
30
+ report?: ReportConfiguration;
31
+ }
32
+ export type RCGenerationMode = "minimal" | "ci" | "report" | "scanner" | "complete";
33
+ /**
34
+ * @example
35
+ * generateDefaultRC("complete");
36
+ * generateDefaultRC(["ci", "report"]); // minimal + ci + report
37
+ */
38
+ export declare function generateDefaultRC(mode?: RCGenerationMode | RCGenerationMode[]): RC;
39
+ /**
40
+ * Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
41
+ */
42
+ export declare function homedir(): string;
43
+ export { generateCIConfiguration, CiConfiguration, CiWarnings, generateReportConfiguration, ReportConfiguration, ReportChart, generateScannerConfiguration, ScannerConfiguration, Author };
package/dist/rc.js CHANGED
@@ -1,33 +1,34 @@
1
- // Import Node.js Dependencies
2
- import os from "node:os";
3
- import path from "node:path";
4
- // Import Internal Dependencies
5
- import { GLOBAL_CONFIGURATION_DIRECTORY } from "./constants.js";
6
- import { loadJSONSchemaSync } from "./schema/loader.js";
7
- import { generateCIConfiguration } from "./projects/ci.js";
8
- import { generateReportConfiguration } from "./projects/report.js";
9
- // CONSTANTS
10
- export const JSONSchema = loadJSONSchemaSync();
11
- /**
12
- * @example
13
- * generateDefaultRC("complete");
14
- * generateDefaultRC(["ci", "report"]); // minimal + ci + report
15
- */
16
- export function generateDefaultRC(mode = "minimal") {
17
- const modes = new Set(typeof mode === "string" ? [mode] : mode);
18
- const minimalRC = {
19
- version: "1.0.0",
20
- i18n: "english",
21
- strategy: "npm"
22
- };
23
- const complete = modes.has("complete");
24
- return Object.assign(minimalRC, complete || modes.has("ci") ? generateCIConfiguration() : {}, complete || modes.has("report") ? generateReportConfiguration() : {});
25
- }
26
- /**
27
- * Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
28
- */
29
- export function homedir() {
30
- return path.join(os.homedir(), GLOBAL_CONFIGURATION_DIRECTORY);
31
- }
32
- export { generateCIConfiguration, generateReportConfiguration };
1
+ // Import Node.js Dependencies
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ // Import Internal Dependencies
5
+ import { GLOBAL_CONFIGURATION_DIRECTORY } from "./constants.js";
6
+ import { loadJSONSchemaSync } from "./schema/loader.js";
7
+ import { generateCIConfiguration } from "./projects/ci.js";
8
+ import { generateReportConfiguration } from "./projects/report.js";
9
+ import { generateScannerConfiguration } from "./projects/scanner.js";
10
+ // CONSTANTS
11
+ export const JSONSchema = loadJSONSchemaSync();
12
+ /**
13
+ * @example
14
+ * generateDefaultRC("complete");
15
+ * generateDefaultRC(["ci", "report"]); // minimal + ci + report
16
+ */
17
+ export function generateDefaultRC(mode = "minimal") {
18
+ const modes = new Set(typeof mode === "string" ? [mode] : mode);
19
+ const minimalRC = {
20
+ version: "1.0.0",
21
+ i18n: "english",
22
+ strategy: "npm"
23
+ };
24
+ const complete = modes.has("complete");
25
+ return Object.assign(minimalRC, complete || modes.has("ci") ? generateCIConfiguration() : {}, complete || modes.has("report") ? generateReportConfiguration() : {}, complete || modes.has("scanner") ? generateScannerConfiguration() : {});
26
+ }
27
+ /**
28
+ * Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
29
+ */
30
+ export function homedir() {
31
+ return path.join(os.homedir(), GLOBAL_CONFIGURATION_DIRECTORY);
32
+ }
33
+ export { generateCIConfiguration, generateReportConfiguration, generateScannerConfiguration };
33
34
  //# sourceMappingURL=rc.js.map
package/dist/rc.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rc.js","sourceRoot":"","sources":["../src/rc.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE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,CAAC,CAAC,EAAE,CACvE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO;IACrB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,8BAA8B,CAAC,CAAC;AACjE,CAAC;AAED,OAAO,EACL,uBAAuB,EAIvB,2BAA2B,EAI3B,4BAA4B,EAG7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "name": {
5
+ "type": "string"
6
+ },
7
+ "email": {
8
+ "type": "string"
9
+ }
10
+ },
11
+ "required": ["name", "email"],
12
+ "additionalProperties": false
13
+ }
@@ -1,58 +1,58 @@
1
- {
2
- "type": "object",
3
- "properties": {
4
- "reporters": {
5
- "type": "array",
6
- "uniqueItems": true,
7
- "items": {
8
- "type": "string",
9
- "enum": [
10
- "html",
11
- "console"
12
- ]
13
- },
14
- "default": [
15
- "console"
16
- ]
17
- },
18
- "vulnerabilities": {
19
- "type": "object",
20
- "properties": {
21
- "severity": {
22
- "type": "string",
23
- "enum": [
24
- "medium",
25
- "high",
26
- "critical",
27
- "all"
28
- ],
29
- "default": "all"
30
- }
31
- },
32
- "additionalProperties": false
33
- },
34
- "warnings": {
35
- "default": "off",
36
- "description": "JS-X-Ray warnings configuration",
37
- "oneOf": [
38
- {
39
- "$ref": "#/$defs/ciWarnings"
40
- },
41
- {
42
- "type": "object",
43
- "minProperties": 1,
44
- "patternProperties": {
45
- "^[A-Za-z-]+$": {
46
- "$ref": "#/$defs/ciWarnings"
47
- }
48
- }
49
- }
50
- ]
51
- }
52
- },
53
- "required": [
54
- "reporters",
55
- "warnings"
56
- ],
57
- "additionalProperties": false
58
- }
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "reporters": {
5
+ "type": "array",
6
+ "uniqueItems": true,
7
+ "items": {
8
+ "type": "string",
9
+ "enum": [
10
+ "html",
11
+ "console"
12
+ ]
13
+ },
14
+ "default": [
15
+ "console"
16
+ ]
17
+ },
18
+ "vulnerabilities": {
19
+ "type": "object",
20
+ "properties": {
21
+ "severity": {
22
+ "type": "string",
23
+ "enum": [
24
+ "medium",
25
+ "high",
26
+ "critical",
27
+ "all"
28
+ ],
29
+ "default": "all"
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ },
34
+ "warnings": {
35
+ "default": "off",
36
+ "description": "JS-X-Ray warnings configuration",
37
+ "oneOf": [
38
+ {
39
+ "$ref": "#/$defs/ciWarnings"
40
+ },
41
+ {
42
+ "type": "object",
43
+ "minProperties": 1,
44
+ "patternProperties": {
45
+ "^[A-Za-z-]+$": {
46
+ "$ref": "#/$defs/ciWarnings"
47
+ }
48
+ }
49
+ }
50
+ ]
51
+ }
52
+ },
53
+ "required": [
54
+ "reporters",
55
+ "warnings"
56
+ ],
57
+ "additionalProperties": false
58
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "type": "string",
3
- "enum": [
4
- "off",
5
- "error",
6
- "warning"
7
- ]
8
- }
1
+ {
2
+ "type": "string",
3
+ "enum": [
4
+ "off",
5
+ "error",
6
+ "warning"
7
+ ]
8
+ }