@nodesecure/rc 1.4.0 → 2.0.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/LICENSE +1 -1
- package/README.md +15 -4
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/functions/memoize.d.ts +16 -14
- package/dist/functions/memoize.js +25 -19
- package/dist/functions/memoize.js.map +1 -1
- package/dist/functions/read.d.ts +27 -27
- package/dist/functions/read.js +33 -35
- package/dist/functions/read.js.map +1 -1
- package/dist/functions/write.d.ts +19 -19
- package/dist/functions/write.js +25 -27
- package/dist/functions/write.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/projects/ci.d.ts +25 -25
- package/dist/projects/ci.js +10 -10
- package/dist/projects/report.d.ts +69 -69
- package/dist/projects/report.js +32 -32
- package/dist/projects/scanner.d.ts +18 -0
- package/dist/projects/scanner.js +7 -0
- package/dist/projects/scanner.js.map +1 -0
- package/dist/rc.d.ts +48 -40
- package/dist/rc.js +34 -32
- package/dist/rc.js.map +1 -1
- package/dist/schema/defs/author.json +13 -0
- package/dist/schema/defs/ci.json +58 -58
- package/dist/schema/defs/ciWarnings.json +8 -8
- package/dist/schema/defs/report.json +97 -98
- package/dist/schema/defs/reportChart.json +27 -27
- package/dist/schema/defs/scanner.json +12 -0
- package/dist/schema/loader.d.ts +1 -1
- package/dist/schema/loader.js +19 -19
- package/dist/schema/nodesecurerc.json +48 -39
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/readJSON.d.ts +1 -1
- package/dist/utils/readJSON.js +6 -6
- package/package.json +17 -21
|
@@ -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
|
|
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
|
+
};
|
package/dist/projects/report.js
CHANGED
|
@@ -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 @@
|
|
|
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,48 @@
|
|
|
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
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
version
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
* @see https://
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import i18n from "@nodesecure/i18n";
|
|
2
|
+
import * as vuln from "@nodesecure/vuln";
|
|
3
|
+
import { generateCIConfiguration, type CiConfiguration, type CiWarnings } from "./projects/ci.js";
|
|
4
|
+
import { generateReportConfiguration, type ReportConfiguration, type ReportChart } from "./projects/report.js";
|
|
5
|
+
import { generateScannerConfiguration, type ScannerConfiguration, type 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
|
+
/**
|
|
26
|
+
* Package Registry (default to NPM public registry)
|
|
27
|
+
* @default `https://registry.npmjs.org`
|
|
28
|
+
*/
|
|
29
|
+
registry?: string;
|
|
30
|
+
/** NodeSecure scanner Object configuration */
|
|
31
|
+
scanner?: ScannerConfiguration;
|
|
32
|
+
/** NodeSecure ci Object configuration */
|
|
33
|
+
ci?: CiConfiguration;
|
|
34
|
+
/** NodeSecure report Object configuration */
|
|
35
|
+
report?: ReportConfiguration;
|
|
36
|
+
}
|
|
37
|
+
export type RCGenerationMode = "minimal" | "ci" | "report" | "scanner" | "complete";
|
|
38
|
+
/**
|
|
39
|
+
* @example
|
|
40
|
+
* generateDefaultRC("complete");
|
|
41
|
+
* generateDefaultRC(["ci", "report"]); // minimal + ci + report
|
|
42
|
+
*/
|
|
43
|
+
export declare function generateDefaultRC(mode?: RCGenerationMode | RCGenerationMode[]): RC;
|
|
44
|
+
/**
|
|
45
|
+
* Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
|
|
46
|
+
*/
|
|
47
|
+
export declare function homedir(): string;
|
|
48
|
+
export { generateCIConfiguration, CiConfiguration, CiWarnings, generateReportConfiguration, ReportConfiguration, ReportChart, generateScannerConfiguration, ScannerConfiguration, Author };
|
package/dist/rc.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
* generateDefaultRC(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
registry: "https://registry.npmjs.org"
|
|
24
|
+
};
|
|
25
|
+
const complete = modes.has("complete");
|
|
26
|
+
return Object.assign(minimalRC, complete || modes.has("ci") ? generateCIConfiguration() : {}, complete || modes.has("report") ? generateReportConfiguration() : {}, complete || modes.has("scanner") ? generateScannerConfiguration() : {});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Dedicated directory for NodeSecure to store the configuration in the os HOME directory.
|
|
30
|
+
*/
|
|
31
|
+
export function homedir() {
|
|
32
|
+
return path.join(os.homedir(), GLOBAL_CONFIGURATION_DIRECTORY);
|
|
33
|
+
}
|
|
34
|
+
export { generateCIConfiguration, generateReportConfiguration, generateScannerConfiguration };
|
|
33
35
|
//# 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,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAM7B,+BAA+B;AAC/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"rc.js","sourceRoot":"","sources":["../src/rc.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAM7B,+BAA+B;AAC/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,uBAAuB,EAAyC,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,2BAA2B,EAA8C,MAAM,sBAAsB,CAAC;AAC/G,OAAO,EAAE,4BAA4B,EAA0C,MAAM,uBAAuB,CAAC;AAE7G,YAAY;AACZ,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,EAAE,CAAC;AAmC/C;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA8C,SAAS;IACvF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEhE,MAAM,SAAS,GAAG;QAChB,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,SAAkB;QACxB,QAAQ,EAAE,KAAc;QACxB,QAAQ,EAAE,4BAA4B;KACvC,CAAC;IACF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAEvC,OAAO,MAAM,CAAC,MAAM,CAClB,SAAS,EACT,QAAQ,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,EAAE,EAC5D,QAAQ,IAAI,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,2BAA2B,EAAE,CAAC,CAAC,CAAC,EAAE,EACpE,QAAQ,IAAI,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,4BAA4B,EAAE,CAAC,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"}
|
package/dist/schema/defs/ci.json
CHANGED
|
@@ -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
|
+
}
|