@ploaness/governance 1.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.
Files changed (199) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/dist/access-boundary.d.ts +41 -0
  4. package/dist/access-boundary.d.ts.map +1 -0
  5. package/dist/access-boundary.js +26 -0
  6. package/dist/access-boundary.js.map +1 -0
  7. package/dist/agent-references.d.ts +12 -0
  8. package/dist/agent-references.d.ts.map +1 -0
  9. package/dist/agent-references.js +53 -0
  10. package/dist/agent-references.js.map +1 -0
  11. package/dist/architecture-layers.d.ts +11 -0
  12. package/dist/architecture-layers.d.ts.map +1 -0
  13. package/dist/architecture-layers.js +47 -0
  14. package/dist/architecture-layers.js.map +1 -0
  15. package/dist/asset-policy.d.ts +138 -0
  16. package/dist/asset-policy.d.ts.map +1 -0
  17. package/dist/asset-policy.js +312 -0
  18. package/dist/asset-policy.js.map +1 -0
  19. package/dist/banned-typography.d.ts +13 -0
  20. package/dist/banned-typography.d.ts.map +1 -0
  21. package/dist/banned-typography.js +78 -0
  22. package/dist/banned-typography.js.map +1 -0
  23. package/dist/bundle-budget.d.ts +16 -0
  24. package/dist/bundle-budget.d.ts.map +1 -0
  25. package/dist/bundle-budget.js +37 -0
  26. package/dist/bundle-budget.js.map +1 -0
  27. package/dist/commit-message.d.ts +37 -0
  28. package/dist/commit-message.d.ts.map +1 -0
  29. package/dist/commit-message.js +144 -0
  30. package/dist/commit-message.js.map +1 -0
  31. package/dist/config-references.d.ts +17 -0
  32. package/dist/config-references.d.ts.map +1 -0
  33. package/dist/config-references.js +54 -0
  34. package/dist/config-references.js.map +1 -0
  35. package/dist/container-failure.d.ts +40 -0
  36. package/dist/container-failure.d.ts.map +1 -0
  37. package/dist/container-failure.js +154 -0
  38. package/dist/container-failure.js.map +1 -0
  39. package/dist/container-files.d.ts +36 -0
  40. package/dist/container-files.d.ts.map +1 -0
  41. package/dist/container-files.js +74 -0
  42. package/dist/container-files.js.map +1 -0
  43. package/dist/container-freshness.d.ts +102 -0
  44. package/dist/container-freshness.d.ts.map +1 -0
  45. package/dist/container-freshness.js +129 -0
  46. package/dist/container-freshness.js.map +1 -0
  47. package/dist/dependency-freshness.d.ts +129 -0
  48. package/dist/dependency-freshness.d.ts.map +1 -0
  49. package/dist/dependency-freshness.js +161 -0
  50. package/dist/dependency-freshness.js.map +1 -0
  51. package/dist/doc-blocks.d.ts +13 -0
  52. package/dist/doc-blocks.d.ts.map +1 -0
  53. package/dist/doc-blocks.js +75 -0
  54. package/dist/doc-blocks.js.map +1 -0
  55. package/dist/document-references.d.ts +44 -0
  56. package/dist/document-references.d.ts.map +1 -0
  57. package/dist/document-references.js +94 -0
  58. package/dist/document-references.js.map +1 -0
  59. package/dist/editorconfig-policy.d.ts +24 -0
  60. package/dist/editorconfig-policy.d.ts.map +1 -0
  61. package/dist/editorconfig-policy.js +106 -0
  62. package/dist/editorconfig-policy.js.map +1 -0
  63. package/dist/environment-files.d.ts +42 -0
  64. package/dist/environment-files.d.ts.map +1 -0
  65. package/dist/environment-files.js +76 -0
  66. package/dist/environment-files.js.map +1 -0
  67. package/dist/file-roles.d.ts +39 -0
  68. package/dist/file-roles.d.ts.map +1 -0
  69. package/dist/file-roles.js +82 -0
  70. package/dist/file-roles.js.map +1 -0
  71. package/dist/generated-denial.d.ts +42 -0
  72. package/dist/generated-denial.d.ts.map +1 -0
  73. package/dist/generated-denial.js +87 -0
  74. package/dist/generated-denial.js.map +1 -0
  75. package/dist/history-policy.d.ts +32 -0
  76. package/dist/history-policy.d.ts.map +1 -0
  77. package/dist/history-policy.js +50 -0
  78. package/dist/history-policy.js.map +1 -0
  79. package/dist/image-assets.d.ts +14 -0
  80. package/dist/image-assets.d.ts.map +1 -0
  81. package/dist/image-assets.js +205 -0
  82. package/dist/image-assets.js.map +1 -0
  83. package/dist/index.d.ts +49 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +53 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/install-policy.d.ts +35 -0
  88. package/dist/install-policy.d.ts.map +1 -0
  89. package/dist/install-policy.js +61 -0
  90. package/dist/install-policy.js.map +1 -0
  91. package/dist/json-shapes.d.ts +86 -0
  92. package/dist/json-shapes.d.ts.map +1 -0
  93. package/dist/json-shapes.js +124 -0
  94. package/dist/json-shapes.js.map +1 -0
  95. package/dist/license-allowlist.d.ts +15 -0
  96. package/dist/license-allowlist.d.ts.map +1 -0
  97. package/dist/license-allowlist.js +157 -0
  98. package/dist/license-allowlist.js.map +1 -0
  99. package/dist/network-policy.d.ts +69 -0
  100. package/dist/network-policy.d.ts.map +1 -0
  101. package/dist/network-policy.js +173 -0
  102. package/dist/network-policy.js.map +1 -0
  103. package/dist/paired-assets.d.ts +34 -0
  104. package/dist/paired-assets.d.ts.map +1 -0
  105. package/dist/paired-assets.js +63 -0
  106. package/dist/paired-assets.js.map +1 -0
  107. package/dist/payload-access.d.ts +9 -0
  108. package/dist/payload-access.d.ts.map +1 -0
  109. package/dist/payload-access.js +168 -0
  110. package/dist/payload-access.js.map +1 -0
  111. package/dist/payload-policy.d.ts +18 -0
  112. package/dist/payload-policy.d.ts.map +1 -0
  113. package/dist/payload-policy.js +124 -0
  114. package/dist/payload-policy.js.map +1 -0
  115. package/dist/payload-source.d.ts +29 -0
  116. package/dist/payload-source.d.ts.map +1 -0
  117. package/dist/payload-source.js +84 -0
  118. package/dist/payload-source.js.map +1 -0
  119. package/dist/release-age.d.ts +23 -0
  120. package/dist/release-age.d.ts.map +1 -0
  121. package/dist/release-age.js +38 -0
  122. package/dist/release-age.js.map +1 -0
  123. package/dist/request-limits.d.ts +39 -0
  124. package/dist/request-limits.d.ts.map +1 -0
  125. package/dist/request-limits.js +57 -0
  126. package/dist/request-limits.js.map +1 -0
  127. package/dist/run-plan.d.ts +32 -0
  128. package/dist/run-plan.d.ts.map +1 -0
  129. package/dist/run-plan.js +43 -0
  130. package/dist/run-plan.js.map +1 -0
  131. package/dist/run-policy.d.ts +32 -0
  132. package/dist/run-policy.d.ts.map +1 -0
  133. package/dist/run-policy.js +37 -0
  134. package/dist/run-policy.js.map +1 -0
  135. package/dist/secret-policy.d.ts +13 -0
  136. package/dist/secret-policy.d.ts.map +1 -0
  137. package/dist/secret-policy.js +69 -0
  138. package/dist/secret-policy.js.map +1 -0
  139. package/dist/settings-layering.d.ts +45 -0
  140. package/dist/settings-layering.d.ts.map +1 -0
  141. package/dist/settings-layering.js +134 -0
  142. package/dist/settings-layering.js.map +1 -0
  143. package/dist/settings.d.ts +238 -0
  144. package/dist/settings.d.ts.map +1 -0
  145. package/dist/settings.js +378 -0
  146. package/dist/settings.js.map +1 -0
  147. package/dist/skill-manifest.d.ts +18 -0
  148. package/dist/skill-manifest.d.ts.map +1 -0
  149. package/dist/skill-manifest.js +125 -0
  150. package/dist/skill-manifest.js.map +1 -0
  151. package/dist/source-text.d.ts +83 -0
  152. package/dist/source-text.d.ts.map +1 -0
  153. package/dist/source-text.js +310 -0
  154. package/dist/source-text.js.map +1 -0
  155. package/dist/suppression-ceiling.d.ts +48 -0
  156. package/dist/suppression-ceiling.d.ts.map +1 -0
  157. package/dist/suppression-ceiling.js +115 -0
  158. package/dist/suppression-ceiling.js.map +1 -0
  159. package/dist/tailwind-tokens.d.ts +16 -0
  160. package/dist/tailwind-tokens.d.ts.map +1 -0
  161. package/dist/tailwind-tokens.js +70 -0
  162. package/dist/tailwind-tokens.js.map +1 -0
  163. package/dist/text-escapes.d.ts +7 -0
  164. package/dist/text-escapes.d.ts.map +1 -0
  165. package/dist/text-escapes.js +14 -0
  166. package/dist/text-escapes.js.map +1 -0
  167. package/dist/toolchain-pins.d.ts +42 -0
  168. package/dist/toolchain-pins.d.ts.map +1 -0
  169. package/dist/toolchain-pins.js +99 -0
  170. package/dist/toolchain-pins.js.map +1 -0
  171. package/dist/url-safety.d.ts +12 -0
  172. package/dist/url-safety.d.ts.map +1 -0
  173. package/dist/url-safety.js +58 -0
  174. package/dist/url-safety.js.map +1 -0
  175. package/dist/version-policy.d.ts +99 -0
  176. package/dist/version-policy.d.ts.map +1 -0
  177. package/dist/version-policy.js +306 -0
  178. package/dist/version-policy.js.map +1 -0
  179. package/dist/vulnerability-policy.d.ts +66 -0
  180. package/dist/vulnerability-policy.d.ts.map +1 -0
  181. package/dist/vulnerability-policy.js +106 -0
  182. package/dist/vulnerability-policy.js.map +1 -0
  183. package/dist/wiring-policy.d.ts +226 -0
  184. package/dist/wiring-policy.d.ts.map +1 -0
  185. package/dist/wiring-policy.js +458 -0
  186. package/dist/wiring-policy.js.map +1 -0
  187. package/dist/wiring-violation.d.ts +6 -0
  188. package/dist/wiring-violation.d.ts.map +1 -0
  189. package/dist/wiring-violation.js +8 -0
  190. package/dist/wiring-violation.js.map +1 -0
  191. package/dist/workspace-policy.d.ts +177 -0
  192. package/dist/workspace-policy.d.ts.map +1 -0
  193. package/dist/workspace-policy.js +228 -0
  194. package/dist/workspace-policy.js.map +1 -0
  195. package/dist/yaml-blocks.d.ts +43 -0
  196. package/dist/yaml-blocks.d.ts.map +1 -0
  197. package/dist/yaml-blocks.js +87 -0
  198. package/dist/yaml-blocks.js.map +1 -0
  199. package/package.json +41 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-policy.js","sourceRoot":"","sources":["../src/version-policy.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,EAAE;AACF,kGAAkG;AAClG,wGAAwG;AACxG,mGAAmG;AACnG,iBAAiB;AACjB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAsB,MAAM,qBAAqB,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,sGAAsG;AACtG,oGAAoG;AACpG,kFAAkF;AAClF,MAAM,OAAO,GAAG,CAAC,WAAoC,EAAE,IAAY,EAAsB,EAAE;IAC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,WAAW,CAAC;IAClC,GAAG,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC;IACzD,GAAG,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC;CACrD,CAAA;AAYD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,WAAoC,EACpC,MAAqB,EACO,EAAE,CAAC;IAC/B,GAAG,4BAA4B,CAAC,WAAW,EAAE;QAC3C,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,cAAc,EAAE,MAAM,CAAC,cAAc;KACtC,CAAC;IACF,GAAG,+BAA+B,CAAC,WAAW,EAAE;QAC9C,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,sBAAsB,EAAE,MAAM,CAAC,sBAAsB;QACrD,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,qBAAqB,EAAE,oBAAoB,CAAC,WAAW,CAAC;KACzD,CAAC;CACH,CAAA"}
