@codyswann/lisa 4.96.2 → 4.96.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +7 -0
  2. package/all/copy-overwrite/scripts/lisa-audit.mjs +59 -0
  3. package/all/copy-overwrite/scripts/lisa-gates.mjs +30 -13
  4. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
  5. package/dist/cli/doctor-readiness-audit-allowlist.d.ts +19 -2
  6. package/dist/cli/doctor-readiness-audit-allowlist.d.ts.map +1 -1
  7. package/dist/cli/doctor-readiness-audit-allowlist.js +70 -17
  8. package/dist/cli/doctor-readiness-audit-allowlist.js.map +1 -1
  9. package/dist/cli/doctor-readiness-audit-scope.d.ts +24 -0
  10. package/dist/cli/doctor-readiness-audit-scope.d.ts.map +1 -0
  11. package/dist/cli/doctor-readiness-audit-scope.js +165 -0
  12. package/dist/cli/doctor-readiness-audit-scope.js.map +1 -0
  13. package/dist/cli/doctor-readiness-supply-chain-scan.js +1 -1
  14. package/dist/cli/doctor-readiness-supply-chain-scan.js.map +1 -1
  15. package/dist/cli/doctor-readiness-supply-chain.d.ts.map +1 -1
  16. package/dist/cli/doctor-readiness-supply-chain.js +4 -2
  17. package/dist/cli/doctor-readiness-supply-chain.js.map +1 -1
  18. package/dist/core/audit-capture.d.ts +31 -0
  19. package/dist/core/audit-capture.d.ts.map +1 -0
  20. package/dist/core/audit-capture.js +82 -0
  21. package/dist/core/audit-capture.js.map +1 -0
  22. package/dist/core/audit-exclusions.d.ts +32 -0
  23. package/dist/core/audit-exclusions.d.ts.map +1 -0
  24. package/dist/core/audit-exclusions.js +109 -0
  25. package/dist/core/audit-exclusions.js.map +1 -0
  26. package/dist/core/audit-field-names.d.ts +32 -0
  27. package/dist/core/audit-field-names.d.ts.map +1 -0
  28. package/dist/core/audit-field-names.js +107 -0
  29. package/dist/core/audit-field-names.js.map +1 -0
  30. package/dist/core/audit-lockfile.d.ts +9 -0
  31. package/dist/core/audit-lockfile.d.ts.map +1 -0
  32. package/dist/core/audit-lockfile.js +197 -0
  33. package/dist/core/audit-lockfile.js.map +1 -0
  34. package/dist/core/audit-manager.d.ts +8 -0
  35. package/dist/core/audit-manager.d.ts.map +1 -0
  36. package/dist/core/audit-manager.js +94 -0
  37. package/dist/core/audit-manager.js.map +1 -0
  38. package/dist/core/audit-matcher.d.ts +10 -0
  39. package/dist/core/audit-matcher.d.ts.map +1 -0
  40. package/dist/core/audit-matcher.js +103 -0
  41. package/dist/core/audit-matcher.js.map +1 -0
  42. package/dist/core/audit-report.d.ts +9 -0
  43. package/dist/core/audit-report.d.ts.map +1 -0
  44. package/dist/core/audit-report.js +132 -0
  45. package/dist/core/audit-report.js.map +1 -0
  46. package/dist/core/audit-types.d.ts +31 -0
  47. package/dist/core/audit-types.d.ts.map +1 -0
  48. package/dist/core/audit-types.js +2 -0
  49. package/dist/core/audit-types.js.map +1 -0
  50. package/dist/core/audit.d.ts +25 -0
  51. package/dist/core/audit.d.ts.map +1 -0
  52. package/dist/core/audit.js +53 -0
  53. package/dist/core/audit.js.map +1 -0
  54. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  55. package/dist/core/lisa-owned-hash-ledger.js +40 -0
  56. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  57. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  58. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  59. package/dist/core/upstream-evidence-manifest.js +52 -9
  60. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  61. package/package.json +11 -6
  62. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa/rules/eager/security-audit-handling.md +2 -2
  65. package/plugins/lisa/rules/reference/security-audit-handling.md +9 -0
  66. package/plugins/lisa-agy/plugin.json +1 -1
  67. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  69. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  70. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  74. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-copilot/rules/eager/security-audit-handling.md +2 -2
  76. package/plugins/lisa-copilot/rules/reference/security-audit-handling.md +9 -0
  77. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-cursor/rules/security-audit-handling-reference.mdc +9 -0
  79. package/plugins/lisa-cursor/rules/security-audit-handling.mdc +2 -2
  80. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  82. package/plugins/lisa-devin/rules/eager/security-audit-handling.md +2 -2
  83. package/plugins/lisa-devin/rules/reference/security-audit-handling.md +9 -0
  84. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  86. package/plugins/lisa-expo-agy/plugin.json +1 -1
  87. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  91. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  93. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  94. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  98. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  100. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  101. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  102. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  105. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  107. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  108. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  112. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  114. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  115. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  119. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  121. package/plugins/lisa-rails-agy/plugin.json +1 -1
  122. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  125. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  126. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  128. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  129. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  132. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  133. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  135. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  136. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  139. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  140. package/plugins/src/base/rules/eager/security-audit-handling.md +2 -2
  141. package/plugins/src/base/rules/reference/security-audit-handling.md +9 -0
  142. package/scripts/lisa-audit.mjs +59 -0
  143. package/scripts/two-channel-couplings.json +2 -2
  144. package/typescript/copy-contents/.husky/pre-push +5 -124
  145. package/typescript/copy-overwrite/.prettierignore +1 -0
  146. package/typescript/copy-overwrite/audit.ignore.config.json +6 -6
  147. package/typescript/package-lisa/package.lisa.json +4 -2
