@ploaness/governance 1.7.0 → 1.9.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/dist/compliance-report-assets.d.ts +20 -0
- package/dist/compliance-report-assets.d.ts.map +1 -0
- package/dist/compliance-report-assets.js +223 -0
- package/dist/compliance-report-assets.js.map +1 -0
- package/dist/compliance-report-html.d.ts +18 -0
- package/dist/compliance-report-html.d.ts.map +1 -0
- package/dist/compliance-report-html.js +350 -0
- package/dist/compliance-report-html.js.map +1 -0
- package/dist/compliance-report-markup.d.ts +63 -0
- package/dist/compliance-report-markup.d.ts.map +1 -0
- package/dist/compliance-report-markup.js +116 -0
- package/dist/compliance-report-markup.js.map +1 -0
- package/dist/compliance-report-outline.d.ts +33 -0
- package/dist/compliance-report-outline.d.ts.map +1 -0
- package/dist/compliance-report-outline.js +109 -0
- package/dist/compliance-report-outline.js.map +1 -0
- package/dist/compliance-report.d.ts +142 -0
- package/dist/compliance-report.d.ts.map +1 -0
- package/dist/compliance-report.js +240 -0
- package/dist/compliance-report.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/license-allowlist.d.ts +14 -0
- package/dist/license-allowlist.d.ts.map +1 -1
- package/dist/license-allowlist.js +28 -9
- package/dist/license-allowlist.js.map +1 -1
- package/dist/license-inventory.d.ts +25 -0
- package/dist/license-inventory.d.ts.map +1 -0
- package/dist/license-inventory.js +41 -0
- package/dist/license-inventory.js.map +1 -0
- package/dist/pdf-outline.d.ts +7 -0
- package/dist/pdf-outline.d.ts.map +1 -0
- package/dist/pdf-outline.js +69 -0
- package/dist/pdf-outline.js.map +1 -0
- package/dist/sbom-policy.d.ts +17 -0
- package/dist/sbom-policy.d.ts.map +1 -1
- package/dist/sbom-policy.js +76 -1
- package/dist/sbom-policy.js.map +1 -1
- package/dist/settings-layering.js +1 -1
- package/dist/settings-layering.js.map +1 -1
- package/dist/settings.d.ts +1 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +5 -5
- package/dist/settings.js.map +1 -1
- package/dist/vulnerability-policy.d.ts +42 -29
- package/dist/vulnerability-policy.d.ts.map +1 -1
- package/dist/vulnerability-policy.js +56 -58
- package/dist/vulnerability-policy.js.map +1 -1
- package/dist/wiring-policy.js +2 -2
- package/dist/wiring-policy.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-report-html.js","sourceRoot":"","sources":["../src/compliance-report-html.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,gGAAgG;AAGhG,OAAO,EAAqB,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACzG,OAAO,EACL,UAAU,EACV,YAAY,EACZ,OAAO,EACP,KAAK,EACL,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,WAAW,EACX,MAAM,EACN,YAAY,EACZ,MAAM,EACN,WAAW,EACX,UAAU,EACV,SAAS,EACT,MAAM,EACN,aAAa,EACb,UAAU,EACV,YAAY,EACZ,KAAK,EACL,YAAY,GACb,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAYvG,MAAM,YAAY,GAAW,EAAE,CAAA;AAC/B,MAAM,cAAc,GAAW,EAAE,CAAA;AAEjC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;AAE7E,MAAM,WAAW,GAAG,CAAC,MAAwB,EAAU,EAAE,CACvD,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC;IAC9B,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,UAAU,CACR,SAAS,EACT,0EAA0E,MAAM,CAAC,Y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,MAAM,CAAC;CACnB,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,MAAwB,EACxB,WAA8B,EAC9B,QAAgB,EACR,EAAE,CACV;IACE,iBAAiB;IACjB,kBAAkB;IAClB,kGAAkG;IAClG,wCAAwC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU;IAChF,UAAU,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,YAAY,iBAAiB;IACtE,sCAAsC;IACtC,MAAM,CAAC,MAAM,CAAC;IACd,oBAAoB;IACpB,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC;IACzB,QAAQ;IACR,+BAA+B,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa;QACxE,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS;IACxF,oDAAoD,YAAY,CAAC;QAC/D,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;KACnC,CAAC,WAAW;IACb,WAAW,aAAa,WAAW;IACnC,gBAAgB;IAChB,EAAE;CACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ReportPackage } from './compliance-report.js';
|
|
2
|
+
import type { LicenseClass } from './license-allowlist.js';
|
|
3
|
+
/**
|
|
4
|
+
* Escape text for an HTML text node or a quoted attribute.
|
|
5
|
+
* @param text untrusted text, such as a package name or a licence file.
|
|
6
|
+
* @returns the text with every markup character replaced by its entity.
|
|
7
|
+
*/
|
|
8
|
+
export declare const escapeHtml: (text: string) => string;
|
|
9
|
+
/** The label each licence class is printed with. */
|
|
10
|
+
export declare const CLASS_LABELS: Readonly<Record<LicenseClass, string>>;
|
|
11
|
+
/** Every licence class, from the least to the most restrictive. */
|
|
12
|
+
export declare const CLASSES: readonly LicenseClass[];
|
|
13
|
+
export declare const scopeLabel: (row: ReportPackage) => string;
|
|
14
|
+
export declare const relationLabel: (row: ReportPackage) => string;
|
|
15
|
+
export declare const versionLabel: (row: ReportPackage) => string;
|
|
16
|
+
export declare const percentOf: (count: number, total: number) => string;
|
|
17
|
+
export declare const formatCount: (count: number) => string;
|
|
18
|
+
export declare const plural: (count: number, singular: string, several?: string) => string;
|
|
19
|
+
export declare const classChip: (licenseClass: LicenseClass) => string;
|
|
20
|
+
export declare const severityChip: (severity: string) => string;
|
|
21
|
+
export declare const nowrap: (html: string) => string;
|
|
22
|
+
export declare const code: (text: string) => string;
|
|
23
|
+
export declare const cells: (values: readonly string[]) => string;
|
|
24
|
+
/**
|
|
25
|
+
* A ruled table, or a sentence saying it would be empty.
|
|
26
|
+
* @param headings the column headings.
|
|
27
|
+
* @param rows the rendered rows.
|
|
28
|
+
* @param empty what to say when there are no rows.
|
|
29
|
+
* @returns the table markup.
|
|
30
|
+
*/
|
|
31
|
+
export declare const table: (headings: readonly string[], rows: readonly string[], empty: string) => string;
|
|
32
|
+
/**
|
|
33
|
+
* A two-column table of labelled facts.
|
|
34
|
+
* @param rows each already rendered label with its already rendered value.
|
|
35
|
+
* @param variant an extra class for the table, such as `plan`.
|
|
36
|
+
* @returns the table markup.
|
|
37
|
+
*/
|
|
38
|
+
export declare const facts: (rows: readonly (readonly [string, string])[], variant?: string) => string;
|
|
39
|
+
export declare const packageLink: (row: ReportPackage) => string;
|
|
40
|
+
export declare const idList: (ids: readonly string[]) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Plain paragraphs of the report's own prose.
|
|
43
|
+
* @param items each paragraph, already rendered.
|
|
44
|
+
* @returns the paragraph markup.
|
|
45
|
+
*/
|
|
46
|
+
export declare const paragraphs: (items: readonly string[]) => string;
|
|
47
|
+
/** The icon an admonition carries. */
|
|
48
|
+
export type AdmonitionKind = 'warning' | 'ok' | 'fail';
|
|
49
|
+
/**
|
|
50
|
+
* A notice set apart from the text by an icon and a rule, where a reader looks first.
|
|
51
|
+
* @param kind the icon.
|
|
52
|
+
* @param html the notice, already rendered.
|
|
53
|
+
* @returns the admonition markup.
|
|
54
|
+
*/
|
|
55
|
+
export declare const admonition: (kind: AdmonitionKind, html: string) => string;
|
|
56
|
+
export declare const embeddedJson: (value: unknown) => string;
|
|
57
|
+
/**
|
|
58
|
+
* The package inventory as CSV, one row per installed package version.
|
|
59
|
+
* @param packages the report's packages.
|
|
60
|
+
* @returns the CSV text with a header row.
|
|
61
|
+
*/
|
|
62
|
+
export declare const inventoryCsv: (packages: readonly ReportPackage[]) => string;
|
|
63
|
+
//# sourceMappingURL=compliance-report-markup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-report-markup.d.ts","sourceRoot":"","sources":["../src/compliance-report-markup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAU1D;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,MACyD,CAAA;AAEnG,oDAAoD;AACpD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAI/D,CAAA;AAED,mEAAmE;AACnE,eAAO,MAAM,OAAO,EAAE,SAAS,YAAY,EAA+C,CAAA;AAE1F,eAAO,MAAM,UAAU,GAAI,KAAK,aAAa,KAAG,MAA2D,CAAA;AAC3G,eAAO,MAAM,aAAa,GAAI,KAAK,aAAa,KAAG,MAAkD,CAAA;AACrG,eAAO,MAAM,YAAY,GAAI,KAAK,aAAa,KAAG,MAAoE,CAAA;AAItH,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MACG,CAAA;AAE5D,eAAO,MAAM,WAAW,GAAI,OAAO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AAY,GAAI,UAAU,SAAS,aAAa,EAAE,KAAG,MAe/C,CAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
const HTML_ESCAPES = {
|
|
2
|
+
'&': '&',
|
|
3
|
+
'<': '<',
|
|
4
|
+
'>': '>',
|
|
5
|
+
'"': '"',
|
|
6
|
+
"'": ''',
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Escape text for an HTML text node or a quoted attribute.
|
|
10
|
+
* @param text untrusted text, such as a package name or a licence file.
|
|
11
|
+
* @returns the text with every markup character replaced by its entity.
|
|
12
|
+
*/
|
|
13
|
+
export const escapeHtml = (text) => text.replaceAll(/[&<>"']/gu, (character) => HTML_ESCAPES[character] ?? character);
|
|
14
|
+
/** The label each licence class is printed with. */
|
|
15
|
+
export const CLASS_LABELS = {
|
|
16
|
+
permissive: 'Permissive',
|
|
17
|
+
'weak-copyleft': 'Weak copyleft',
|
|
18
|
+
refused: 'Outside policy',
|
|
19
|
+
};
|
|
20
|
+
/** Every licence class, from the least to the most restrictive. */
|
|
21
|
+
export const CLASSES = ['permissive', 'weak-copyleft', 'refused'];
|
|
22
|
+
export const scopeLabel = (row) => (row.isProduction ? 'Production' : 'Development');
|
|
23
|
+
export const relationLabel = (row) => (row.isDirect ? 'Direct' : 'Transitive');
|
|
24
|
+
export const versionLabel = (row) => (row.version.length > 0 ? row.version : 'local directory');
|
|
25
|
+
const PERCENT = 100;
|
|
26
|
+
export const percentOf = (count, total) => total === 0 ? '0' : ((count / total) * PERCENT).toFixed(1);
|
|
27
|
+
export const formatCount = (count) => count.toLocaleString('en-US');
|
|
28
|
+
export const plural = (count, singular, several = `${singular}s`) => `${formatCount(count)} ${count === 1 ? singular : several}`;
|
|
29
|
+
export const classChip = (licenseClass) => `<span class="chip chip-${licenseClass}">${CLASS_LABELS[licenseClass]}</span>`;
|
|
30
|
+
export const severityChip = (severity) => {
|
|
31
|
+
const escaped = escapeHtml(severity.toLowerCase());
|
|
32
|
+
return `<span class="sev sev-${escaped}">${escaped}</span>`;
|
|
33
|
+
};
|
|
34
|
+
export const nowrap = (html) => `<span class="nowrap">${html}</span>`;
|
|
35
|
+
export const code = (text) => `<code>${escapeHtml(text)}</code>`;
|
|
36
|
+
const cell = (value) => `<td>${value}</td>`;
|
|
37
|
+
export const cells = (values) => `<tr>${values.map((value) => cell(value)).join('')}</tr>`;
|
|
38
|
+
/**
|
|
39
|
+
* A ruled table, or a sentence saying it would be empty.
|
|
40
|
+
* @param headings the column headings.
|
|
41
|
+
* @param rows the rendered rows.
|
|
42
|
+
* @param empty what to say when there are no rows.
|
|
43
|
+
* @returns the table markup.
|
|
44
|
+
*/
|
|
45
|
+
export const table = (headings, rows, empty) => rows.length === 0
|
|
46
|
+
? `<p class="empty">${escapeHtml(empty)}</p>`
|
|
47
|
+
: `<div class="table-wrap"><table class="tableblock"><thead><tr>${headings
|
|
48
|
+
.map((heading) => `<th scope="col">${escapeHtml(heading)}</th>`)
|
|
49
|
+
.join('')}</tr></thead><tbody>${rows.join('')}</tbody></table></div>`;
|
|
50
|
+
/**
|
|
51
|
+
* A two-column table of labelled facts.
|
|
52
|
+
* @param rows each already rendered label with its already rendered value.
|
|
53
|
+
* @param variant an extra class for the table, such as `plan`.
|
|
54
|
+
* @returns the table markup.
|
|
55
|
+
*/
|
|
56
|
+
export const facts = (rows, variant = '') => `<div class="table-wrap"><table class="${['tableblock', 'facts', variant].join(' ').trim()}"><tbody>${rows
|
|
57
|
+
.map(([label, value]) => `<tr><td>${label}</td><td>${value}</td></tr>`)
|
|
58
|
+
.join('')}</tbody></table></div>`;
|
|
59
|
+
const WEB_LINK = /^https?:\/\//u;
|
|
60
|
+
export const packageLink = (row) => row.homepage !== undefined && WEB_LINK.test(row.homepage)
|
|
61
|
+
? `<a href="${escapeHtml(row.homepage)}" rel="noreferrer noopener">${escapeHtml(row.name)}</a>`
|
|
62
|
+
: escapeHtml(row.name);
|
|
63
|
+
const idItem = (id) => `<li>${code(id)}</li>`;
|
|
64
|
+
export const idList = (ids) => `<ul class="ids">${ids.map((id) => idItem(id)).join('')}</ul>`;
|
|
65
|
+
/**
|
|
66
|
+
* Plain paragraphs of the report's own prose.
|
|
67
|
+
* @param items each paragraph, already rendered.
|
|
68
|
+
* @returns the paragraph markup.
|
|
69
|
+
*/
|
|
70
|
+
export const paragraphs = (items) => items.map((item) => `<p>${item}</p>`).join('');
|
|
71
|
+
const ICON_PATHS = {
|
|
72
|
+
warning: 'M12 2.5 1.5 21h21L12 2.5Zm-1.1 6.5h2.2l-.35 6.6h-1.5L10.9 9Zm1.1 10a1.3 1.3 0 1 1 0-2.6 1.3 1.3 0 0 1 0 2.6Z',
|
|
73
|
+
ok: 'M12 1.5a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21Zm-1.6 15.2-4.7-4.7 1.6-1.6 3.1 3.1 6.3-6.3 1.6 1.6-7.9 7.9Z',
|
|
74
|
+
fail: 'M12 1.5a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21Zm-1.1 5h2.2l-.35 7.6h-1.5L10.9 6.5Zm1.1 11.6a1.3 1.3 0 1 1 ' +
|
|
75
|
+
'0-2.6 1.3 1.3 0 0 1 0 2.6Z',
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* A notice set apart from the text by an icon and a rule, where a reader looks first.
|
|
79
|
+
* @param kind the icon.
|
|
80
|
+
* @param html the notice, already rendered.
|
|
81
|
+
* @returns the admonition markup.
|
|
82
|
+
*/
|
|
83
|
+
export const admonition = (kind, html) => `<div class="admonitionblock ${kind}"><table><tbody><tr><td class="icon">` +
|
|
84
|
+
`<svg class="icon-${kind}" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" ` +
|
|
85
|
+
`d="${ICON_PATHS[kind]}"/></svg></td><td class="content">${html}</td></tr></tbody></table></div>`;
|
|
86
|
+
// Embedded data is JSON inside a script element; escaping `<` keeps a `</script>` in a licence file or a
|
|
87
|
+
// package name from ending the element early.
|
|
88
|
+
export const embeddedJson = (value) => JSON.stringify(value).replaceAll('<', String.raw `\u003c`);
|
|
89
|
+
const CSV_FORMULA_START = /^[=+\-@\t\r]/u;
|
|
90
|
+
// Every field is quoted, and a field a spreadsheet would read as a formula is prefixed with an apostrophe:
|
|
91
|
+
// a package name is registry input, and a CSV opened in a spreadsheet is a place it could execute.
|
|
92
|
+
const csvField = (value) => {
|
|
93
|
+
const safe = CSV_FORMULA_START.test(value) ? `'${value}` : value;
|
|
94
|
+
return `"${safe.replaceAll('"', '""')}"`;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* The package inventory as CSV, one row per installed package version.
|
|
98
|
+
* @param packages the report's packages.
|
|
99
|
+
* @returns the CSV text with a header row.
|
|
100
|
+
*/
|
|
101
|
+
export const inventoryCsv = (packages) => [
|
|
102
|
+
['package', 'version', 'license', 'license class', 'scope', 'relation', 'homepage'],
|
|
103
|
+
...packages.map((row) => [
|
|
104
|
+
row.name,
|
|
105
|
+
row.version,
|
|
106
|
+
row.license,
|
|
107
|
+
CLASS_LABELS[row.licenseClass],
|
|
108
|
+
scopeLabel(row),
|
|
109
|
+
relationLabel(row),
|
|
110
|
+
row.homepage ?? '',
|
|
111
|
+
]),
|
|
112
|
+
]
|
|
113
|
+
.map((fields) => fields.map((field) => csvField(field)).join(','))
|
|
114
|
+
.join('\r\n')
|
|
115
|
+
.concat('\r\n');
|
|
116
|
+
//# sourceMappingURL=compliance-report-markup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-report-markup.js","sourceRoot":"","sources":["../src/compliance-report-markup.ts"],"names":[],"mappings":"AAKA,MAAM,YAAY,GAAqC;IACrD,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,OAAO;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,E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AAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;IACnF,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAkB,EAAqB,EAAE,CAAC;QACzD,GAAG,CAAC,IAAI;QACR,GAAG,CAAC,OAAO;QACX,GAAG,CAAC,OAAO;QACX,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC;QAC9B,UAAU,CAAC,GAAG,CAAC;QACf,aAAa,CAAC,GAAG,CAAC;QAClB,GAAG,CAAC,QAAQ,IAAI,EAAE;KACnB,CAAC;CACH;KACE,GAAG,CAAC,CAAC,MAAyB,EAAU,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAa,EAAU,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC5G,IAAI,CAAC,MAAM,CAAC;KACZ,MAAM,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A numbered subsection heading.
|
|
3
|
+
* @param id the outline entry.
|
|
4
|
+
* @returns the heading element.
|
|
5
|
+
*/
|
|
6
|
+
export declare const subheading: (id: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* A numbered top-level section.
|
|
9
|
+
* @param id the outline section.
|
|
10
|
+
* @param body the section's markup after its heading.
|
|
11
|
+
* @returns the section element.
|
|
12
|
+
*/
|
|
13
|
+
export declare const section: (id: string, body: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* The table of contents, read from the same outline as the headings. It lists the sections only, so it
|
|
16
|
+
* stays short enough to share the first page with the verdict.
|
|
17
|
+
* @returns the contents navigation.
|
|
18
|
+
*/
|
|
19
|
+
export declare const tableOfContents: () => string;
|
|
20
|
+
/**
|
|
21
|
+
* The cross-reference text for a section, such as "section 3".
|
|
22
|
+
* @param id the outline entry.
|
|
23
|
+
* @returns the reference text.
|
|
24
|
+
*/
|
|
25
|
+
export declare const sectionReference: (id: string) => string;
|
|
26
|
+
/**
|
|
27
|
+
* The page of every outline entry, from the bookmarks of a printed report. A bookmark is titled with the
|
|
28
|
+
* heading's text, which starts with the entry's number, so the number is what is matched.
|
|
29
|
+
* @param bookmarks the page by bookmark title, as read from the PDF.
|
|
30
|
+
* @returns the page number by outline id, for every entry found.
|
|
31
|
+
*/
|
|
32
|
+
export declare const contentsPages: (bookmarks: ReadonlyMap<string, number>) => ReadonlyMap<string, number>;
|
|
33
|
+
//# sourceMappingURL=compliance-report-outline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-report-outline.d.ts","sourceRoot":"","sources":["../src/compliance-report-outline.ts"],"names":[],"mappings":"AA2FA;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,KAAG,MAA8D,CAAA;AAEtG;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,EAAE,MAAM,MAAM,KAAG,MAE0B,CAAA;AAO7E;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAO,MAGpB,CAAA;AAEf;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,KAAG,MAA4C,CAAA;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,WAAW,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAQ9F,CAAA"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// The report's numbered outline: one definition that both the headings and the table of contents read,
|
|
2
|
+
// so a section can never be numbered one way in the text and another in the contents.
|
|
3
|
+
const OUTLINE = [
|
|
4
|
+
{
|
|
5
|
+
id: 'vulnerabilities',
|
|
6
|
+
title: 'Vulnerabilities',
|
|
7
|
+
subsections: [
|
|
8
|
+
{ id: 'advisories-all', title: 'All vulnerabilities' },
|
|
9
|
+
{ id: 'advisories-plans', title: 'Mitigation plans' },
|
|
10
|
+
{ id: 'advisories-stale', title: 'Recorded mitigations without a vulnerability' },
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: 'licenses',
|
|
15
|
+
title: 'Licenses',
|
|
16
|
+
subsections: [
|
|
17
|
+
{ id: 'license-classes', title: 'License classes' },
|
|
18
|
+
{ id: 'common-licenses', title: 'Most common licenses' },
|
|
19
|
+
{ id: 'review-weak-copyleft', title: 'Weak copyleft packages' },
|
|
20
|
+
{ id: 'review-outside', title: 'Packages outside the policy' },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 'policy',
|
|
25
|
+
title: 'License policy',
|
|
26
|
+
subsections: [
|
|
27
|
+
{ id: 'policy-permissive', title: 'Permissive licenses' },
|
|
28
|
+
{ id: 'policy-weak-copyleft', title: 'Weak copyleft licenses' },
|
|
29
|
+
{ id: 'policy-outside', title: 'Licenses outside the policy' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{ id: 'inventory', title: 'Package inventory', subsections: [] },
|
|
33
|
+
{
|
|
34
|
+
id: 'notices',
|
|
35
|
+
title: 'Third-party notices',
|
|
36
|
+
subsections: [
|
|
37
|
+
{ id: 'notices-missing', title: 'Packages without a license file' },
|
|
38
|
+
{ id: 'notices-texts', title: 'License texts' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'provenance',
|
|
43
|
+
title: 'Provenance and reproduction',
|
|
44
|
+
subsections: [
|
|
45
|
+
{ id: 'provenance-source', title: 'Source' },
|
|
46
|
+
{ id: 'provenance-scope', title: 'Scope' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
const NUMBERED = new Map(OUTLINE.flatMap((section, index) => {
|
|
51
|
+
const number = String(index + 1);
|
|
52
|
+
return [
|
|
53
|
+
[section.id, { number, title: section.title }],
|
|
54
|
+
...section.subsections.map((entry, position) => [
|
|
55
|
+
entry.id,
|
|
56
|
+
{ number: `${number}.${String(position + 1)}`, title: entry.title },
|
|
57
|
+
]),
|
|
58
|
+
];
|
|
59
|
+
}));
|
|
60
|
+
const numberedOf = (id) => {
|
|
61
|
+
const found = NUMBERED.get(id);
|
|
62
|
+
if (found === undefined) {
|
|
63
|
+
throw new Error(`the report outline has no entry "${id}"`);
|
|
64
|
+
}
|
|
65
|
+
return found;
|
|
66
|
+
};
|
|
67
|
+
const headingText = (entry) => `<span class="adnum">${entry.number}.</span><span class="adtext">${entry.title}</span>`;
|
|
68
|
+
/**
|
|
69
|
+
* A numbered subsection heading.
|
|
70
|
+
* @param id the outline entry.
|
|
71
|
+
* @returns the heading element.
|
|
72
|
+
*/
|
|
73
|
+
export const subheading = (id) => `<h3 id="${id}">${headingText(numberedOf(id))}</h3>`;
|
|
74
|
+
/**
|
|
75
|
+
* A numbered top-level section.
|
|
76
|
+
* @param id the outline section.
|
|
77
|
+
* @param body the section's markup after its heading.
|
|
78
|
+
* @returns the section element.
|
|
79
|
+
*/
|
|
80
|
+
export const section = (id, body) => `<section class="sect1" id="${id}" aria-labelledby="${id}-title">` +
|
|
81
|
+
`<h2 id="${id}-title">${headingText(numberedOf(id))}</h2>${body}</section>`;
|
|
82
|
+
// The leader and page slots are filled only in print, where the contents list carries page numbers.
|
|
83
|
+
const tocLink = (id) => `<a href="#${id}">${headingText(numberedOf(id))}<span class="leader"></span><span class="page" data-for="${id}">` +
|
|
84
|
+
'</span></a>';
|
|
85
|
+
/**
|
|
86
|
+
* The table of contents, read from the same outline as the headings. It lists the sections only, so it
|
|
87
|
+
* stays short enough to share the first page with the verdict.
|
|
88
|
+
* @returns the contents navigation.
|
|
89
|
+
*/
|
|
90
|
+
export const tableOfContents = () => '<nav id="toc" aria-labelledby="toctitle"><div id="toctitle">Contents</div><ul class="sectlevel1">' +
|
|
91
|
+
OUTLINE.map((entry) => `<li>${tocLink(entry.id)}</li>`).join('') +
|
|
92
|
+
'</ul></nav>';
|
|
93
|
+
/**
|
|
94
|
+
* The cross-reference text for a section, such as "section 3".
|
|
95
|
+
* @param id the outline entry.
|
|
96
|
+
* @returns the reference text.
|
|
97
|
+
*/
|
|
98
|
+
export const sectionReference = (id) => `section ${numberedOf(id).number}`;
|
|
99
|
+
/**
|
|
100
|
+
* The page of every outline entry, from the bookmarks of a printed report. A bookmark is titled with the
|
|
101
|
+
* heading's text, which starts with the entry's number, so the number is what is matched.
|
|
102
|
+
* @param bookmarks the page by bookmark title, as read from the PDF.
|
|
103
|
+
* @returns the page number by outline id, for every entry found.
|
|
104
|
+
*/
|
|
105
|
+
export const contentsPages = (bookmarks) => new Map([...NUMBERED].flatMap(([id, entry]) => {
|
|
106
|
+
const page = [...bookmarks].find(([title]) => title.startsWith(`${entry.number}.${entry.title}`))?.[1];
|
|
107
|
+
return page === undefined ? [] : [[id, page]];
|
|
108
|
+
}));
|
|
109
|
+
//# sourceMappingURL=compliance-report-outline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-report-outline.js","sourceRoot":"","sources":["../src/compliance-report-outline.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,sFAAsF;AAatF,MAAM,OAAO,GAA8B;IACzC;QACE,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE;YACX,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,qBAAqB,EAAE;YACtD,EAAE,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE;YACrD,EAAE,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,8CAA8C,EAAE;SAClF;KACF;IACD;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE;YACX,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;YACnD,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,sBAAsB,EAAE;YACxD,EAAE,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AM,CAAC,MAAM,eAAe,GAAG,GAAW,EAAE,CAC1C,mGAAmG;IACnG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAqB,EAAU,EAAE,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;IACxF,aAAa,CAAA;AAEf;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAU,EAAE,CAAC,WAAW,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAA;AAE1F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAsC,EAA+B,EAAE,CACnG,IAAI,GAAG,CACL,CAAC,GAAG,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAA8B,EAA0C,EAAE;IACzG,MAAM,IAAI,GAAuB,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAA4B,EAAW,EAAE,CACnG,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,CACnD,EAAE,CAAC,CAAC,CAAC,CAAA;IACN,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAA;AAC/C,CAAC,CAAC,CACH,CAAA"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { LICENSE_POLICY, type LicenseClass } from './license-allowlist.js';
|
|
2
|
+
import { type InventoryPackage } from './license-inventory.js';
|
|
3
|
+
import { type Advisory, type VulnerabilityClassification, type VulnerabilityException } from './vulnerability-policy.js';
|
|
4
|
+
/** One licence file a package ships, as read from its installed directory. */
|
|
5
|
+
export interface NoticeFile {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly text: string;
|
|
8
|
+
}
|
|
9
|
+
/** The licence files one installed package version ships. */
|
|
10
|
+
export interface PackageNotices {
|
|
11
|
+
readonly coordinate: string;
|
|
12
|
+
readonly files: readonly NoticeFile[];
|
|
13
|
+
}
|
|
14
|
+
/** Where the report's source stands. */
|
|
15
|
+
export interface ReportSource {
|
|
16
|
+
readonly commit: string;
|
|
17
|
+
readonly isDirty: boolean;
|
|
18
|
+
readonly fingerprint: string;
|
|
19
|
+
readonly lockfileSha256: string;
|
|
20
|
+
}
|
|
21
|
+
/** The SBOM the report embeds. */
|
|
22
|
+
export interface ReportSbom {
|
|
23
|
+
readonly sha256: string;
|
|
24
|
+
readonly components: number;
|
|
25
|
+
readonly generator: string;
|
|
26
|
+
}
|
|
27
|
+
/** Everything the report is built from. */
|
|
28
|
+
export interface ComplianceReportInput {
|
|
29
|
+
readonly projectName: string;
|
|
30
|
+
readonly projectDescription: string | undefined;
|
|
31
|
+
readonly source: ReportSource;
|
|
32
|
+
readonly generatedAt: string;
|
|
33
|
+
readonly harnessVersion: string;
|
|
34
|
+
readonly packages: readonly InventoryPackage[];
|
|
35
|
+
readonly production: readonly InventoryPackage[];
|
|
36
|
+
readonly directNames: readonly string[];
|
|
37
|
+
readonly vulnerabilities: VulnerabilityClassification;
|
|
38
|
+
readonly advisoryRecords: number;
|
|
39
|
+
readonly auditedAt: string;
|
|
40
|
+
readonly sbom: ReportSbom;
|
|
41
|
+
readonly notices: readonly PackageNotices[];
|
|
42
|
+
}
|
|
43
|
+
/** One installed package version as the report lists it. */
|
|
44
|
+
export interface ReportPackage {
|
|
45
|
+
readonly name: string;
|
|
46
|
+
/** Empty for a directory dependency, which pnpm reports without a version. */
|
|
47
|
+
readonly version: string;
|
|
48
|
+
readonly license: string;
|
|
49
|
+
readonly licenseClass: LicenseClass;
|
|
50
|
+
readonly isProduction: boolean;
|
|
51
|
+
readonly isDirect: boolean;
|
|
52
|
+
readonly homepage: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
/** How many package versions declare one licence. */
|
|
55
|
+
export interface LicenseCount {
|
|
56
|
+
readonly license: string;
|
|
57
|
+
readonly licenseClass: LicenseClass;
|
|
58
|
+
readonly count: number;
|
|
59
|
+
}
|
|
60
|
+
/** One licence text and every distributed package version that ships it. */
|
|
61
|
+
export interface NoticeGroup {
|
|
62
|
+
readonly text: string;
|
|
63
|
+
readonly fileNames: readonly string[];
|
|
64
|
+
readonly coordinates: readonly string[];
|
|
65
|
+
}
|
|
66
|
+
/** One reported advisory as the report lists it, with the mitigation that covers it, if any. */
|
|
67
|
+
export interface ReportAdvisory {
|
|
68
|
+
readonly advisory: Advisory;
|
|
69
|
+
/** Whether any installed version of the package is in the production graph. */
|
|
70
|
+
readonly isProduction: boolean;
|
|
71
|
+
/** Undefined while the advisory is open. */
|
|
72
|
+
readonly mitigation: VulnerabilityException | undefined;
|
|
73
|
+
readonly isHarnessMitigation: boolean;
|
|
74
|
+
}
|
|
75
|
+
/** The assembled report. */
|
|
76
|
+
export interface ComplianceReport {
|
|
77
|
+
readonly projectName: string;
|
|
78
|
+
readonly projectDescription: string | undefined;
|
|
79
|
+
readonly source: ReportSource;
|
|
80
|
+
readonly generatedAt: string;
|
|
81
|
+
readonly harnessVersion: string;
|
|
82
|
+
/** Whether every license is within the policy and no advisory is open or recorded without a match. */
|
|
83
|
+
readonly isWithinPolicy: boolean;
|
|
84
|
+
/** Why the report is not release evidence; empty when it is. */
|
|
85
|
+
readonly draftReasons: readonly string[];
|
|
86
|
+
readonly packages: readonly ReportPackage[];
|
|
87
|
+
readonly productionCount: number;
|
|
88
|
+
readonly directCount: number;
|
|
89
|
+
readonly licenseCounts: readonly LicenseCount[];
|
|
90
|
+
readonly classCounts: Readonly<Record<LicenseClass, number>>;
|
|
91
|
+
readonly copyleft: readonly ReportPackage[];
|
|
92
|
+
readonly refused: readonly ReportPackage[];
|
|
93
|
+
readonly policy: typeof LICENSE_POLICY;
|
|
94
|
+
readonly vulnerabilities: VulnerabilityClassification;
|
|
95
|
+
/** Every advisory, most severe first. */
|
|
96
|
+
readonly advisories: readonly ReportAdvisory[];
|
|
97
|
+
readonly advisoryRecords: number;
|
|
98
|
+
readonly auditedAt: string;
|
|
99
|
+
readonly sbom: ReportSbom;
|
|
100
|
+
readonly notices: readonly NoticeGroup[];
|
|
101
|
+
/** Distributed package versions whose installed directory carries no licence file. */
|
|
102
|
+
readonly withoutNotice: readonly string[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Reflow a licence file for a proportional column. Words and their order are unchanged; only the
|
|
106
|
+
* fixed-width line breaks inside a paragraph are removed, and runs of spaces collapse to one.
|
|
107
|
+
* @param text the licence file as shipped.
|
|
108
|
+
* @returns the text with paragraphs separated by a blank line and kept line breaks by a newline.
|
|
109
|
+
*/
|
|
110
|
+
export declare const reflowLicenseText: (text: string) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Assemble the compliance report.
|
|
113
|
+
* @param input the inventory, the vulnerability classification and the provenance already read.
|
|
114
|
+
* @returns the report model the renderer prints.
|
|
115
|
+
*/
|
|
116
|
+
export declare const buildComplianceReport: (input: ComplianceReportInput) => ComplianceReport;
|
|
117
|
+
/** Where the compliance report is written unless the command names another directory. */
|
|
118
|
+
export declare const DEFAULT_REPORT_OUTPUT: string;
|
|
119
|
+
/** The file name every report starts with, which is also how a stale one is recognised. */
|
|
120
|
+
export declare const REPORT_FILE_PREFIX: string;
|
|
121
|
+
/**
|
|
122
|
+
* The report's file name without extension: the project and the commit it describes.
|
|
123
|
+
* @param projectName the root manifest's name, which may be scoped.
|
|
124
|
+
* @param commit the source commit.
|
|
125
|
+
* @returns a name safe on every filesystem.
|
|
126
|
+
*/
|
|
127
|
+
export declare const reportFileStem: (projectName: string, commit: string) => string;
|
|
128
|
+
/**
|
|
129
|
+
* Parse the compliance report command grammar: no argument, or one output directory.
|
|
130
|
+
* @param arguments_ the arguments after the command name.
|
|
131
|
+
* @returns the output directory, or undefined when the arguments are not that grammar.
|
|
132
|
+
*/
|
|
133
|
+
export declare const parseComplianceReportArguments: (arguments_: readonly string[]) => {
|
|
134
|
+
readonly output: string;
|
|
135
|
+
} | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* The packages any workspace manifest declares, which is what makes a dependency direct.
|
|
138
|
+
* @param manifests every workspace manifest, as parsed JSON.
|
|
139
|
+
* @returns the declared package names, each once.
|
|
140
|
+
*/
|
|
141
|
+
export declare const directDependencyNames: (manifests: readonly unknown[]) => readonly string[];
|
|
142
|
+
//# sourceMappingURL=compliance-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compliance-report.d.ts","sourceRoot":"","sources":["../src/compliance-report.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAkB,MAAM,wBAAwB,CAAA;AAC1F,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EACL,KAAK,QAAQ,EAGb,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC5B,MAAM,2BAA2B,CAAA;AAElC,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;CACtC;AAED,wCAAwC;AACxC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAED,kCAAkC;AAClC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAC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