@codyswann/lisa 2.300.10 → 2.300.12
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/cli/doctor-readiness-guardrails.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-guardrails.js +70 -0
- package/dist/cli/doctor-readiness-guardrails.js.map +1 -1
- package/dist/cli/doctor-readiness-operations.d.ts +10 -0
- package/dist/cli/doctor-readiness-operations.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-operations.js +27 -15
- package/dist/cli/doctor-readiness-operations.js.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-evidence.d.ts +48 -0
- package/dist/cli/doctor-readiness-supply-chain-evidence.d.ts.map +1 -0
- package/dist/cli/doctor-readiness-supply-chain-evidence.js +163 -0
- package/dist/cli/doctor-readiness-supply-chain-evidence.js.map +1 -0
- package/dist/cli/doctor-readiness-supply-chain.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain.js +24 -69
- package/dist/cli/doctor-readiness-supply-chain.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +3 -0
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-readiness-guardrails.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-guardrails.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,iCAAiC,CAAC;AAEzC,gFAAgF;AAChF,eAAO,MAAM,gCAAgC,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor-readiness-guardrails.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-guardrails.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,iCAAiC,CAAC;AAEzC,gFAAgF;AAChF,eAAO,MAAM,gCAAgC,wBAAwB,CAAC;AAyXtE;;;;;;;;GAQG;AACH,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,MAAM,EACZ,eAAe,CAAC,EAAE,SAAS,cAAc,EAAE,GAC1C,OAAO,CAAC,wBAAwB,CAAC,CAgCnC"}
|
|
@@ -85,6 +85,26 @@ const PRODUCTION_MARKERS = [
|
|
|
85
85
|
/--env(ironment)?[= ]prod/,
|
|
86
86
|
/\bprod(uction)?\.tfvars\b/,
|
|
87
87
|
];
|
|
88
|
+
/**
|
|
89
|
+
* Action/reusable-workflow evidence that may hide consequential behavior behind
|
|
90
|
+
* an opaque implementation this offline scanner cannot inspect.
|
|
91
|
+
*/
|
|
92
|
+
const OPAQUE_CONSEQUENTIAL_ACTIONS = [
|
|
93
|
+
/\bterraform\b/,
|
|
94
|
+
/\bpulumi\b/,
|
|
95
|
+
/\bserverless\b/,
|
|
96
|
+
/\bdeploy\b/,
|
|
97
|
+
/\bdestroy\b/,
|
|
98
|
+
/\bmigrat(e|ion)\b/,
|
|
99
|
+
];
|
|
100
|
+
/** Inputs that make an opaque action/reusable workflow look consequential. */
|
|
101
|
+
const OPAQUE_CONSEQUENTIAL_INPUTS = [
|
|
102
|
+
/\bdestroy\b/,
|
|
103
|
+
/\bremove\b/,
|
|
104
|
+
/\bdelete\b/,
|
|
105
|
+
/\bapply\b[^\n]*-auto-approve\b/,
|
|
106
|
+
/\bprod(uction)?\b/,
|
|
107
|
+
];
|
|
88
108
|
/**
|
|
89
109
|
* Collapse only shell continuation newlines. Ordinary newlines remain command
|
|
90
110
|
* boundaries so unrelated invocations cannot combine into one Terraform apply.
|
|
@@ -197,6 +217,54 @@ function servicesDeferral(_workflow, job, step) {
|
|
|
197
217
|
"and thrown away inside the run, so whether the operation targets a durable " +
|
|
198
218
|
"environment is not established either way");
|
|
199
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Whether an opaque action/reusable call has enough local text to be named as
|
|
222
|
+
* an unassessed consequential surface.
|
|
223
|
+
* @param id - The `uses:` target
|
|
224
|
+
* @param inputs - Serialized `with:`/`env:` text adjacent to the call
|
|
225
|
+
* @returns True when the call should be surfaced as unresolved
|
|
226
|
+
*/
|
|
227
|
+
function looksLikeOpaqueConsequentialCall(id, inputs) {
|
|
228
|
+
const evidence = `${id}\n${inputs}`.toLowerCase();
|
|
229
|
+
return (OPAQUE_CONSEQUENTIAL_ACTIONS.some(pattern => pattern.test(evidence)) &&
|
|
230
|
+
OPAQUE_CONSEQUENTIAL_INPUTS.some(pattern => pattern.test(evidence)) &&
|
|
231
|
+
!looksEphemeral(evidence));
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* State why a reusable workflow call may hide consequential behavior this file
|
|
235
|
+
* cannot inspect.
|
|
236
|
+
* @param workflow - The workflow declaring the job
|
|
237
|
+
* @param job - The reusable workflow job
|
|
238
|
+
* @returns A stated reason, or null when the call does not look consequential
|
|
239
|
+
*/
|
|
240
|
+
function reusableCallDeferral(workflow, job) {
|
|
241
|
+
if (job.uses === "" ||
|
|
242
|
+
!looksLikeOpaqueConsequentialCall(job.uses, job.inputs)) {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
return (`\`${workflow.file}\` job \`${job.id}\` calls reusable workflow ` +
|
|
246
|
+
`\`${job.uses}\` with consequential-looking inputs; this offline read ` +
|
|
247
|
+
"cannot inspect the called workflow implementation, so whether it runs an " +
|
|
248
|
+
"irreversible or expensive operation is not established either way");
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* State why an action step may hide consequential behavior this file cannot
|
|
252
|
+
* inspect.
|
|
253
|
+
* @param workflow - The workflow declaring the job
|
|
254
|
+
* @param job - The job declaring the action step
|
|
255
|
+
* @param step - The action step
|
|
256
|
+
* @returns A stated reason, or null when the action does not look consequential
|
|
257
|
+
*/
|
|
258
|
+
function actionStepDeferral(workflow, job, step) {
|
|
259
|
+
if (step.uses === "" ||
|
|
260
|
+
!looksLikeOpaqueConsequentialCall(step.uses, step.inputs)) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
return (`\`${workflow.file}\` job \`${job.id}\` uses action ` +
|
|
264
|
+
`\`${step.uses}\` with consequential-looking inputs; this offline read ` +
|
|
265
|
+
"cannot inspect the action implementation, so whether it runs an " +
|
|
266
|
+
"irreversible or expensive operation is not established either way");
|
|
267
|
+
}
|
|
200
268
|
/**
|
|
201
269
|
* Build the rubric-shaped B4 finding from the operations it cites.
|
|
202
270
|
* @param scan - The consequential-operation scan
|
|
@@ -274,6 +342,8 @@ export async function assessFeedbackGuardrailsDimension(root, parsedWorkflows) {
|
|
|
274
342
|
const scan = scanCommands(workflows, isConsequential, {
|
|
275
343
|
unresolvedWorkflow: lifecycleDeferral,
|
|
276
344
|
unresolvedStep: servicesDeferral,
|
|
345
|
+
unresolvedJobCall: reusableCallDeferral,
|
|
346
|
+
unresolvedActionStep: actionStepDeferral,
|
|
277
347
|
});
|
|
278
348
|
const runbook = await hasCheckedInRunbook(root);
|
|
279
349
|
if (scan.ungated.length === 0 || runbook) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-readiness-guardrails.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-guardrails.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAEd,YAAY,GACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAIL,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AAEzC,gFAAgF;AAChF,MAAM,CAAC,MAAM,gCAAgC,GAAG,qBAAqB,CAAC;AAEtE,mFAAmF;AACnF,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC,8EAA8E;AAC9E,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;;;;GAIG;AACH,MAAM,4BAA4B,GAChC,uEAAuE;IACvE,wEAAwE;IACxE,uEAAuE;IACvE,8EAA8E;IAC9E,qEAAqE;IACrE,2DAA2D,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,iBAAiB,GAAsB;IAC3C,kCAAkC;IAClC,mBAAmB;IACnB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;CAC1B,CAAC;AAEF,mFAAmF;AACnF,MAAM,eAAe,GAAG,kCAAkC,CAAC;A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AAS,EAAE,eAAe,EAAE;QACpD,kBAAkB,EAAE,iBAAiB;QACrC,cAAc,EAAE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"doctor-readiness-guardrails.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-guardrails.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAEd,YAAY,GACb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAIL,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AAEzC,gFAAgF;AAChF,MAAM,CAAC,MAAM,gCAAgC,GAAG,qBAAqB,CAAC;AAEtE,mFAAmF;AACnF,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC,8EAA8E;AAC9E,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC;;;;GAIG;AACH,MAAM,4BAA4B,GAChC,uEAAuE;IACvE,wEAAwE;IACxE,uEAAuE;IACvE,8EAA8E;IAC9E,qEAAqE;IACrE,2DAA2D,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,iBAAiB,GAAsB;IAC3C,kCAAkC;IAClC,mBAAmB;IACnB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;CAC1B,CAAC;AAEF,mFAAmF;AACnF,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,iDAAiD;AACjD,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAEvD,kEAAkE;AAClE,MAAM,2BAA2B,GAC/B,gEAAgE,CAAC;AAEnE,2EAA2E;AAC3E,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAElD;;;;GAIG;AACH,MAAM,kBAAkB,GAAsB;IAC5C,qBAAqB;IACrB,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM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AAiB,EAAE,oBAAoB;QACvC,oBAAoB,EAAE,kBAAkB;KACzC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,EAAE,CAAC;QACzC,OAAO,UAAU,CACf,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EACrE,SAAS,CAAC,MAAM,EAChB,OAAO,CACR,CAAC;IACJ,CAAC;IACD,OAAO;QACL,EAAE,EAAE,gCAAgC;QACpC,4EAA4E;QAC5E,kEAAkE;QAClE,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE;YACR,iBAAiB,CAAC,IAAI,CAAC;YACvB,mEAAmE;YACnE,oEAAoE;YACpE,GAAG,qBAAqB,CAAC;gBACvB,4BAA4B;gBAC5B,GAAG,IAAI,CAAC,UAAU;aACnB,CAAC;SACH;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -40,6 +40,16 @@ export interface ScanOptions {
|
|
|
40
40
|
* matching commands.
|
|
41
41
|
*/
|
|
42
42
|
readonly unresolvedStep?: (workflow: ParsedWorkflow, job: ParsedWorkflowJob, step: ParsedWorkflowStep) => string | null;
|
|
43
|
+
/**
|
|
44
|
+
* A job-level reusable workflow call reason the scan cannot settle offline,
|
|
45
|
+
* returning `null` when the call carries no relevant evidence.
|
|
46
|
+
*/
|
|
47
|
+
readonly unresolvedJobCall?: (workflow: ParsedWorkflow, job: ParsedWorkflowJob) => string | null;
|
|
48
|
+
/**
|
|
49
|
+
* An action step reason the scan cannot settle offline, returning `null` when
|
|
50
|
+
* the action carries no relevant evidence.
|
|
51
|
+
*/
|
|
52
|
+
readonly unresolvedActionStep?: (workflow: ParsedWorkflow, job: ParsedWorkflowJob, step: ParsedWorkflowStep) => string | null;
|
|
43
53
|
}
|
|
44
54
|
/**
|
|
45
55
|
* Whether any text — a command, a job's `env:` block, or the two together —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-readiness-operations.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-operations.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAEzC,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,wDAAwD;AACxD,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC;IACzD;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,MAAM,GAAG,IAAI,CAAC;IAC1E;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,MAAM,GAAG,IAAI,CAAC;IACnE;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CACxB,QAAQ,EAAE,cAAc,EACxB,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAE,kBAAkB,K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,OAAO,CAMhE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAa7D;AAgFD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,OAAO,EAAE,gBAAgB,EACzB,OAAO,GAAE,WAAgB,GACxB,aAAa,CAef;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWxE;AAsBD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,KAAK,EAAE,MAAM,GACZ,MAAM,CAaR"}
|
|
@@ -218,30 +218,42 @@ function unresolvedReason(workflow, job) {
|
|
|
218
218
|
* @returns The classified outcomes for this job (empty when nothing matched)
|
|
219
219
|
*/
|
|
220
220
|
function classifyJob(workflow, job, matches, options) {
|
|
221
|
+
const unresolvedCalls = [
|
|
222
|
+
options.unresolvedJobCall?.(workflow, job),
|
|
223
|
+
...job.steps.map(step => options.unresolvedActionStep?.(workflow, job, step)),
|
|
224
|
+
].flatMap(reason => reason === undefined || reason === null
|
|
225
|
+
? []
|
|
226
|
+
: [{ kind: "unresolved", reason }]);
|
|
221
227
|
const hits = job.steps.filter(step => step.run !== "" && matches(step.run.toLowerCase(), job, step));
|
|
222
228
|
if (hits.length === 0) {
|
|
223
|
-
return
|
|
229
|
+
return unresolvedCalls;
|
|
224
230
|
}
|
|
225
231
|
if (!runsUnattended(workflow)) {
|
|
226
|
-
return [
|
|
232
|
+
return [
|
|
233
|
+
{ kind: "unresolved", reason: unresolvedReason(workflow, job) },
|
|
234
|
+
...unresolvedCalls,
|
|
235
|
+
];
|
|
227
236
|
}
|
|
228
237
|
const deferred = options.unresolvedWorkflow?.(workflow) ?? options.unresolvedJob?.(job);
|
|
229
238
|
if (deferred !== undefined && deferred !== null) {
|
|
230
|
-
return [{ kind: "unresolved", reason: deferred }];
|
|
239
|
+
return [{ kind: "unresolved", reason: deferred }, ...unresolvedCalls];
|
|
231
240
|
}
|
|
232
241
|
const jobGated = jobIsGated(job) || (options.exemptJob?.(job) ?? false);
|
|
233
|
-
return
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
return [
|
|
243
|
+
...hits.map(step => {
|
|
244
|
+
const stepDeferred = options.unresolvedStep?.(workflow, job, step);
|
|
245
|
+
if (stepDeferred !== undefined && stepDeferred !== null) {
|
|
246
|
+
return { kind: "unresolved", reason: stepDeferred };
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
kind: jobGated || stepIsGated(step)
|
|
250
|
+
? "gated"
|
|
251
|
+
: "ungated",
|
|
252
|
+
command: { workflow: workflow.file, jobId: job.id, command: step.run },
|
|
253
|
+
};
|
|
254
|
+
}),
|
|
255
|
+
...unresolvedCalls,
|
|
256
|
+
];
|
|
245
257
|
}
|
|
246
258
|
/**
|
|
247
259
|
* Scan every workflow for the commands matching a predicate, partitioned by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-readiness-operations.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor-readiness-operations.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,OAAO,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AAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAmC,EACnC,KAAa;IAEb,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAChD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CACrB,KAAK,CAAC,EAAE,CACN,KAAK,KAAK,CAAC,QAAQ,YAAY,KAAK,CAAC,KAAK,aAAa,KAAK,CAAC,OAAO,IAAI,CAC3E,CAAC;IACF,OAAO,CACL,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;QACjB,CAAC,QAAQ,GAAG,CAAC;YACX,CAAC,CAAC,QAAQ,QAAQ,yCAAyC;YAC3D,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evidence builders for the dependencies/supply-chain readiness producer.
|
|
3
|
+
* @module cli/doctor-readiness-supply-chain-evidence
|
|
4
|
+
*/
|
|
5
|
+
import { type DependencySpec } from "./doctor-readiness-supply-chain-scan.js";
|
|
6
|
+
import type { WorkspaceMembers } from "./doctor-readiness-workspaces.js";
|
|
7
|
+
/** One package manifest B5 inspects. */
|
|
8
|
+
export interface ManifestUnderAssessment {
|
|
9
|
+
readonly manifestPath: string;
|
|
10
|
+
readonly manifest: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
/** Values already read from the repository for dependency-confidence evidence. */
|
|
13
|
+
interface DependencyConfidenceInputs {
|
|
14
|
+
readonly auditGate: string | null;
|
|
15
|
+
readonly lockfile: string | null;
|
|
16
|
+
readonly lockfileInstallGate: string | null;
|
|
17
|
+
readonly specs: readonly DependencySpec[];
|
|
18
|
+
readonly workspaces: WorkspaceMembers;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Collect B5 evidence for install-time execution surfaces.
|
|
22
|
+
* @param manifests - Manifests under assessment
|
|
23
|
+
* @returns Evidence lines for install-time execution surfaces
|
|
24
|
+
*/
|
|
25
|
+
export declare function installTimeExecutionViolations(manifests: readonly ManifestUnderAssessment[]): readonly string[];
|
|
26
|
+
/**
|
|
27
|
+
* Collect B5 violations from dependency specs, lockfiles, and audit gates.
|
|
28
|
+
* @param inputs - Values already read from the repository
|
|
29
|
+
* @param inputs.auditGate - Path to the dependency-audit gate, if found
|
|
30
|
+
* @param inputs.lockfile - Path to the committed lockfile, if found
|
|
31
|
+
* @param inputs.lockfileInstallGate - Path to the lockfile-enforcing install
|
|
32
|
+
* @param inputs.specs - Declared dependency specs
|
|
33
|
+
* @param inputs.workspaces - What resolving the workspace members established
|
|
34
|
+
* @returns Evidence lines for dependency-confidence violations
|
|
35
|
+
*/
|
|
36
|
+
export declare function dependencyConfidenceViolations({ auditGate, lockfile, lockfileInstallGate, specs, workspaces, }: DependencyConfidenceInputs): readonly string[];
|
|
37
|
+
/**
|
|
38
|
+
* Collect non-blocking observations from dependency-confidence evidence.
|
|
39
|
+
* @param inputs - Values already read from the repository
|
|
40
|
+
* @param inputs.auditGate - Path to the dependency-audit gate, if found
|
|
41
|
+
* @param inputs.lockfile - Path to the committed lockfile, if found
|
|
42
|
+
* @param inputs.lockfileInstallGate - Path to the lockfile-enforcing install
|
|
43
|
+
* @param inputs.specs - Declared dependency specs
|
|
44
|
+
* @returns Evidence lines for clean dependency-confidence signals
|
|
45
|
+
*/
|
|
46
|
+
export declare function dependencyConfidenceObservations({ auditGate, lockfile, lockfileInstallGate, specs, }: DependencyConfidenceInputs): readonly string[];
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=doctor-readiness-supply-chain-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-readiness-supply-chain-evidence.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain-evidence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAUzE,wCAAwC;AACxC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAED,kFAAkF;AAClF,UAAU,0BAA0B;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AA0GD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,SAAS,uBAAuB,EAAE,GAC5C,SAAS,MAAM,EAAE,CAOnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,UAAU,GACX,EAAE,0BAA0B,GAAG,SAAS,MAAM,EAAE,CAkChD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,KAAK,GACN,EAAE,0BAA0B,GAAG,SAAS,MAAM,EAAE,CAahD"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evidence builders for the dependencies/supply-chain readiness producer.
|
|
3
|
+
* @module cli/doctor-readiness-supply-chain-evidence
|
|
4
|
+
*/
|
|
5
|
+
import { isFloatingSpec, LOCKFILES, } from "./doctor-readiness-supply-chain-scan.js";
|
|
6
|
+
/** Package lifecycle scripts that execute during dependency installation. */
|
|
7
|
+
const INSTALL_TIME_SCRIPT_NAMES = new Set([
|
|
8
|
+
"preinstall",
|
|
9
|
+
"install",
|
|
10
|
+
"postinstall",
|
|
11
|
+
"prepare",
|
|
12
|
+
]);
|
|
13
|
+
/**
|
|
14
|
+
* Render a bounded list for operator-facing evidence.
|
|
15
|
+
* @param values - Values to render
|
|
16
|
+
* @returns A comma-separated list
|
|
17
|
+
*/
|
|
18
|
+
function renderList(values) {
|
|
19
|
+
const shown = values.slice(0, 5);
|
|
20
|
+
const overflow = values.length - shown.length;
|
|
21
|
+
return (shown.map(value => `\`${value}\``).join(", ") +
|
|
22
|
+
(overflow > 0 ? `, and ${overflow} more` : ""));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Build the evidence line for a manifest with no committed lockfile.
|
|
26
|
+
* @param specCount - How many specs the manifest declares
|
|
27
|
+
* @returns One evidence line
|
|
28
|
+
*/
|
|
29
|
+
function lockfileEvidence(specCount) {
|
|
30
|
+
return (`package manifest(s), starting with \`package.json\`, declare ${specCount} ` +
|
|
31
|
+
`dependency spec(s) but no lockfile is committed (looked for ` +
|
|
32
|
+
`${LOCKFILES.join(", ")}) — two installs can resolve to different trees, ` +
|
|
33
|
+
"so what was validated is not provably what gets installed");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Whether a floating-looking spec is really a local workspace link.
|
|
37
|
+
* @param spec - The declared spec
|
|
38
|
+
* @param workspaces - What resolving the workspace members established
|
|
39
|
+
* @returns True when the spec links to a workspace member
|
|
40
|
+
*/
|
|
41
|
+
function linksWorkspaceMember(spec, workspaces) {
|
|
42
|
+
if (!workspaces.declared) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return (workspaces.names.has(spec.name) ||
|
|
46
|
+
(workspaces.names.size === 0 && spec.spec.trim() === "*"));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build evidence when a manifest declares install-time lifecycle scripts.
|
|
50
|
+
* @param manifestPath - Repo-relative manifest path
|
|
51
|
+
* @param manifest - Parsed package manifest
|
|
52
|
+
* @returns Evidence line when install-time scripts exist
|
|
53
|
+
*/
|
|
54
|
+
function installTimeScriptEvidence(manifestPath, manifest) {
|
|
55
|
+
const scripts = manifest.scripts;
|
|
56
|
+
if (scripts === null ||
|
|
57
|
+
typeof scripts !== "object" ||
|
|
58
|
+
Array.isArray(scripts)) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const scriptNames = Object.keys(scripts).filter(name => INSTALL_TIME_SCRIPT_NAMES.has(name));
|
|
62
|
+
if (scriptNames.length === 0) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return (`\`${manifestPath}\` declares install-time lifecycle script(s) ` +
|
|
66
|
+
`${renderList(scriptNames)}, so dependency installation executes project ` +
|
|
67
|
+
"code before the normal test/audit surface; B5 needs an explicit confidence " +
|
|
68
|
+
"decision for that install-time execution path");
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Build evidence when Bun trusted dependencies are declared.
|
|
72
|
+
* @param manifestPath - Repo-relative manifest path
|
|
73
|
+
* @param manifest - Parsed package manifest
|
|
74
|
+
* @returns Evidence line when trusted dependencies are declared
|
|
75
|
+
*/
|
|
76
|
+
function trustedDependencyEvidence(manifestPath, manifest) {
|
|
77
|
+
const trusted = manifest.trustedDependencies;
|
|
78
|
+
const names = Array.isArray(trusted)
|
|
79
|
+
? trusted.filter((entry) => typeof entry === "string")
|
|
80
|
+
: [];
|
|
81
|
+
if (names.length === 0) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return (`\`${manifestPath}\` marks ${renderList(names)} as ` +
|
|
85
|
+
"`trustedDependencies`, allowing third-party install-time scripts to run; " +
|
|
86
|
+
"B5 needs a written confidence decision for each trusted package because " +
|
|
87
|
+
"a clean audit gate alone does not explain that execution authority");
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Collect B5 evidence for install-time execution surfaces.
|
|
91
|
+
* @param manifests - Manifests under assessment
|
|
92
|
+
* @returns Evidence lines for install-time execution surfaces
|
|
93
|
+
*/
|
|
94
|
+
export function installTimeExecutionViolations(manifests) {
|
|
95
|
+
return manifests.flatMap(({ manifestPath, manifest }) => [
|
|
96
|
+
installTimeScriptEvidence(manifestPath, manifest),
|
|
97
|
+
trustedDependencyEvidence(manifestPath, manifest),
|
|
98
|
+
].flatMap(evidence => (evidence === null ? [] : [evidence])));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Collect B5 violations from dependency specs, lockfiles, and audit gates.
|
|
102
|
+
* @param inputs - Values already read from the repository
|
|
103
|
+
* @param inputs.auditGate - Path to the dependency-audit gate, if found
|
|
104
|
+
* @param inputs.lockfile - Path to the committed lockfile, if found
|
|
105
|
+
* @param inputs.lockfileInstallGate - Path to the lockfile-enforcing install
|
|
106
|
+
* @param inputs.specs - Declared dependency specs
|
|
107
|
+
* @param inputs.workspaces - What resolving the workspace members established
|
|
108
|
+
* @returns Evidence lines for dependency-confidence violations
|
|
109
|
+
*/
|
|
110
|
+
export function dependencyConfidenceViolations({ auditGate, lockfile, lockfileInstallGate, specs, workspaces, }) {
|
|
111
|
+
if (specs.length === 0) {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
const floating = specs.filter(spec => isFloatingSpec(spec.spec) && !linksWorkspaceMember(spec, workspaces));
|
|
115
|
+
return [
|
|
116
|
+
...(lockfile === null ? [lockfileEvidence(specs.length)] : []),
|
|
117
|
+
...(lockfile !== null && lockfileInstallGate === null
|
|
118
|
+
? [
|
|
119
|
+
`lockfile \`${lockfile}\` is committed, but no CI or hook install ` +
|
|
120
|
+
"step was found that enforces it with `npm ci`, " +
|
|
121
|
+
"`bun install --frozen-lockfile`, `pnpm install --frozen-lockfile`, " +
|
|
122
|
+
"or `yarn install --immutable`; a workflow can silently rewrite " +
|
|
123
|
+
"or bypass the tree that was validated",
|
|
124
|
+
]
|
|
125
|
+
: []),
|
|
126
|
+
...floating.map(spec => `\`${spec.manifestPath}\` \`${spec.block}.${spec.name}\` is ` +
|
|
127
|
+
`\`${spec.spec}\`, which resolves to whatever is newest at install ` +
|
|
128
|
+
"time rather than to a version anything was ever validated against"),
|
|
129
|
+
...(auditGate === null
|
|
130
|
+
? [
|
|
131
|
+
"no dependency-audit gate covering the JavaScript tree was found " +
|
|
132
|
+
"anywhere — no `npm`/`bun` audit step in `.github/workflows/*.yml`, " +
|
|
133
|
+
"none in a git hook, and no `dependabot.yml` npm entry or " +
|
|
134
|
+
"`renovate.json` — so a newly disclosed advisory in this tree " +
|
|
135
|
+
"would never be noticed by anything",
|
|
136
|
+
]
|
|
137
|
+
: []),
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Collect non-blocking observations from dependency-confidence evidence.
|
|
142
|
+
* @param inputs - Values already read from the repository
|
|
143
|
+
* @param inputs.auditGate - Path to the dependency-audit gate, if found
|
|
144
|
+
* @param inputs.lockfile - Path to the committed lockfile, if found
|
|
145
|
+
* @param inputs.lockfileInstallGate - Path to the lockfile-enforcing install
|
|
146
|
+
* @param inputs.specs - Declared dependency specs
|
|
147
|
+
* @returns Evidence lines for clean dependency-confidence signals
|
|
148
|
+
*/
|
|
149
|
+
export function dependencyConfidenceObservations({ auditGate, lockfile, lockfileInstallGate, specs, }) {
|
|
150
|
+
if (specs.length === 0) {
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
return [
|
|
154
|
+
...(lockfile === null ? [] : [`Lockfile in use: \`${lockfile}\`.`]),
|
|
155
|
+
...(lockfileInstallGate === null
|
|
156
|
+
? []
|
|
157
|
+
: [`Lockfile-enforcing install declared in \`${lockfileInstallGate}\`.`]),
|
|
158
|
+
...(auditGate === null
|
|
159
|
+
? []
|
|
160
|
+
: [`Dependency-audit gate declared in \`${auditGate}\`.`]),
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=doctor-readiness-supply-chain-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-readiness-supply-chain-evidence.js","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain-evidence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAEL,cAAc,EACd,SAAS,GACV,MAAM,yCAAyC,CAAC;AAGjD,6EAA6E;AAC7E,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC7D,YAAY;IACZ,SAAS;IACT,aAAa;IACb,SAAS;CACV,CAAC,CAAC;AAiBH;;;;GAIG;AACH,SAAS,UAAU,CAAC,MAAyB;IAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC9C,OAAO,CACL,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC7C,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAC/C,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,SAAiB;IACzC,OAAO,CACL,gEAAgE,SAAS,GAAG;QAC5E,8DAA8D;QAC9D,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,mDAAmD;QAC1E,2DAA2D,CAC5D,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAS,oBAAoB,CAC3B,IAAoB,EACpB,UAA4B;IAE5B,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CACL,UAAU,CAAC,KAAK,CAAC,G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YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,QAAQ,CAAC,GAAG,CACb,IAAI,CAAC,EAAE,CACL,KAAK,IAAI,CAAC,YAAY,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,QAAQ;YAC7D,KAAK,IAAI,CAAC,IAAI,sDAAsD;YACpE,mEAAmE,CACtE;QACD,GAAG,CAAC,SAAS,KAAK,IAAI;YACpB,CAAC,CAAC;gBACE,kEAAkE;oBAChE,qEAAqE;oBACrE,2DAA2D;oBAC3D,+DAA+D;oBAC/D,oCAAoC;aACvC;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gCAAgC,CAAC,EAC/C,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,KAAK,GACsB;IAC3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO;QACL,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,sBAAsB,QAAQ,KAAK,CAAC,CAAC;QACnE,GAAG,CAAC,mBAAmB,KAAK,IAAI;YAC9B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,4CAA4C,mBAAmB,KAAK,CAAC,CAAC;QAC3E,GAAG,CAAC,SAAS,KAAK,IAAI;YACpB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,uCAAuC,SAAS,KAAK,CAAC,CAAC;KAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-readiness-supply-chain.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor-readiness-supply-chain.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-readiness-supply-chain.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,+EAA+E;AAC/E,eAAO,MAAM,sCAAsC,8BACtB,CAAC;AA8J9B;;;;;;;;GAQG;AACH,wBAAsB,sCAAsC,CAC1D,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,wBAAwB,CAAC,CA4DnC"}
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import { informationalFindings } from "./doctor-readiness-shared.js";
|
|
31
31
|
import { auditExceptionViolations } from "./doctor-readiness-audit-allowlist.js";
|
|
32
|
-
import { collectSpecs, findAuditGate, findLockfile, findLockfileInstallGate,
|
|
32
|
+
import { collectSpecs, findAuditGate, findLockfile, findLockfileInstallGate, readManifest, } from "./doctor-readiness-supply-chain-scan.js";
|
|
33
|
+
import { dependencyConfidenceObservations, dependencyConfidenceViolations, installTimeExecutionViolations, } from "./doctor-readiness-supply-chain-evidence.js";
|
|
33
34
|
import { resolveWorkspaceMembers, } from "./doctor-readiness-workspaces.js";
|
|
34
35
|
/** The dependencies/supply-chain readiness dimension id (readiness-rubric). */
|
|
35
36
|
export const DEPENDENCIES_SUPPLY_CHAIN_DIMENSION_ID = "dependencies-supply-chain";
|
|
@@ -37,87 +38,33 @@ export const DEPENDENCIES_SUPPLY_CHAIN_DIMENSION_ID = "dependencies-supply-chain
|
|
|
37
38
|
const SUPPLY_CHAIN_BLOCKER_ID = "B5";
|
|
38
39
|
/** Most evidence lines carried into a single finding, to keep it readable. */
|
|
39
40
|
const MAX_EVIDENCE_LINES = 12;
|
|
40
|
-
/**
|
|
41
|
-
* Build the evidence line for a manifest with no committed lockfile.
|
|
42
|
-
* @param specCount - How many specs the manifest declares
|
|
43
|
-
* @returns One evidence line
|
|
44
|
-
*/
|
|
45
|
-
function lockfileEvidence(specCount) {
|
|
46
|
-
return (`package manifest(s), starting with \`package.json\`, declare ${specCount} ` +
|
|
47
|
-
`dependency spec(s) but no lockfile is committed (looked for ` +
|
|
48
|
-
`${LOCKFILES.join(", ")}) — two installs can resolve to different trees, ` +
|
|
49
|
-
"so what was validated is not provably what gets installed");
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Whether a floating-looking spec is really a link to a package in this
|
|
53
|
-
* repository. `"@acme/utils": "*"` against a workspace member resolves to the
|
|
54
|
-
* local package, which is the workspace idiom rather than a floating install —
|
|
55
|
-
* so faulting it would fail every correctly configured monorepo.
|
|
56
|
-
*
|
|
57
|
-
* When workspaces are declared but no member name could be resolved (an
|
|
58
|
-
* unreadable child manifest, an unsupported glob), a bare `*` is exempted
|
|
59
|
-
* anyway: the repository has told us it links locally, and absence of proof is
|
|
60
|
-
* not proof of a violation.
|
|
61
|
-
* @param spec - The declared spec
|
|
62
|
-
* @param workspaces - What resolving the workspace members established
|
|
63
|
-
* @returns True when the spec links to a workspace member
|
|
64
|
-
*/
|
|
65
|
-
function linksWorkspaceMember(spec, workspaces) {
|
|
66
|
-
if (!workspaces.declared) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return (workspaces.names.has(spec.name) ||
|
|
70
|
-
(workspaces.names.size === 0 && spec.spec.trim() === "*"));
|
|
71
|
-
}
|
|
72
41
|
/**
|
|
73
42
|
* Assess a repository's dependency confidence model.
|
|
74
43
|
* @param root - Repository root
|
|
75
44
|
* @param specs - Declared dependency specs
|
|
45
|
+
* @param manifests - Parsed package manifests under assessment
|
|
76
46
|
* @param workspaces - What resolving the workspace members established
|
|
77
47
|
* @returns Evidence lines for violations, and non-blocking observations
|
|
78
48
|
*/
|
|
79
|
-
async function collectFindings(root, specs, workspaces) {
|
|
49
|
+
async function collectFindings(root, specs, manifests, workspaces) {
|
|
80
50
|
const lockfile = await findLockfile(root);
|
|
81
51
|
const lockfileInstallGate = lockfile === null ? null : await findLockfileInstallGate(root);
|
|
82
52
|
const auditGate = await findAuditGate(root);
|
|
83
|
-
const
|
|
53
|
+
const inputs = {
|
|
54
|
+
auditGate,
|
|
55
|
+
lockfile,
|
|
56
|
+
lockfileInstallGate,
|
|
57
|
+
specs,
|
|
58
|
+
workspaces,
|
|
59
|
+
};
|
|
84
60
|
return {
|
|
85
61
|
violations: [
|
|
86
|
-
...(
|
|
87
|
-
...(
|
|
88
|
-
? [
|
|
89
|
-
`lockfile \`${lockfile}\` is committed, but no CI or hook install ` +
|
|
90
|
-
"step was found that enforces it with `npm ci`, " +
|
|
91
|
-
"`bun install --frozen-lockfile`, `pnpm install --frozen-lockfile`, " +
|
|
92
|
-
"or `yarn install --immutable`; a workflow can silently rewrite " +
|
|
93
|
-
"or bypass the tree that was validated",
|
|
94
|
-
]
|
|
95
|
-
: []),
|
|
96
|
-
...floating.map(spec => `\`${spec.manifestPath}\` \`${spec.block}.${spec.name}\` is ` +
|
|
97
|
-
`\`${spec.spec}\`, ` +
|
|
98
|
-
"which resolves to whatever is newest at install time rather than to " +
|
|
99
|
-
"a version anything was ever validated against"),
|
|
100
|
-
...(auditGate === null
|
|
101
|
-
? [
|
|
102
|
-
"no dependency-audit gate covering the JavaScript tree was found " +
|
|
103
|
-
"anywhere — no `npm`/`bun` audit step in `.github/workflows/*.yml`, " +
|
|
104
|
-
"none in a git hook, and no `dependabot.yml` npm entry or " +
|
|
105
|
-
"`renovate.json` — so a newly disclosed advisory in this tree " +
|
|
106
|
-
"would never be noticed by anything",
|
|
107
|
-
]
|
|
108
|
-
: []),
|
|
62
|
+
...dependencyConfidenceViolations(inputs),
|
|
63
|
+
...installTimeExecutionViolations(manifests),
|
|
109
64
|
...(await auditExceptionViolations(root)),
|
|
110
65
|
],
|
|
111
66
|
observations: [
|
|
112
|
-
...(
|
|
113
|
-
...(lockfileInstallGate === null
|
|
114
|
-
? []
|
|
115
|
-
: [
|
|
116
|
-
`Lockfile-enforcing install declared in \`${lockfileInstallGate}\`.`,
|
|
117
|
-
]),
|
|
118
|
-
...(auditGate === null
|
|
119
|
-
? []
|
|
120
|
-
: [`Dependency-audit gate declared in \`${auditGate}\`.`]),
|
|
67
|
+
...dependencyConfidenceObservations(inputs),
|
|
121
68
|
...(workspaces.declared ? [workspaceObservation(workspaces)] : []),
|
|
122
69
|
],
|
|
123
70
|
};
|
|
@@ -232,16 +179,24 @@ export async function assessDependenciesSupplyChainDimension(root) {
|
|
|
232
179
|
return skipRecord(outcome.reason);
|
|
233
180
|
}
|
|
234
181
|
const workspaces = await resolveWorkspaceMembers(root, outcome.manifest);
|
|
182
|
+
const manifests = [
|
|
183
|
+
{ manifestPath: "package.json", manifest: outcome.manifest },
|
|
184
|
+
...workspaces.members.map(member => ({
|
|
185
|
+
manifestPath: member.manifestPath,
|
|
186
|
+
manifest: member.manifest,
|
|
187
|
+
})),
|
|
188
|
+
];
|
|
235
189
|
const specs = [
|
|
236
190
|
...collectSpecs(outcome.manifest),
|
|
237
191
|
...workspaces.members.flatMap(member => collectSpecs(member.manifest, member.manifestPath)),
|
|
238
192
|
];
|
|
239
|
-
|
|
193
|
+
const installTimeViolations = installTimeExecutionViolations(manifests);
|
|
194
|
+
if (specs.length === 0 && installTimeViolations.length === 0) {
|
|
240
195
|
return skipRecord("No resolved package manifest declares dependencies, so this repository " +
|
|
241
196
|
"owns no third-party surface a confidence model could cover; " +
|
|
242
197
|
"supply-chain confidence is not established either way");
|
|
243
198
|
}
|
|
244
|
-
const { violations, observations } = await collectFindings(root, specs, workspaces);
|
|
199
|
+
const { violations, observations } = await collectFindings(root, specs, manifests, workspaces);
|
|
245
200
|
if (violations.length > 0) {
|
|
246
201
|
return {
|
|
247
202
|
id: DEPENDENCIES_SUPPLY_CHAIN_DIMENSION_ID,
|