@@ -0,0 +1,66 @@
1
+ /** Advisory severities, ordered from least to most severe. */
2
+ export declare const SEVERITY_ORDER: readonly string[];
3
+ /** The severity ploaness declares. A project may lower this and never raise it. */
4
+ export declare const DEFAULT_SEVERITY: string;
5
+ /** One advisory reported by the database. */
6
+ export interface Advisory {
7
+ readonly id: string;
8
+ readonly packageName: string;
9
+ readonly severity: string;
10
+ readonly title: string;
11
+ /** Alternative identifiers the advisory is also known by, such as its CVEs. */
12
+ readonly aliases: readonly string[];
13
+ }
14
+ /** A recorded exception for an advisory the repository cannot reach. */
15
+ export interface VulnerabilityException {
16
+ readonly advisory: string;
17
+ readonly reason: string;
18
+ readonly addedOn: string;
19
+ }
20
+ /**
21
+ * Advisories carried by ploaness's OWN dependency chain, which a consuming project cannot repair.
22
+ *
23
+ * Every other exception is the project's to record, because every other advisory is reachable from a
24
+ * package the project chose. These are not: they arrive through `ploaness` itself, so a project asked to
25
+ * allowlist one would be excusing the harness's problem in its own manifest, and every consumer would
26
+ * carry the same entry. The harness answers for its own tree instead.
27
+ *
28
+ * The bar is the same one a project is held to - a reason and a date - and so is the staleness rule
29
+ * below. What differs is the repair a finding names: upgrading ploaness rather than editing package.json.
30
+ */
31
+ export declare const HARNESS_EXCEPTIONS: readonly VulnerabilityException[];
32
+ /** What the vulnerability rule decided. */
33
+ export interface VulnerabilityReport {
34
+ readonly unsuppressed: readonly Advisory[];
35
+ readonly deadEntries: readonly string[];
36
+ readonly threshold: string;
37
+ }
38
+ /**
39
+ * Resolve the severity a project is held to.
40
+ * @param declared the project's declared severity, or undefined.
41
+ * @returns the declared severity when it is stricter than the default, otherwise the default.
42
+ */
43
+ export declare const effectiveSeverity: (declared: string | undefined) => string;
44
+ /**
45
+ * Decide whether an advisory reaches the threshold.
46
+ *
47
+ * A severity the database reports and this scale does not know is read as the most severe rather than
48
+ * as the least. It used to be dropped from the report entirely - the guard read `rank !== -1`, so an
49
+ * advisory whose severity was absent, misspelled, or newly introduced upstream simply vanished. That is
50
+ * a fail-open default inside the one gate whose whole design is fail-closed, and the wrong direction to
51
+ * be wrong in: a false failure is repaired by looking at the advisory, and a false pass by nothing.
52
+ * @param advisory the reported advisory.
53
+ * @param threshold the severity the repository is held to.
54
+ * @returns true when the advisory is at or above the threshold.
55
+ */
56
+ export declare const reachesThreshold: (advisory: Advisory, threshold: string) => boolean;
57
+ /**
58
+ * Judge the advisories the database reported against the recorded exceptions.
59
+ * @param advisories every advisory reported for the resolved set.
60
+ * @param exceptions the recorded exceptions.
61
+ * @param declaredSeverity the project's declared severity, or undefined.
62
+ * @param harnessExceptions the advisories ploaness answers for in its own chain.
63
+ * @returns the advisories that stand, and the exceptions that suppress nothing.
64
+ */
65
+ export declare const judgeVulnerabilities: (advisories: readonly Advisory[], exceptions: readonly VulnerabilityException[], declaredSeverity: string | undefined, harnessExceptions?: readonly VulnerabilityException[]) => VulnerabilityReport;
66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GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,YAAY,SAAS,QAAQ,EAAE,EAC/B,YAAY,SAAS,sBAAsB,EAAE,EAC7C,kBAAkB,MAAM,GAAG,SAAS,EAIpC,oBAAmB,SAAS,sBAAsB,EAAO,KACxD,mBAwCF,CAAA"}
@@ -0,0 +1,106 @@
1
+ // Known vulnerabilities.
2
+ //
3
+ // The check reads every package in the resolved set against a public advisory database and fails on a
4
+ // finding at or above the declared severity. It covers the packages the product, the tests, and the
5
+ // build use: a build tool runs with build privileges, so its vulnerability is reachable by anyone who
6
+ // can change the repository.
7
+ //
8
+ // Two properties matter as much as the failure itself. An allowlist entry must record why the
9
+ // repository cannot reach the vulnerability and when the entry was added, because an undated exception
10
+ // is one nobody can review. And an entry that suppresses nothing is itself a finding - the package was
11
+ // upgraded or the advisory withdrawn, and a stale exception quietly widens the next scan.
12
+ /** Advisory severities, ordered from least to most severe. */
13
+ export const SEVERITY_ORDER = ['info', 'low', 'moderate', 'high', 'critical'];
14
+ /** The severity ploaness declares. A project may lower this and never raise it. */
15
+ export const DEFAULT_SEVERITY = 'moderate';
16
+ /**
17
+ * Advisories carried by ploaness's OWN dependency chain, which a consuming project cannot repair.
18
+ *
19
+ * Every other exception is the project's to record, because every other advisory is reachable from a
20
+ * package the project chose. These are not: they arrive through `ploaness` itself, so a project asked to
21
+ * allowlist one would be excusing the harness's problem in its own manifest, and every consumer would
22
+ * carry the same entry. The harness answers for its own tree instead.
23
+ *
24
+ * The bar is the same one a project is held to - a reason and a date - and so is the staleness rule
25
+ * below. What differs is the repair a finding names: upgrading ploaness rather than editing package.json.
26
+ */
27
+ export const HARNESS_EXCEPTIONS = [
28
+ {
29
+ advisory: 'GHSA-ggr8-5vv4-36mx',
30
+ reason: 'deepmerge-ts is reached only through eslint-plugin-functional, which ploaness runs as a ' +
31
+ 'linter over source the project already controls; the stack exhaustion needs a recursive ' +
32
+ 'object graph, and an ESLint rule configuration is not one an attacker supplies. There is no ' +
33
+ 'upgrade above it: eslint-plugin-functional 10.0.0 is the latest release and pins ^7.1.5.',
34
+ addedOn: '2026-08-25',
35
+ },
36
+ ];
37
+ /** What `indexOf` returns for a severity this scale does not carry. */
38
+ const NOT_RANKED = -1;
39
+ const rank = (severity) => SEVERITY_ORDER.indexOf(severity.toLowerCase());
40
+ /**
41
+ * Resolve the severity a project is held to.
42
+ * @param declared the project's declared severity, or undefined.
43
+ * @returns the declared severity when it is stricter than the default, otherwise the default.
44
+ */
45
+ export const effectiveSeverity = (declared) => {
46
+ if (declared === undefined || rank(declared) === NOT_RANKED) {
47
+ return DEFAULT_SEVERITY;
48
+ }
49
+ // Only a stricter setting is honoured. A setting that raised the threshold would narrow the check's
50
+ // scope, which is the bypass the harness exists to refuse.
51
+ return rank(declared) < rank(DEFAULT_SEVERITY) ? declared.toLowerCase() : DEFAULT_SEVERITY;
52
+ };
53
+ /** The rank an unrecognised severity is read at, which is the top of the scale. */
54
+ const UNKNOWN_SEVERITY_RANK = SEVERITY_ORDER.length;
55
+ /**
56
+ * Decide whether an advisory reaches the threshold.
57
+ *
58
+ * A severity the database reports and this scale does not know is read as the most severe rather than
59
+ * as the least. It used to be dropped from the report entirely - the guard read `rank !== -1`, so an
60
+ * advisory whose severity was absent, misspelled, or newly introduced upstream simply vanished. That is
61
+ * a fail-open default inside the one gate whose whole design is fail-closed, and the wrong direction to
62
+ * be wrong in: a false failure is repaired by looking at the advisory, and a false pass by nothing.
63
+ * @param advisory the reported advisory.
64
+ * @param threshold the severity the repository is held to.
65
+ * @returns true when the advisory is at or above the threshold.
66
+ */
67
+ export const reachesThreshold = (advisory, threshold) => {
68
+ const severity = rank(advisory.severity);
69
+ return (severity === NOT_RANKED ? UNKNOWN_SEVERITY_RANK : severity) >= rank(threshold);
70
+ };
71
+ const identifiersOf = (advisory) => [advisory.id, ...advisory.aliases].map((identifier) => identifier.toUpperCase());
72
+ /**
73
+ * Judge the advisories the database reported against the recorded exceptions.
74
+ * @param advisories every advisory reported for the resolved set.
75
+ * @param exceptions the recorded exceptions.
76
+ * @param declaredSeverity the project's declared severity, or undefined.
77
+ * @param harnessExceptions the advisories ploaness answers for in its own chain.
78
+ * @returns the advisories that stand, and the exceptions that suppress nothing.
79
+ */
80
+ export const judgeVulnerabilities = (advisories, exceptions, declaredSeverity,
81
+ // Defaulted to none rather than to the shipped list: a pure rule whose behaviour depends on a module
82
+ // constant is one a spec cannot state the inputs of, and the strict end is the right default anyway.
83
+ // The CLI injects HARNESS_EXCEPTIONS, which is the one place that knows it is judging a real project.
84
+ harnessExceptions = []) => {
85
+ const threshold = effectiveSeverity(declaredSeverity);
86
+ const excused = new Set([...harnessExceptions, ...exceptions].map((exception) => exception.advisory.toUpperCase()));
87
+ const atThreshold = advisories.filter((advisory) => reachesThreshold(advisory, threshold));
88
+ const matched = new Set(atThreshold.flatMap((advisory) => identifiersOf(advisory).filter((identifier) => excused.has(identifier))));
89
+ return {
90
+ threshold,
91
+ unsuppressed: atThreshold.filter((advisory) => !identifiersOf(advisory).some((identifier) => excused.has(identifier))),
92
+ // An entry that excuses nothing has outlived its advisory. Reporting it is the vulnerability-domain
93
+ // twin of failing on a lint suppression that no longer suppresses anything.
94
+ // The project's own entries only. Whether a HARNESS entry still suppresses anything is a property
95
+ // of the tree being audited rather than of ploaness: this repository resolves the linter's
96
+ // dependency differently from a consumer that installs the published packages, so the same entry is
97
+ // live in one tree and dead in the other. Reporting it would fail whichever side was not the one it
98
+ // was written for, and a project cannot edit a manifest it does not own in either case. A harness
99
+ // entry is reviewed by its recorded date, by the person who can act on it.
100
+ deadEntries: exceptions
101
+ .filter((exception) => !matched.has(exception.advisory.toUpperCase()))
102
+ .map((exception) => `${exception.advisory} suppresses no current finding; the package was upgraded ` +
103
+ 'or the advisory withdrawn, so remove the entry'),
104
+ };
105
+ };
106
+ //# sourceMappingURL=vulnerability-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vulnerability-policy.js","sourceRoot":"","sources":["../src/vulnerability-policy.ts"],"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AC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CACzF,CACF,CAAA;IACD,OAAO;QACL,SAAS;QACT,YAAY,EAAE,WAAW,CAAC,MAAM,CAC9B,CAAC,QAAkB,EAAW,EAAE,CAC9B,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,UAAkB,EAAW,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAC1F;QACD,oGAAoG;QACpG,4EAA4E;QAC5E,kGAAkG;QAClG,2FAA2F;QAC3F,oGAAoG;QACpG,oGAAoG;QACpG,kGAAkG;QAClG,2EAA2E;QAC3E,WAAW,EAAE,UAAU;aACpB,MAAM,CACL,CAAC,SAAiC,EAAW,EAAE,CAC7C,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CACjD;aACA,GAAG,CACF,CAAC,SAAiC,EAAU,EAAE,CAC5C,GAAG,SAAS,CAAC,QAAQ,2DAA2D;YAChF,gDAAgD,CACnD;KACJ,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,226 @@
1
+ import { type DeclaredExclusion } from './settings.js';
2
+ import type { WiringViolation } from './wiring-violation.js';
3
+ import type { MemberKind } from './workspace-policy.js';
4
+ /** The consumer files the wiring gate reads, injected so the core stays free of filesystem access. */
5
+ export interface WiringInputs {
6
+ readonly packageJson: unknown;
7
+ readonly eslintConfig: string | undefined;
8
+ /** The project's vitest config. The tests gate runs the project's vitest against it. */
9
+ readonly vitestConfig: string | undefined;
10
+ /**
11
+ * The project's Playwright config. Required rather than optional: ploaness ships the accessibility
12
+ * sweep as a managed spec, so every project has an end-to-end suite and something must run it.
13
+ */
14
+ readonly playwrightConfig: string | undefined;
15
+ /** The contents of pnpm-workspace.yaml, or an empty string when the project ships none. */
16
+ readonly workspaceFile: string;
17
+ /** Every exclusion the project declared, so the gate can refuse one that narrows by convenience. */
18
+ readonly declaredExclusions: readonly DeclaredExclusion[];
19
+ readonly biomeConfig: string | undefined;
20
+ readonly tsconfig: string | undefined;
21
+ /**
22
+ * Test-authoring libraries the consumer's own specs import, mapped to the version ploaness was built
23
+ * against. The CLI reads these from the ploaness config package rather than hard-coding them here, so
24
+ * a harness bump moves the expectation in one place.
25
+ */
26
+ readonly expectedTestLibraries: Readonly<Record<string, string>>;
27
+ /** The subset every project must declare, because its own specs import them. */
28
+ readonly requiredTestLibraries: ReadonlySet<string>;
29
+ /**
30
+ * The exact version every `@payloadcms/*` package must carry, which is the pinned `payload` version.
31
+ * Derived from the pin rather than enumerated, so a project that adds a Payload plugin is covered
32
+ * without ploaness listing it.
33
+ */
34
+ readonly payloadVersion: string | undefined;
35
+ /**
36
+ * The exact `packageManager` field the project must declare. The package manager resolves the whole
37
+ * dependency graph, so it is the one piece of toolchain that decides what every other pin means.
38
+ */
39
+ readonly requiredPackageManager: string | undefined;
40
+ /** The `engines` block the project must declare, so a project states the runtime ploaness requires. */
41
+ readonly requiredEngines: Readonly<Record<string, string>>;
42
+ /** The `files` block the consumer's biome.json must declare, from {@link requiredBiomeFiles}. */
43
+ readonly requiredBiomeFiles: Readonly<Record<string, unknown>>;
44
+ }
45
+ /** The exact script bodies ploaness owns. The consumer declares the name; ploaness dictates the command. */
46
+ export declare const REQUIRED_SCRIPTS: Readonly<Record<string, string>>;
47
+ /**
48
+ * The specifier a consumer biome.json must extend. Declared once here rather than written as a literal
49
+ * in both the rule and the scaffolder that writes the file the rule judges, so the two cannot drift.
50
+ */
51
+ export declare const REQUIRED_BIOME_EXTENDS: string;
52
+ /**
53
+ * The specifier a consumer tsconfig.json must extend: the literal file path, not the bare
54
+ * `ploaness/tsconfig` package specifier. TypeScript honours both, but a Payload project is also parsed
55
+ * by Next.js, which does not read a package exports map and fails on the bare form. Requiring the path
56
+ * that works everywhere is the difference between `tsc` passing and `next build` dying on a config it
57
+ * cannot resolve.
58
+ */
59
+ export declare const REQUIRED_TSCONFIG_EXTENDS: string;
60
+ /**
61
+ * The setup file a project writes for itself.
62
+ *
63
+ * Named here because four things have to agree about it and none of them can see the others: the Biome
64
+ * block below includes it, the shipped Vitest config loads it, the fast-check message tells a project to
65
+ * put a seed in it, and the ESLint config exempts it from a rule aimed at code rather than at process
66
+ * configuration. A name written four times is a name that eventually differs in one of them.
67
+ */
68
+ export declare const PROJECT_SETUP_FILE: string;
69
+ /**
70
+ * The `files` block a consumer's biome.json must carry verbatim.
71
+ *
72
+ * File selection cannot live in the shared config the way rule configuration does. Biome resolves a
73
+ * relative glob against the directory of the config that declares it, and the shared config sits inside
74
+ * node_modules, where `src/**` matches nothing; Biome then falls back to checking the entire tree. So
75
+ * ploaness dictates the block and the wiring gate enforces it byte for byte, which keeps ownership with
76
+ * the harness even though the text has to sit at the project root.
77
+ * @param sourceRoots the directories the project declared as holding first-party source.
78
+ * @returns the exact block a conforming biome.json declares.
79
+ */
80
+ export declare const requiredBiomeFiles: (sourceRoots: readonly string[], kind?: MemberKind, generatedArtefacts?: readonly string[]) => Readonly<Record<string, unknown>>;
81
+ /**
82
+ * The `include` and `exclude` a consumer's tsconfig.json must carry verbatim.
83
+ *
84
+ * The same constraint as {@link requiredBiomeFiles}, for the same reason: TypeScript resolves these globs
85
+ * against the directory of the config that declares them. Left in the shared config they would walk the
86
+ * ploaness package itself rather than the project, so they must sit at the project root while ploaness
87
+ * keeps ownership of their contents.
88
+ */
89
+ export declare const REQUIRED_TSCONFIG_PATHS: Readonly<Record<string, readonly string[]>>;
90
+ /**
91
+ * The `include` and `exclude` a member with no Next application must carry.
92
+ *
93
+ * The Payload globs name `next-env.d.ts` and two `.next` type directories. In a package that never runs
94
+ * Next those are carve-outs reaching nothing, which is itself a finding - so the kind that cannot have
95
+ * them does not claim them.
96
+ */
97
+ export declare const LIBRARY_TSCONFIG_PATHS: Readonly<Record<string, readonly string[]>>;
98
+ /**
99
+ * The `include` and `exclude` one member must carry, given the members nested inside it.
100
+ *
101
+ * The required `include` is a recursive TypeScript glob, which at a WORKSPACE ROOT sweeps every
102
+ * member's sources into the root's own project - under the ROOT's `paths`, where a member's `@/*`
103
+ * resolves to the wrong directory. eoc's root read the CMS scripts that way and failed `types` on
104
+ * imports that resolve perfectly well inside the CMS. Excluding them is not a relaxation: a member's
105
+ * analysis stops at its own boundary, which is the rule `knipConfig` already applies for the same
106
+ * reason, and each nested member is compiled by its own run.
107
+ *
108
+ * Derived rather than declared, so a member cannot exclude a sibling it does not contain and cannot
109
+ * forget one it does - and `ploaness init` writes exactly what the rule then asks for.
110
+ * @param base the paths for this member's kind.
111
+ * @param nestedMembers the repo-relative paths of the governed members inside this one.
112
+ * @returns the same paths, with every nested member excluded.
113
+ */
114
+ export declare const tsconfigPathsFor: (base: Readonly<Record<string, readonly string[]>>, nestedMembers: readonly string[]) => Readonly<Record<string, readonly string[]>>;
115
+ /**
116
+ * Everything a member of one kind must point at.
117
+ *
118
+ * Declared once and consumed by both the rule and `ploaness init`, for the reason the whole module
119
+ * exists: two literals that must stay equal will not, and that has already shipped a defect where the
120
+ * scaffolder wrote a project the gate then failed.
121
+ */
122
+ export interface MemberWiringTargets {
123
+ readonly biomeExtends: string;
124
+ readonly tsconfigExtends: string;
125
+ readonly tsconfigPaths: Readonly<Record<string, readonly string[]>>;
126
+ readonly eslintSpecifier: string;
127
+ readonly vitestSpecifier: string;
128
+ /** undefined when this kind has no application to drive, and so is not asked for a browser config. */
129
+ readonly playwrightSpecifier: string | undefined;
130
+ }
131
+ /**
132
+ * The wiring one kind of member must declare.
133
+ *
134
+ * A Next application receives the same configurations as a Payload one: it renders React, it builds
135
+ * through Next, and it serves pages a browser sweep can drive. What separates the two is the generated
136
+ * files only Payload has, which {@link requiredBiomeFiles} handles by kind rather than by a second
137
+ * configuration.
138
+ * @param kind the member's derived kind.
139
+ * @returns the specifiers and globs that kind is held to.
140
+ */
141
+ export declare const wiringTargetsFor: (kind: MemberKind) => MemberWiringTargets;
142
+ /**
143
+ * The files that must contain nothing but an import of a ploaness config and its default re-export.
144
+ *
145
+ * Exported because the ESLint configuration has to name them too: `unicorn/prefer-export-from` rewrites
146
+ * exactly this shape into `export { default } from '...'`, and it AUTOFIXES - so `ploaness format`
147
+ * turned a correctly wired project into one `wiring` then rejected, every time it ran. Two rules the
148
+ * harness owns, contradicting each other, with the formatter casting the deciding vote.
149
+ *
150
+ * The list is declared here, beside the rule that requires the shape, so the config that has to exempt
151
+ * them cannot fall out of step with it.
152
+ */
153
+ export declare const REEXPORT_CONFIG_FILES: readonly string[];
154
+ /** The repository-level files and declarations the wiring gate reads once, at the git root. */
155
+ export interface RepositoryWiringInputs {
156
+ readonly packageJson: unknown;
157
+ readonly workspaceFile: string;
158
+ readonly declaredExclusions: readonly DeclaredExclusion[];
159
+ readonly expectedTestLibraries: Readonly<Record<string, string>>;
160
+ readonly requiredPackageManager: string | undefined;
161
+ readonly requiredEngines: Readonly<Record<string, string>>;
162
+ /** Every dependency any member declares, so a root override can be judged against all of them. */
163
+ readonly declaredAcrossMembers: Readonly<Record<string, string>>;
164
+ /** Findings the CLI supplies from rules that need the member list rather than one manifest. */
165
+ readonly repositoryFindings: readonly WiringViolation[];
166
+ }
167
+ /** The files and declarations the wiring gate reads inside one member. */
168
+ export interface PackageWiringInputs {
169
+ readonly packageJson: unknown;
170
+ readonly kind: MemberKind;
171
+ /**
172
+ * Whether this member sits below the repository root. Biome refuses a second ROOT configuration in
173
+ * one tree, so a nested member has to say it is not one - and the shipped config cannot say it for
174
+ * the member, because `root` describes the file that declares it rather than the file it extends.
175
+ */
176
+ readonly isNestedMember: boolean;
177
+ /**
178
+ * The governed members nested INSIDE this one, repo-relative.
179
+ *
180
+ * Empty for every member of a single-package project and for a leaf member of a workspace; non-empty
181
+ * only for a member that contains others, which in practice is the workspace root.
182
+ */
183
+ readonly nestedMembers: readonly string[];
184
+ /** The `files` block this member's biome.json must carry, from {@link requiredBiomeFiles}. */
185
+ readonly requiredBiomeFiles: Readonly<Record<string, unknown>>;
186
+ readonly eslintConfig: string | undefined;
187
+ readonly vitestConfig: string | undefined;
188
+ readonly playwrightConfig: string | undefined;
189
+ readonly declaredExclusions: readonly DeclaredExclusion[];
190
+ readonly biomeConfig: string | undefined;
191
+ readonly tsconfig: string | undefined;
192
+ readonly expectedTestLibraries: Readonly<Record<string, string>>;
193
+ readonly requiredTestLibraries: ReadonlySet<string>;
194
+ readonly payloadVersion: string | undefined;
195
+ }
196
+ /**
197
+ * Return every way the repository has weakened or dropped its ploaness wiring.
198
+ *
199
+ * These are the declarations that exist once per repository however many packages it holds: the package
200
+ * manager that resolves the whole tree, the engines an installer reads, the scripts a run is invoked
201
+ * through, and the overrides pnpm honours only at the root.
202
+ * @param inputs the repository-level files to judge.
203
+ * @returns one violation per defect, in a stable order.
204
+ */
205
+ export declare const findRepositoryWiringViolations: (inputs: RepositoryWiringInputs) => readonly WiringViolation[];
206
+ /**
207
+ * Return every way one member has weakened or dropped its ploaness wiring.
208
+ *
209
+ * A library member is not asked for a Playwright configuration: it has no application to drive, and
210
+ * requiring the file would make a package fail for not having a browser it was never going to open.
211
+ * @param inputs the member's files to judge.
212
+ * @returns one violation per defect, in a stable order.
213
+ */
214
+ export declare const findPackageWiringViolations: (inputs: PackageWiringInputs) => readonly WiringViolation[];
215
+ /**
216
+ * The whole wiring contract for a repository holding exactly one package.
217
+ *
218
+ * Not a shim over the split: a single-package repository IS both scopes over one manifest, so composing
219
+ * the halves is what that case means. It is kept as an entry point because the behaviour it describes is
220
+ * pinned by a large spec written before the scopes existed - and that spec passing unchanged is the
221
+ * evidence the split dropped nothing.
222
+ * @param inputs the consumer files and expectations to judge.
223
+ * @returns one violation per defect, in a stable order.
224
+ */
225
+ export declare const findWiringViolations: (inputs: WiringInputs) => readonly WiringViolation[];
226
+ //# sourceMappingURL=wiring-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wiring-policy.d.ts","sourceRoot":"","sources":["../src/wiring-policy.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,iBAAiB,EAA6B,M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