package/README.md CHANGED
@@ -186,6 +186,13 @@ any direct override in the current directory's `package.json`. It preserves the
186
186
  original error and does not change dependencies. Nested selectors and unreadable
187
187
  manifests remain unverified; this diagnostic is not a full lockfile audit.
188
188
 
189
+ Dependency-audit exceptions can be restricted to a package, affected versions,
190
+ and the lockfile paths whose risk was accepted. Prefer path scope when the
191
+ vulnerable copy belongs only to a development tool: a new vulnerable production
192
+ copy must still block delivery. Hooks, CI, and project audit commands use the
193
+ same matcher. See [dependency-audit exclusions](docs/dependency-audit-exclusions.md)
194
+ for the file format, lockfile keys, diagnostics, and shared helper.
195
+
189
196
  Clean TypeScript and CDK hosts receive the shared Node 24.21.0 LTS baseline,
190
197
  Vitest and coverage-v8 4.1.11 minimums, and a Vite 8.3.3 minimum within Vite 8.
191
198
  Lisa retains the TypeScript 6, ESLint 9, Knip 5, Husky 8 and Vitest 4 families.
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ // This file is managed by Lisa and IS replaced on each `lisa` run.
3
+ // Do not edit directly — durable changes belong upstream in Lisa.
4
+
5
+ /** Resolve the current Lisa package's canonical audit implementation. */
6
+ import { readFileSync } from "node:fs";
7
+ import { pathToFileURL } from "node:url";
8
+ import { resolve } from "node:path";
9
+
10
+ try {
11
+ const root = process.cwd();
12
+ const manifest = JSON.parse(
13
+ readFileSync(resolve(root, "package.json"), "utf8")
14
+ );
15
+ const source =
16
+ manifest.name === "@codyswann/lisa"
17
+ ? pathToFileURL(resolve(root, "dist/core/audit.js")).href
18
+ : "@codyswann/lisa/audit";
19
+ const { evaluateAuditReport, runDependencyAudit, detectAuditManager } =
20
+ await import(source);
21
+ const managerIndex = process.argv.indexOf("--manager");
22
+ const manager =
23
+ managerIndex < 0
24
+ ? detectAuditManager(root)
25
+ : process.argv[managerIndex + 1];
26
+ if (!["bun", "npm", "yarn"].includes(manager))
27
+ throw new Error("Unsupported audit package manager");
28
+ const verdict = process.argv.includes("--stdin")
29
+ ? evaluateAuditReport(root, manager, readFileSync(0, "utf8"))
30
+ : await runDependencyAudit(root, manager, {
31
+ attempts: process.env.LISA_AUDIT_ATTEMPTS,
32
+ retryDelay: process.env.LISA_AUDIT_RETRY_DELAY,
33
+ });
34
+ for (const message of verdict.messages) console.log(message);
35
+ console.log(
36
+ verdict.passed
37
+ ? "✅ No high or critical vulnerabilities found in production dependencies (excluding documented exceptions)"
38
+ : "❌ High or critical vulnerabilities found in production dependencies"
39
+ );
40
+ if (!verdict.passed)
41
+ console.log(
42
+ " Next step: upgrade or override the named copy; if it is dev-only and reviewed, add its lockfile path to `paths` in audit.ignore.local.json — see https://github.com/CodySwannGT/lisa/blob/main/docs/dependency-audit-exclusions.md"
43
+ );
44
+ process.exitCode = verdict.passed ? 0 : 1;
45
+ } catch (error) {
46
+ // Two different failures, worded so a gate runner can tell them apart. A
47
+ // capture that produced no usable report audited nothing: re-run it. Any
48
+ // other error is the project's own exclusion or lockfile input, which no
49
+ // re-run will fix, so it is reported as an invalid configuration.
50
+ console.error(
51
+ error?.name === "AuditCaptureError" ||
52
+ ["ERR_MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED"].includes(
53
+ error?.code
54
+ )
55
+ ? `❌ Security audit failed closed: ${error.message}`
56
+ : `❌ Security audit configuration invalid: ${error.message}`
57
+ );
58
+ process.exitCode = 1;
59
+ }
@@ -533,6 +533,9 @@ const KNIP = "knip";
533
533
  * stack, and says what to do about it.
534
534
  * - `shippedAs` names the script a template already ships for that concern,
535
535
  * where one exists, so an operator can point `run:` straight at it.
536
+ * - `fallbackWhenTaskMissing` retains an unconditional owned facade for
537
+ * callers whose older templates do not yet install a now-universal task.
538
+ * It never replaces an explicit task or a default the caller supplies.
536
539
  *
537
540
  * `shippedAs` is RESOLVED THROUGH, not merely documented — see `resolveMoment`.
538
541
  * Recording the alias and then never reading it (#2916) left the registry
@@ -892,12 +895,24 @@ export const REGISTRY = Object.freeze({
892
895
  label: "🔒 Security Scan",
893
896
  summary: "No known high or critical advisory in shipped dependencies.",
894
897
  task: SECURITY_AUDIT_TASK,
895
- declareOnly:
896
- "The prover is the package manager's own `audit`, which CI invokes natively alongside an exclusion list. There is no script form to ship.",
898
+ fallbackWhenTaskMissing: true,
897
899
  // Continuous matters most here: a CVE published today makes yesterday's
898
900
  // green wrong with no change to trigger a re-scan.
899
901
  moments: [...PUSH_ONWARD, CONTINUOUS],
900
902
  work: "manifests scanned",
903
+ // The canonical audit's own verdict lines (scripts/lisa-audit.mjs). The
904
+ // shipped classifier reads vitest and tsc, not this audit, so without them
905
+ // a real finding was reported UNPROVABLE — "nothing here is a verdict about
906
+ // the code" — about an audit that had named the uncovered copy (#4521).
907
+ // Deliberately NOT "Security audit failed closed": that is a capture that
908
+ // audited nothing (registry outage, garbage output), which must stay
909
+ // UNPROVABLE so the operator re-runs rather than hunts for a defect.
910
+ // A project's own `failure_shape` replaces this default; like any declared
911
+ // shape it is consulted only when nothing else classified the output.
912
+ failureShape: [
913
+ "❌ High or critical vulnerabilities found",
914
+ "Security audit configuration invalid",
915
+ ],
901
916
  },
902
917
  "static-security": {
903
918
  label: "🔍 Static Security Analysis",
@@ -1743,12 +1758,11 @@ const QUALITY_FALLBACKS = Object.freeze({
1743
1758
  steps: ["🌱 No environment reseed adapter declared"],
1744
1759
  },
1745
1760
  npm_security_scan: {
1746
- // Every package-manager branch fails when the audit yields no report
1747
- // (retried first — it is a network call), so a mode-only declaration may
1748
- // delegate here. Without the flag it fell through to `security:audit`, a
1749
- // descriptive task Lisa does not ship (#3359).
1761
+ // The workflow-owned action uses the canonical audit implementation and
1762
+ // fails when the provider yields no complete report. Older callers may
1763
+ // therefore delegate here before apply installs the now-shipped task.
1750
1764
  unconditional: true,
1751
- command: "<package-manager> audit, filtered through audit.ignore*.json",
1765
+ command: "workflow-owned canonical dependency-audit action",
1752
1766
  seedRun: [SECURITY_AUDIT_TASK],
1753
1767
  steps: ["📋 Load audit exclusions", "🔒 Run security audit"],
1754
1768
  },
@@ -5551,9 +5565,9 @@ export function resolveMoment({
5551
5565
  const task = declared ?? alias?.to ?? registryTask;
5552
5566
  const intercepts = Object.hasOwn(INTERCEPTORS, id);
5553
5567
  // A bare level declaration governs the façade that already proves this
5554
- // property; it does not invent a package script. `declareOnly` is the
5555
- // registry's explicit statement that the default task is descriptive and
5556
- // is not shipped. When the matching hard-coded invocation exists, keep the
5568
+ // property; it does not invent a package script. `declareOnly` identifies
5569
+ // an unshipped default; `fallbackWhenTaskMissing` retains the same route
5570
+ // for older callers when a default starts shipping. Keep the
5557
5571
  // declaration visible (so contexts and requiredness still derive from it)
5558
5572
  // but only delegate to an explicitly unconditional prover. A fallback that
5559
5573
  // skips for missing credentials or files cannot carry a required property.
@@ -5564,7 +5578,8 @@ export function resolveMoment({
5564
5578
  !entry.await &&
5565
5579
  !intercepts &&
5566
5580
  declared === null &&
5567
- definition?.declareOnly !== undefined &&
5581
+ (definition?.declareOnly !== undefined ||
5582
+ definition?.fallbackWhenTaskMissing === true) &&
5568
5583
  definition?.shippedAs === undefined &&
5569
5584
  ((scripts !== null &&
5570
5585
  typeof scripts === "object" &&
@@ -5619,8 +5634,10 @@ export function resolveMoment({
5619
5634
  // Carried on every resolved entry, including an awaited one. It describes
5620
5635
  // what the project SAID about this moment's prover, and the project said
5621
5636
  // it whatever mode the moment resolves to — the same argument `declared`
5622
- // makes one field up.
5623
- failureShape: entry[FAILURE_SHAPE_FIELD] ?? null,
5637
+ // makes one field up. Absent a declaration, a built-in's own known
5638
+ // verdict lines apply (today only the canonical dependency audit's).
5639
+ failureShape:
5640
+ entry[FAILURE_SHAPE_FIELD] ?? definition?.failureShape ?? null,
5624
5641
  mayRewrite: definition?.mayRewrite === true,
5625
5642
  costly: definition?.costly === true,
5626
5643
  });
@@ -1325,7 +1325,7 @@
1325
1325
  "children": []
1326
1326
  },
1327
1327
  "lisa-gates.mjs": {
1328
- "sha256": "28dd99fa96f43f4f68b5b442e7f24a59c834f0b1a5c4fde777aeb3689592668e",
1328
+ "sha256": "266abcb9f3add26efe0cee541503fb2bab652ebba65b9dccae2ff7826eee459b",
1329
1329
  "staticImports": [
1330
1330
  "lib/invoked-as-script.mjs",
1331
1331
  "node:crypto",
@@ -1,7 +1,24 @@
1
+ import { type ScopeAssessment } from "./doctor-readiness-audit-scope.js";
1
2
  /**
2
- * Collect the undocumented audit exceptions across every allowlist file.
3
+ * Assess every audit allowlist once, returning blocking and non-blocking lines.
4
+ *
5
+ * Scope is assessed across all files together, reading the lockfile at most
6
+ * once, because a narrower entry in one file changes what a wider entry in the
7
+ * other file means.
3
8
  * @param root - Repository root
4
- * @returns Evidence lines, one per undocumented exception
9
+ * @returns Violations (fail B5) and observations (reported, non-blocking)
10
+ */
11
+ export declare function assessAuditExceptions(root: string): Promise<ScopeAssessment>;
12
+ /**
13
+ * Collect the undocumented or invalidly scoped audit exceptions.
14
+ * @param root - Repository root
15
+ * @returns Evidence lines, one per violation
5
16
  */
6
17
  export declare function auditExceptionViolations(root: string): Promise<readonly string[]>;
18
+ /**
19
+ * Collect the non-blocking observations about advisory-wide exclusions.
20
+ * @param root - Repository root
21
+ * @returns Operator-language observations, one per ID-only exclusion
22
+ */
23
+ export declare function auditExceptionObservations(root: string): Promise<readonly string[]>;
7
24
  //# sourceMappingURL=doctor-readiness-audit-allowlist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-readiness-audit-allowlist.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-audit-allowlist.ts"],"names":[],"mappings":"AAgMA;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAiB5B"}
1
+ {"version":3,"file":"doctor-readiness-audit-allowlist.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-audit-allowlist.ts"],"names":[],"mappings":"AAoBA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mCAAmC,CAAC;AA+N3C;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,eAAe,CAAC,CAe1B;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAE5B;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAE5B"}
@@ -18,6 +18,7 @@
18
18
  * @module cli/doctor-readiness-audit-allowlist
19
19
  */
20
20
  import { isRecord, readFileOrNull } from "./doctor-readiness-shared.js";
21
+ import { assessExclusionScopes, } from "./doctor-readiness-audit-scope.js";
21
22
  /** Audit allowlists whose entries must each carry a decision record. */
22
23
  const ALLOWLIST_FILES = [
23
24
  "audit.ignore.config.json",
@@ -152,26 +153,78 @@ function undocumentedExceptions(file, parsed) {
152
153
  ];
153
154
  });
154
155
  }
156
+ /** Sentinel for a document that is not JSON (distinct from a JSON `null`). */
157
+ const UNPARSEABLE = Symbol("unparseable");
155
158
  /**
156
- * Collect the undocumented audit exceptions across every allowlist file.
159
+ * Parse an allowlist document without throwing.
160
+ * @param source - Raw file contents
161
+ * @returns The parsed value, or UNPARSEABLE when the text is not JSON
162
+ */
163
+ function parseAllowlist(source) {
164
+ try {
165
+ return JSON.parse(source);
166
+ }
167
+ catch {
168
+ return UNPARSEABLE;
169
+ }
170
+ }
171
+ /**
172
+ * Read one allowlist file: undocumented exceptions plus its exclusion entries.
157
173
  * @param root - Repository root
158
- * @returns Evidence lines, one per undocumented exception
174
+ * @param file - Repository-relative allowlist filename
175
+ * @returns What this file contributes
176
+ */
177
+ async function readAllowlistFile(root, file) {
178
+ const source = await readFileOrNull(root, file);
179
+ const parsed = source === null ? UNPARSEABLE : parseAllowlist(source);
180
+ if (parsed === UNPARSEABLE) {
181
+ // An absent or unparseable allowlist establishes nothing about its
182
+ // entries, so it is passed over rather than reported as undocumented.
183
+ return { undocumented: [], exclusions: [] };
184
+ }
185
+ return {
186
+ undocumented: undocumentedExceptions(file, parsed),
187
+ // audit-ci's `.nsprc` is not read by the canonical matcher, so its entries
188
+ // carry no Lisa scope to validate.
189
+ exclusions: file === ".nsprc"
190
+ ? []
191
+ : exceptionEntries(parsed).map(entry => ({ file, ...entry })),
192
+ };
193
+ }
194
+ /**
195
+ * Assess every audit allowlist once, returning blocking and non-blocking lines.
196
+ *
197
+ * Scope is assessed across all files together, reading the lockfile at most
198
+ * once, because a narrower entry in one file changes what a wider entry in the
199
+ * other file means.
200
+ * @param root - Repository root
201
+ * @returns Violations (fail B5) and observations (reported, non-blocking)
202
+ */
203
+ export async function assessAuditExceptions(root) {
204
+ const files = await Promise.all(ALLOWLIST_FILES.map(file => readAllowlistFile(root, file)));
205
+ const scopes = assessExclusionScopes(root, files.flatMap(file => file.exclusions));
206
+ return {
207
+ violations: [
208
+ ...files.flatMap(file => file.undocumented),
209
+ ...scopes.violations,
210
+ ],
211
+ observations: scopes.observations,
212
+ };
213
+ }
214
+ /**
215
+ * Collect the undocumented or invalidly scoped audit exceptions.
216
+ * @param root - Repository root
217
+ * @returns Evidence lines, one per violation
159
218
  */
160
219
  export async function auditExceptionViolations(root) {
161
- const perFile = await Promise.all(ALLOWLIST_FILES.map(async (file) => {
162
- const source = await readFileOrNull(root, file);
163
- if (source === null) {
164
- return [];
165
- }
166
- try {
167
- return undocumentedExceptions(file, JSON.parse(source));
168
- }
169
- catch {
170
- // An unparseable allowlist establishes nothing about its entries, so it
171
- // is passed over rather than reported as an undocumented exception.
172
- return [];
173
- }
174
- }));
175
- return perFile.flat();
220
+ return (await assessAuditExceptions(root)).violations;
221
+ }
222
+ /**
223
+ * Collect the non-blocking observations about advisory-wide exclusions.
224
+ * @param root - Repository root
225
+ * @returns Operator-language observations, one per ID-only exclusion
226
+ */
227
+ export async function auditExceptionObservations(root) {
228
+ return (await assessAuditExceptions(root)).observations;
176
229
  }
177
230
  //# sourceMappingURL=doctor-readiness-audit-allowlist.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-readiness-audit-allowlist.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-audit-allowlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EA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M,CAAC,CAAC,CAAC;QAC1D,CAAC;QAAC,MAAM,CAAC;YACP,wEAAwE;YACxE,oEAAoE;YACpE,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CACH,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC"}
1
+ {"version":3,"file":"doctor-readiness-audit-allowlist.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-audit-allowlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,qBAAqB,GAGtB,MAAM,mCAAmC,CAAC;AAE3C,wEAAwE;AACxE,MAAM,eAAe,GAAsB;IACzC,0BAA0B;IAC1B,yBAAyB;IACzB,QAAQ;CACT,CAAC;AAEF,yEAAyE;AACzE,MAAM,aAAa,GAAsB;IACvC,QAAQ;IACR,OAAO;IACP,eAAe;IACf,UAAU;IACV,WAAW;IACX,SAAS;CACV,CAAC;AAEF;;;;;GAKG;AACH,MAAM,oBAAoB,GAAsB;IAC9C,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;CACZ,CAAC;AAEF;;;;GAIG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAUD;;;;;;;;;;GAUG;AACH,SAAS,iBAAiB,CACxB,KAA8B,EAC9B,KAAa;IAEb,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3D,OAAO,KAAK,CAAC,EAAE,CAAC;IAClB,CAAC;IACD,OAAO,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OA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GAAG,qBAAqB,CAClC,IAAI,EACJ,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CACvC,CAAC;IACF,OAAO;QACL,UAAU,EAAE;YACV,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;YAC3C,GAAG,MAAM,CAAC,UAAU;SACrB;QACD,YAAY,EAAE,MAAM,CAAC,YAAY;KAClC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,IAAY;IAEZ,OAAO,CAAC,MAAM,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAAY;IAEZ,OAAO,CAAC,MAAM,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,24 @@
1
+ /** One exclusion as the doctor found it, with the file it came from. */
2
+ export interface LocatedExclusion {
3
+ /** Repository-relative allowlist filename. */
4
+ readonly file: string;
5
+ /** Operator-facing identity: an advisory id, a package name, or a position. */
6
+ readonly id: string;
7
+ /** The entry's fields, or null when the entry was a bare string. */
8
+ readonly fields: Record<string, unknown> | null;
9
+ }
10
+ /** What the doctor established about exclusion scopes. */
11
+ export interface ScopeAssessment {
12
+ /** Invalid or unprovable scopes: each one fails B5. */
13
+ readonly violations: readonly string[];
14
+ /** Valid but wide or shadowed exclusions: reported, never blocking. */
15
+ readonly observations: readonly string[];
16
+ }
17
+ /**
18
+ * Assess every located exclusion's scope with the gate's own validator.
19
+ * @param root - Project root containing the exact lockfile
20
+ * @param exclusions - Exclusions from the doctor's allowlist files
21
+ * @returns Violations (fail B5) and observations (reported, non-blocking)
22
+ */
23
+ export declare function assessExclusionScopes(root: string, exclusions: readonly LocatedExclusion[]): ScopeAssessment;
24
+ //# sourceMappingURL=doctor-readiness-audit-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-readiness-audit-scope.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-audit-scope.ts"],"names":[],"mappings":"AAoBA,wEAAwE;AACxE,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAkKD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,SAAS,gBAAgB,EAAE,GACtC,eAAe,CAkBjB"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Scope assessment for audit exclusions, shared by the B5 readiness producer
3
+ * (#4521).
4
+ *
5
+ * The doctor validates every exclusion with the gate's own validator rather
6
+ * than a second grammar, so the doctor and the gate cannot disagree about what
7
+ * an entry means. What the gate accepts but an operator should still hear about
8
+ * — an exclusion that hides every copy of a package, or a wide entry the gate
9
+ * sets aside because a narrower one exists — is returned as a non-blocking
10
+ * observation in plain language, never as a console line nobody reads.
11
+ * @module cli/doctor-readiness-audit-scope
12
+ */
13
+ import { auditScopeProblems, classifyUnknownFields, detectAuditManager, requiresLockfileScope, } from "../core/audit.js";
14
+ import { readAuditCopies } from "../core/audit-lockfile.js";
15
+ /** The fix every wide-exclusion observation recommends. */
16
+ const NARROW_IT = "If the risky copy is only used by development tools, add `versions` and " +
17
+ "`paths` so only that copy is excused.";
18
+ /**
19
+ * Explain an exclusion that hides every copy, in words an operator can act on.
20
+ *
21
+ * Legal (legacy files keep working) but exactly the case #4521 exists for: a
22
+ * later vulnerable copy used in production would be hidden too.
23
+ * @param exclusion - The located exclusion
24
+ * @param pkg - The package it names, if any
25
+ * @returns One operator-language observation
26
+ */
27
+ function wideObservation(exclusion, pkg) {
28
+ const scope = typeof pkg === "string"
29
+ ? `every copy of \`${pkg}\`: the entry for \`${exclusion.id}\` names no version range or lockfile path`
30
+ : `every copy of the affected package: the entry for \`${exclusion.id}\` names no package, version range or lockfile path`;
31
+ return (`\`${exclusion.file}\` hides this advisory for ${scope}, so a later copy ` +
32
+ `used in production would also be hidden. ${NARROW_IT}`);
33
+ }
34
+ /**
35
+ * Read the lockfile once, and report why scoped coverage cannot be established.
36
+ * @param root - Project root
37
+ * @returns The read failure message, or null when the lockfile is readable
38
+ */
39
+ function lockfileFailure(root) {
40
+ try {
41
+ readAuditCopies(root, detectAuditManager(root));
42
+ return null;
43
+ }
44
+ catch (error) {
45
+ return error.message;
46
+ }
47
+ }
48
+ /**
49
+ * The identifiers a finding can match an entry by: its `id` and its `cve`.
50
+ * @param fields - Exclusion fields
51
+ * @returns The entry's advisory identifiers
52
+ */
53
+ function advisoryIds(fields) {
54
+ return [fields.id, fields.cve]
55
+ .filter(value => typeof value === "string" || typeof value === "number")
56
+ .map(String);
57
+ }
58
+ /**
59
+ * Where a narrower entry sets a wide one aside, mirroring the matcher's
60
+ * `narrowestCandidates`: both must name the same advisory (by id or CVE), and
61
+ * both must apply to the finding's package.
62
+ * @param wide - Fields of an entry without paths/versions
63
+ * @param other - Fields of a candidate narrower entry
64
+ * @returns null when `other` never sets `wide` aside; "all" when it does for
65
+ * every finding `wide` covers; otherwise the one package it does so for
66
+ */
67
+ function narrows(wide, other) {
68
+ const sameAdvisory = advisoryIds(other).some(id => advisoryIds(wide).includes(id));
69
+ if (!sameAdvisory || !requiresLockfileScope(other))
70
+ return null;
71
+ if (other.package === undefined || other.package === wide.package)
72
+ return "all";
73
+ // A package-less wide entry still decides findings in other packages.
74
+ return wide.package === undefined ? String(other.package) : null;
75
+ }
76
+ /**
77
+ * Name wide entries the gate sets aside because a narrower one exists.
78
+ *
79
+ * The matcher lets only paths/versions entries decide an advisory once one
80
+ * exists for that package, so a package-wide or advisory-wide entry for the
81
+ * same advisory no longer excuses anything. That is safe, but an operator who
82
+ * expects the wide entry to apply should be told why it does not.
83
+ * @param valid - Active exclusions whose scope is valid
84
+ * @returns One observation per shadowed wide entry
85
+ */
86
+ function shadowObservations(valid) {
87
+ return valid.flatMap(wide => {
88
+ const wideFields = wide.fields ?? {};
89
+ if (requiresLockfileScope(wideFields))
90
+ return [];
91
+ const shadows = valid.flatMap(other => {
92
+ const scope = other === wide ? null : narrows(wideFields, other.fields ?? {});
93
+ return scope === null ? [] : [{ other, scope }];
94
+ });
95
+ const full = shadows.find(entry => entry.scope === "all");
96
+ if (full)
97
+ return [
98
+ `\`${wide.file}\` excuses advisory \`${wide.id}\` for every copy, but ` +
99
+ `\`${full.other.file}\` lists the specific copies that were reviewed, ` +
100
+ "so the audit uses only that narrower entry and ignores the wider " +
101
+ "one. Remove the wider entry, or widen the narrower one, if that is " +
102
+ "not what you meant.",
103
+ ];
104
+ return shadows.map(({ other, scope }) => `\`${wide.file}\` excuses advisory \`${wide.id}\` for every package, ` +
105
+ `but \`${other.file}\` lists the reviewed copies of \`${scope}\`, so ` +
106
+ `the audit ignores the wider entry only for \`${scope}\` and still ` +
107
+ "applies it to every other package.");
108
+ });
109
+ }
110
+ /**
111
+ * Assess one live exclusion.
112
+ * @param exclusion - The located exclusion
113
+ * @param lockfile - The single lockfile read's failure message, or null
114
+ * @returns The entry's violations and observations
115
+ */
116
+ function assessOne(exclusion, lockfile) {
117
+ const fields = exclusion.fields ?? {};
118
+ const where = `${exclusion.file}: ${exclusion.id}`;
119
+ const problems = auditScopeProblems(fields);
120
+ if (problems.length)
121
+ return {
122
+ exclusion,
123
+ valid: false,
124
+ violations: problems.map(problem => `${where}: ${problem}`),
125
+ observations: [],
126
+ };
127
+ const ignored = classifyUnknownFields(fields).ignored.map(key => `\`${exclusion.file}\`: the entry for \`${exclusion.id}\` has an ` +
128
+ `unrecognized field \`${key}\`, which the audit ignores. It changes ` +
129
+ "nothing about what is excused; use `reason` or `notes` for the decision.");
130
+ if (!requiresLockfileScope(fields))
131
+ return {
132
+ exclusion,
133
+ valid: true,
134
+ violations: [],
135
+ observations: [wideObservation(exclusion, fields.package), ...ignored],
136
+ };
137
+ return {
138
+ exclusion,
139
+ valid: true,
140
+ violations: lockfile === null ? [] : [`${where}: ${lockfile}`],
141
+ observations: ignored,
142
+ };
143
+ }
144
+ /**
145
+ * Assess every located exclusion's scope with the gate's own validator.
146
+ * @param root - Project root containing the exact lockfile
147
+ * @param exclusions - Exclusions from the doctor's allowlist files
148
+ * @returns Violations (fail B5) and observations (reported, non-blocking)
149
+ */
150
+ export function assessExclusionScopes(root, exclusions) {
151
+ const live = exclusions.filter(entry => entry.fields !== null && entry.fields.active !== false);
152
+ // Read the lockfile once per doctor run, and only when some entry needs it.
153
+ const lockfile = live.some(entry => requiresLockfileScope(entry.fields ?? {}))
154
+ ? lockfileFailure(root)
155
+ : null;
156
+ const assessed = live.map(exclusion => assessOne(exclusion, lockfile));
157
+ return {
158
+ violations: assessed.flatMap(entry => entry.violations),
159
+ observations: [
160
+ ...assessed.flatMap(entry => entry.observations),
161
+ ...shadowObservations(assessed.filter(entry => entry.valid).map(entry => entry.exclusion)),
162
+ ],
163
+ };
164
+ }
165
+ //# sourceMappingURL=doctor-readiness-audit-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor-readiness-audit-scope.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-audit-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,q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 @@ export function isFloatingSpec(spec) {
144
144
  * nothing about the dependency tree, and counting it would be a false green —
145
145
  * the worst direction to err for a confidence model.
146
146
  */
147
- const AUDIT_GATE_PATTERN = /\b(npm|bun|yarn|pnpm)\s+audit\b|audit-ci|osv-scanner|dependency-review-action|\bsnyk\b|\btrivy\b|\bgrype\b/i;
147
+ const AUDIT_GATE_PATTERN = /\b(npm|bun|yarn|pnpm)\s+audit\b|lisa-audit\.mjs|audit-ci|osv-scanner|dependency-review-action|\bsnyk\b|\btrivy\b|\bgrype\b/i;
148
148
  /** Package managers whose install command can enforce a committed lockfile. */
149
149
  const FROZEN_INSTALL_MANAGERS = new Set([
150
150
  "bun",
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-readiness-supply-chain-scan.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,qBAAqB;IACrB,WAAW;IACX,gBAAgB;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,cAAc;IACd,iBAAiB;IACjB,sBAAsB;IACtB,WAAW;IACX,aAAa;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IAClD,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;CACN,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,eAAe,GAAsB;IACzC,YAAY;IACZ,OAAO;IACP,OAAO;IACP,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C,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CACzE,CAAC,IAAI,EAAE;QACR,GAAG,UAAU;KACd,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChD,IAAI,MAAM,KAAK,IAAI,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"doctor-readiness-supply-chain-scan.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,qBAAqB;IACrB,WAAW;IACX,gBAAgB;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,cAAc;IACd,iBAAiB;IACjB,sBAAsB;IACtB,WAAW;IACX,aAAa;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IAClD,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;CACN,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,eAAe,GAAs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CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CACzE,CAAC,IAAI,EAAE;QACR,GAAG,UAAU;KACd,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChD,IAAI,MAAM,KAAK,IAAI,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-readiness-supply-chain.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,OAAO,EAAE,sCAAsC,EAAE,MAAM,8CAA8C,CAAC;AA2KtG;;;;;;;;GAQG;AACH,wBAAsB,sCAAsC,CAC1D,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,wBAAwB,CAAC,CAiEnC"}
1
+ {"version":3,"file":"doctor-readiness-supply-chain.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,OAAO,EAAE,sCAAsC,EAAE,MAAM,8CAA8C,CAAC;AA6KtG;;;;;;;;GAQG;AACH,wBAAsB,sCAAsC,CAC1D,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,wBAAwB,CAAC,CAiEnC"}
@@ -28,7 +28,7 @@
28
28
  * @module cli/doctor-readiness-supply-chain
29
29
  */
30
30
  import { informationalFindings } from "./doctor-readiness-shared.js";
31
- import { auditExceptionViolations } from "./doctor-readiness-audit-allowlist.js";
31
+ import { assessAuditExceptions } from "./doctor-readiness-audit-allowlist.js";
32
32
  import { collectSpecs, findAuditGate, findLockfile, findLockfileInstallGate, readManifest, } from "./doctor-readiness-supply-chain-scan.js";
33
33
  import { assessRubyDependenciesSupplyChainDimension } from "./doctor-readiness-supply-chain-ruby-assess.js";
34
34
  import { assessPythonDependenciesSupplyChainDimension } from "./doctor-readiness-supply-chain-python-assess.js";
@@ -49,6 +49,7 @@ async function collectFindings(root, specs, manifests, workspaces) {
49
49
  const lockfile = await findLockfile(root);
50
50
  const lockfileInstallGate = lockfile === null ? null : await findLockfileInstallGate(root);
51
51
  const auditGate = await findAuditGate(root);
52
+ const exceptions = await assessAuditExceptions(root);
52
53
  const inputs = {
53
54
  auditGate,
54
55
  lockfile,
@@ -60,10 +61,11 @@ async function collectFindings(root, specs, manifests, workspaces) {
60
61
  violations: [
61
62
  ...dependencyConfidenceViolations(inputs),
62
63
  ...installTimeExecutionViolations(manifests),
63
- ...(await auditExceptionViolations(root)),
64
+ ...exceptions.violations,
64
65
  ],
65
66
  observations: [
66
67
  ...dependencyConfidenceObservations(inputs),
68
+ ...exceptions.observations,
67
69
  ...(workspaces.declared ? [workspaceObservation(workspaces)] : []),
68
70
  ],
69
71
  };