@codyswann/lisa 8.3.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/scripts/lib/private-key-redaction.d.mts +4 -0
- package/all/copy-overwrite/scripts/lib/private-key-redaction.mjs +59 -0
- package/all/copy-overwrite/scripts/lisa-gates.mjs +1 -0
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +4 -1
- package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +56 -1
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +17 -14
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
- package/cdk/package-lisa/package.lisa.json +1 -1
- package/dist/cli/confined-project-read.d.ts +2 -1
- package/dist/cli/confined-project-read.d.ts.map +1 -1
- package/dist/cli/confined-project-read.js +22 -5
- package/dist/cli/confined-project-read.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -1
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +5 -3
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/github-read-issue-cmd.d.ts +62 -0
- package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
- package/dist/cli/github-read-issue-cmd.js +121 -0
- package/dist/cli/github-read-issue-cmd.js.map +1 -0
- package/dist/cli/github-reader-relationships.d.ts +41 -0
- package/dist/cli/github-reader-relationships.d.ts.map +1 -0
- package/dist/cli/github-reader-relationships.js +218 -0
- package/dist/cli/github-reader-relationships.js.map +1 -0
- package/dist/cli/github-reader-target.d.ts +24 -0
- package/dist/cli/github-reader-target.d.ts.map +1 -0
- package/dist/cli/github-reader-target.js +95 -0
- package/dist/cli/github-reader-target.js.map +1 -0
- package/dist/cli/github-reader-wire.d.ts +72 -0
- package/dist/cli/github-reader-wire.d.ts.map +1 -0
- package/dist/cli/github-reader-wire.js +125 -0
- package/dist/cli/github-reader-wire.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/controls/carrier-edits.d.ts +1 -1
- package/dist/controls/carrier-edits.d.ts.map +1 -1
- package/dist/controls/carrier-edits.js +13 -3
- package/dist/controls/carrier-edits.js.map +1 -1
- package/dist/controls/carriers.d.ts.map +1 -1
- package/dist/controls/carriers.js +7 -2
- package/dist/controls/carriers.js.map +1 -1
- package/dist/controls/checks-binding.d.ts.map +1 -1
- package/dist/controls/checks-binding.js +13 -7
- package/dist/controls/checks-binding.js.map +1 -1
- package/dist/controls/commands/attest-before-enforce.d.ts.map +1 -1
- package/dist/controls/commands/attest-before-enforce.js +4 -5
- package/dist/controls/commands/attest-before-enforce.js.map +1 -1
- package/dist/controls/commands/attest-workspace.d.ts.map +1 -1
- package/dist/controls/commands/attest-workspace.js +3 -1
- package/dist/controls/commands/attest-workspace.js.map +1 -1
- package/dist/controls/commands/declaration-check.d.ts.map +1 -1
- package/dist/controls/commands/declaration-check.js +7 -4
- package/dist/controls/commands/declaration-check.js.map +1 -1
- package/dist/controls/commands/proof-check.js +1 -1
- package/dist/controls/commands/proof-check.js.map +1 -1
- package/dist/controls/commands/seed.d.ts +1 -9
- package/dist/controls/commands/seed.d.ts.map +1 -1
- package/dist/controls/commands/seed.js +72 -65
- package/dist/controls/commands/seed.js.map +1 -1
- package/dist/controls/configure-road.d.ts +2 -0
- package/dist/controls/configure-road.d.ts.map +1 -1
- package/dist/controls/configure-road.js +18 -14
- package/dist/controls/configure-road.js.map +1 -1
- package/dist/controls/enforce-entry-outcome.d.ts +2 -1
- package/dist/controls/enforce-entry-outcome.d.ts.map +1 -1
- package/dist/controls/enforce-entry-outcome.js +17 -15
- package/dist/controls/enforce-entry-outcome.js.map +1 -1
- package/dist/controls/enforce-points.d.ts +2 -0
- package/dist/controls/enforce-points.d.ts.map +1 -1
- package/dist/controls/enforce-points.js +4 -1
- package/dist/controls/enforce-points.js.map +1 -1
- package/dist/controls/enforce-report.d.ts.map +1 -1
- package/dist/controls/enforce-report.js +6 -1
- package/dist/controls/enforce-report.js.map +1 -1
- package/dist/controls/evidence-redact.d.ts.map +1 -1
- package/dist/controls/evidence-redact.js +11 -6
- package/dist/controls/evidence-redact.js.map +1 -1
- package/dist/controls/gates-declaration.d.ts.map +1 -1
- package/dist/controls/gates-declaration.js +6 -1
- package/dist/controls/gates-declaration.js.map +1 -1
- package/dist/controls/proof-copy-preparation.d.ts +33 -0
- package/dist/controls/proof-copy-preparation.d.ts.map +1 -0
- package/dist/controls/proof-copy-preparation.js +159 -0
- package/dist/controls/proof-copy-preparation.js.map +1 -0
- package/dist/controls/proof-copy-prepared-state.d.ts +33 -0
- package/dist/controls/proof-copy-prepared-state.d.ts.map +1 -0
- package/dist/controls/proof-copy-prepared-state.js +117 -0
- package/dist/controls/proof-copy-prepared-state.js.map +1 -0
- package/dist/controls/proof-copy-workspace.d.ts.map +1 -1
- package/dist/controls/proof-copy-workspace.js +17 -4
- package/dist/controls/proof-copy-workspace.js.map +1 -1
- package/dist/controls/proof-copy.d.ts +5 -0
- package/dist/controls/proof-copy.d.ts.map +1 -1
- package/dist/controls/proof-copy.js +17 -15
- package/dist/controls/proof-copy.js.map +1 -1
- package/dist/controls/proof-patch.d.ts +12 -0
- package/dist/controls/proof-patch.d.ts.map +1 -1
- package/dist/controls/proof-patch.js +28 -0
- package/dist/controls/proof-patch.js.map +1 -1
- package/dist/controls/proof-preparation-declaration.d.ts +15 -0
- package/dist/controls/proof-preparation-declaration.d.ts.map +1 -0
- package/dist/controls/proof-preparation-declaration.js +57 -0
- package/dist/controls/proof-preparation-declaration.js.map +1 -0
- package/dist/controls/proof-tools.d.ts +7 -4
- package/dist/controls/proof-tools.d.ts.map +1 -1
- package/dist/controls/proof-tools.js +1 -1
- package/dist/controls/proof-tools.js.map +1 -1
- package/dist/controls/register-drift.d.ts.map +1 -1
- package/dist/controls/register-drift.js +4 -3
- package/dist/controls/register-drift.js.map +1 -1
- package/dist/controls/register-evidence-rule.d.ts +2 -0
- package/dist/controls/register-evidence-rule.d.ts.map +1 -1
- package/dist/controls/register-evidence-rule.js +8 -7
- package/dist/controls/register-evidence-rule.js.map +1 -1
- package/dist/controls/register-rules.d.ts +2 -0
- package/dist/controls/register-rules.d.ts.map +1 -1
- package/dist/controls/register-rules.js.map +1 -1
- package/dist/controls/register-types.d.ts +2 -4
- package/dist/controls/register-types.d.ts.map +1 -1
- package/dist/controls/register-types.js.map +1 -1
- package/dist/controls/register.d.ts +2 -0
- package/dist/controls/register.d.ts.map +1 -1
- package/dist/controls/register.js +3 -1
- package/dist/controls/register.js.map +1 -1
- package/dist/controls/secret-scan.d.ts.map +1 -1
- package/dist/controls/secret-scan.js +7 -5
- package/dist/controls/secret-scan.js.map +1 -1
- package/dist/controls/secret-shapes.d.ts +7 -7
- package/dist/controls/secret-shapes.d.ts.map +1 -1
- package/dist/controls/secret-shapes.js +7 -18
- package/dist/controls/secret-shapes.js.map +1 -1
- package/dist/controls/shipped-parts.d.ts +89 -0
- package/dist/controls/shipped-parts.d.ts.map +1 -0
- package/dist/controls/shipped-parts.js +233 -0
- package/dist/controls/shipped-parts.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.json +38 -0
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +90 -23
- package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
- package/dist/strategies/package-lisa-host-pins.js +29 -30
- package/dist/strategies/package-lisa-host-pins.js.map +1 -1
- package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
- package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
- package/dist/strategies/package-lisa-range-intersection.js +73 -0
- package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
- package/harper-fabric/package-lisa/package.lisa.json +3 -2
- package/package.json +4 -4
- package/phaser/package-lisa/package.lisa.json +3 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -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-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/lisa-devin/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -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-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-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-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-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-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-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-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-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-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-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-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-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
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-direct-issue-create.sh +4 -1
- package/plugins/src/base/hooks/worktree-binding-guard.mjs +56 -1
- package/plugins/src/base/skills/lisa-attest/SKILL.md +12 -2
- package/plugins/src/base/skills/lisa-configure/SKILL.md +27 -13
- package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
- package/scripts/check-derived-artifacts.mjs +1 -0
- package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
- package/scripts/lib/phrase-tests/redact.mjs +3 -8
- package/scripts/two-channel-couplings.json +5 -3
- package/typescript/copy-overwrite/.prettierignore +2 -0
- package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
- package/typescript/package-lisa/package.lisa.json +3 -2
|
@@ -33,6 +33,7 @@ import { CONTROL_REGISTER_RULES } from "./register-rules.js";
|
|
|
33
33
|
import { declaredTiersHold } from "./register-tier-rule.js";
|
|
34
34
|
import { CONTROL_REGISTER_SCHEMA_VERSION, } from "./register-types.js";
|
|
35
35
|
import { withoutCredentials } from "./secret-scan-json.js";
|
|
36
|
+
import { confirmedShippedPartGates } from "./shipped-parts.js";
|
|
36
37
|
import { withUnenforceableAgents } from "./unenforceable-agents.js";
|
|
37
38
|
/**
|
|
38
39
|
* Report entries that would share an identifier.
|
|
@@ -60,7 +61,7 @@ function sharedIdentifiers(entries) {
|
|
|
60
61
|
*/
|
|
61
62
|
export function buildControlRegister(inputs) {
|
|
62
63
|
const { declaration, registry, catalogue } = inputs;
|
|
63
|
-
const refused = CONTROL_REGISTER_RULES.flatMap(rule => rule(
|
|
64
|
+
const refused = CONTROL_REGISTER_RULES.flatMap(rule => rule(inputs));
|
|
64
65
|
if (refused.length > 0)
|
|
65
66
|
return { problems: refused };
|
|
66
67
|
const resolved = resolveEnforcementPoints(declaration, registry);
|
|
@@ -117,6 +118,7 @@ async function generated(root, sources) {
|
|
|
117
118
|
declaration: read.declaration,
|
|
118
119
|
registry,
|
|
119
120
|
catalogue: (sources.loadCatalogue ?? loadCriterionCatalogue)(),
|
|
121
|
+
shippedPartGates: await confirmedShippedPartGates(root, read.declaration, registry),
|
|
120
122
|
evidenceDocument: () => (sources.readEvidenceDocument ?? readEvidenceDocument)(root),
|
|
121
123
|
});
|
|
122
124
|
return built.problems === null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/controls/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACL,sBAAsB,GAEvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,oBAAoB,GAGrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,E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AAM,yBAAyB,CAC/C,IAAI,EACJ,IAAI,CAAC,WAAW,EAChB,QAAQ,CACT;YACD,gBAAgB,EAAE,GAAG,EAAE,CACrB,CAAC,OAAO,CAAC,oBAAoB,IAAI,oBAAoB,CAAC,CAAC,IAAI,CAAC;SAC/D,CAAC,CAAC;QACH,OAAO,KAAK,CAAC,QAAQ,KAAK,IAAI;YAC5B,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YAC9D,CAAC,CAAC,KAAK,CAAC;IACZ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,QAAQ,EAAE,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACnE,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAY,EACZ,UAAkC,EAAE;IAEpC,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAClD,OAAO,UAAU,CAAC,QAAQ,KAAK,IAAI;QACjC,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,EAAE,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-scan.d.ts","sourceRoot":"","sources":["../../src/controls/secret-scan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secret-scan.d.ts","sourceRoot":"","sources":["../../src/controls/secret-scan.ts"],"names":[],"mappings":"AAiEA,kEAAkE;AAClE,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,wEAAwE;AACxE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAkND;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAyJD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAAsB,GAC9B,YAAY,CA4Bd;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAAsB,GAC9B,SAAS,MAAM,EAAE,CAEnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,OAAO,EAAE,EACzB,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,iBAAiB,CAMnB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CAQ1E"}
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
* itself, so no caller can print it by accident.
|
|
52
52
|
* @module controls/secret-scan
|
|
53
53
|
*/
|
|
54
|
+
import { redactPrivateKeyBlocks } from "../../all/copy-overwrite/scripts/lib/private-key-redaction.mjs";
|
|
54
55
|
import { AUTHORIZATION_KIND, CREDENTIAL_SHAPES, NAMED_SECRET_KIND, PRIVATE_KEY_KIND, PRIVATE_KEY_LAST_LINE, URL_CREDENTIALS_KIND, credentialPlaceholder, } from "./secret-shapes.js";
|
|
55
56
|
/** The names that say the value beside them is a secret. */
|
|
56
57
|
const SECRET_NAME_SOURCE = "authorization|passw(?:or)?d|passphrase|secret|token|credential|(?:api|access|account|private)[_-]?key";
|
|
@@ -262,10 +263,7 @@ function shapeDecision(shape) {
|
|
|
262
263
|
? credentialPlaceholder(shape.kind)
|
|
263
264
|
: shape.replace.replace("$1", match[1] ?? "");
|
|
264
265
|
// Already taken out, or a name that only starts like a token.
|
|
265
|
-
const leave = put === found ||
|
|
266
|
-
(shape.replace === undefined &&
|
|
267
|
-
shape.kind !== PRIVATE_KEY_KIND &&
|
|
268
|
-
readsAsName(found));
|
|
266
|
+
const leave = put === found || (shape.replace === undefined && readsAsName(found));
|
|
269
267
|
return leave
|
|
270
268
|
? null
|
|
271
269
|
: { start, end: start + found.length, kind: shape.kind, put };
|
|
@@ -354,7 +352,11 @@ function underName(state, name) {
|
|
|
354
352
|
* value was shaped like
|
|
355
353
|
*/
|
|
356
354
|
export function redactCredentials(text, context = {}) {
|
|
357
|
-
const
|
|
355
|
+
const withoutPrivateKeys = redactPrivateKeyBlocks(text);
|
|
356
|
+
const shaped = [...CREDENTIAL_SHAPES, WEB_ADDRESS_USER].reduce((state, shape) => rewrite(state, shape.re, shapeDecision(shape)), {
|
|
357
|
+
text: withoutPrivateKeys,
|
|
358
|
+
kinds: withoutPrivateKeys === text ? [] : [PRIVATE_KEY_KIND],
|
|
359
|
+
});
|
|
358
360
|
// After the whole keys are gone: what is left of one whose first line was
|
|
359
361
|
// cut off before the text got here.
|
|
360
362
|
const untailed = rewrite(shaped, PRIVATE_KEY_LAST_LINE, keyTail);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-scan.js","sourceRoot":"","sources":["../../src/controls/secret-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB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AAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* ## One list, written twice
|
|
6
6
|
*
|
|
7
7
|
* The repository already ships a list of credential shapes:
|
|
8
|
-
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`.
|
|
8
|
+
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`. Private-key
|
|
9
|
+
* blocks use the shared boundary reader in both redactors. It cannot be
|
|
9
10
|
* imported here. This module is compiled from `src/` into `dist/`, a script
|
|
10
11
|
* outside `src/` is not part of that build, and loading it at run time would
|
|
11
12
|
* be an asynchronous import where every caller (a report rule, a register
|
|
@@ -47,22 +48,21 @@ export declare const AUTHORIZATION_KIND = "AUTHORIZATION";
|
|
|
47
48
|
export declare const NAMED_SECRET_KIND = "SECRET";
|
|
48
49
|
/**
|
|
49
50
|
* Every provider-specific shape, in the order they are applied. Equal to
|
|
50
|
-
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`.
|
|
51
|
+
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`. Private-key
|
|
52
|
+
* blocks use the shared boundary reader in both redactors.
|
|
51
53
|
*/
|
|
52
54
|
export declare const CREDENTIAL_SHAPES: readonly CredentialShape[];
|
|
53
55
|
/**
|
|
54
56
|
* The last line of a private key.
|
|
55
57
|
*
|
|
56
|
-
*
|
|
58
|
+
* The shared boundary reader finds a key by the line that starts it. Output a
|
|
57
59
|
* program printed can reach the scan with that line already gone, because
|
|
58
60
|
* only the end of a long output is kept, and then the key's body and its
|
|
59
61
|
* last line are all that is left. The scan finds those by this line; see
|
|
60
62
|
* `./secret-scan.ts`.
|
|
61
63
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* thing that happens to captured output, and the shipped list is used on
|
|
65
|
-
* text that was never cut.
|
|
64
|
+
* Text beginning part-way through a key is a captured-output case, covered
|
|
65
|
+
* here in addition to complete blocks.
|
|
66
66
|
*/
|
|
67
67
|
export declare const PRIVATE_KEY_LAST_LINE: RegExp;
|
|
68
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-shapes.d.ts","sourceRoot":"","sources":["../../src/controls/secret-shapes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secret-shapes.d.ts","sourceRoot":"","sources":["../../src/controls/secret-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD,iCAAiC;AACjC,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAuCtD,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,QAA4C,CAAC;AAK/E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoBlE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAWhE"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* ## One list, written twice
|
|
6
6
|
*
|
|
7
7
|
* The repository already ships a list of credential shapes:
|
|
8
|
-
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`.
|
|
8
|
+
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`. Private-key
|
|
9
|
+
* blocks use the shared boundary reader in both redactors. It cannot be
|
|
9
10
|
* imported here. This module is compiled from `src/` into `dist/`, a script
|
|
10
11
|
* outside `src/` is not part of that build, and loading it at run time would
|
|
11
12
|
* be an asynchronous import where every caller (a report rule, a register
|
|
@@ -35,20 +36,10 @@ export const AUTHORIZATION_KIND = "AUTHORIZATION";
|
|
|
35
36
|
export const NAMED_SECRET_KIND = "SECRET";
|
|
36
37
|
/**
|
|
37
38
|
* Every provider-specific shape, in the order they are applied. Equal to
|
|
38
|
-
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`.
|
|
39
|
+
* `SECRET_SHAPES` in `scripts/lib/phrase-tests/redact.mjs`. Private-key
|
|
40
|
+
* blocks use the shared boundary reader in both redactors.
|
|
39
41
|
*/
|
|
40
42
|
export const CREDENTIAL_SHAPES = Object.freeze([
|
|
41
|
-
{
|
|
42
|
-
kind: PRIVATE_KEY_KIND,
|
|
43
|
-
// A key runs from its first line to its last line, or, when another
|
|
44
|
-
// block's first line comes before that, up to that line. The body never
|
|
45
|
-
// reads past the start of another block: read to the end of the text
|
|
46
|
-
// from each first line, a megabyte of first lines with no last line took
|
|
47
|
-
// ten seconds, and the time grew with the square of the length. A first
|
|
48
|
-
// line with nothing after it but another block, or with no last line
|
|
49
|
-
// anywhere after it, is taken out alone.
|
|
50
|
-
re: /-----BEGIN [A-Z ]*PRIVATE KEY-----(?:(?:(?!-----BEGIN )[\s\S])+?(?:-----END [A-Z ]*PRIVATE KEY-----|(?=-----BEGIN )))?/gu,
|
|
51
|
-
},
|
|
52
43
|
{
|
|
53
44
|
kind: URL_CREDENTIALS_KIND,
|
|
54
45
|
// The scheme is at most 64 characters. Without a bound, every word in a
|
|
@@ -91,16 +82,14 @@ export const CREDENTIAL_SHAPES = Object.freeze([
|
|
|
91
82
|
/**
|
|
92
83
|
* The last line of a private key.
|
|
93
84
|
*
|
|
94
|
-
*
|
|
85
|
+
* The shared boundary reader finds a key by the line that starts it. Output a
|
|
95
86
|
* program printed can reach the scan with that line already gone, because
|
|
96
87
|
* only the end of a long output is kept, and then the key's body and its
|
|
97
88
|
* last line are all that is left. The scan finds those by this line; see
|
|
98
89
|
* `./secret-scan.ts`.
|
|
99
90
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* thing that happens to captured output, and the shipped list is used on
|
|
103
|
-
* text that was never cut.
|
|
91
|
+
* Text beginning part-way through a key is a captured-output case, covered
|
|
92
|
+
* here in addition to complete blocks.
|
|
104
93
|
*/
|
|
105
94
|
export const PRIVATE_KEY_LAST_LINE = /-----END (?:[A-Z]+ )*PRIVATE KEY-----/gu;
|
|
106
95
|
/** A placeholder, wherever one stands in a piece of text. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-shapes.js","sourceRoot":"","sources":["../../src/controls/secret-shapes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secret-shapes.js","sourceRoot":"","sources":["../../src/controls/secret-shapes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAeH,wEAAwE;AACxE,MAAM,CAAC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAEtD,iCAAiC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAE9C,wDAAwD;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAElD,wEAAwE;AACxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QA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AC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,OAAO,IAAI,KAAK,SAAS,IAAI,qBAAqB,CAAC,IAAI,CAAC,KAAK,SAAS;gBACpE,CAAC,CAAC,CAAC,IAAI,CAAC;gBACR,CAAC,CAAC,EAAE,CAAC;QACT,CAAC,CAAC,CACH;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { GatesDeclaration, GatesModule } from "./gates-declaration.js";
|
|
2
|
+
/** The package manifest a project declares its tasks in. */
|
|
3
|
+
export declare const MANIFEST_PATH = "package.json";
|
|
4
|
+
/** Something read, or the lines saying why it could not be. */
|
|
5
|
+
export type ProjectRead<Value> = {
|
|
6
|
+
readonly problems: null;
|
|
7
|
+
readonly value: Value;
|
|
8
|
+
} | {
|
|
9
|
+
readonly problems: readonly string[];
|
|
10
|
+
};
|
|
11
|
+
/** The existing seed command's report for one declared moment. */
|
|
12
|
+
export interface SeededGate {
|
|
13
|
+
readonly gate: string;
|
|
14
|
+
readonly moment: string;
|
|
15
|
+
readonly run: string | null;
|
|
16
|
+
}
|
|
17
|
+
/** Library that can seed supported project checks as well as resolve them. */
|
|
18
|
+
export interface SeedingGatesModule extends GatesModule {
|
|
19
|
+
readonly seedGates: (options: {
|
|
20
|
+
readonly gates?: Record<string, unknown>;
|
|
21
|
+
readonly scripts?: Record<string, string>;
|
|
22
|
+
readonly runner?: string;
|
|
23
|
+
}) => {
|
|
24
|
+
readonly gates: Record<string, unknown>;
|
|
25
|
+
readonly seeded: readonly SeededGate[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Detect the shipped types for a project, including any parent types.
|
|
30
|
+
* @param root - The project directory
|
|
31
|
+
* @returns The supported types, in Lisa's order
|
|
32
|
+
*/
|
|
33
|
+
export declare function detectSupportedTypes(root: string): Promise<readonly string[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Read the project's tasks. A missing manifest means no scripts. An unreadable
|
|
36
|
+
* manifest leaves the project's tasks unknown.
|
|
37
|
+
* @param root - The project directory
|
|
38
|
+
* @param scope - The project path in the repository, for diagnostics
|
|
39
|
+
* @returns The parsed scripts or the reason they could not be read
|
|
40
|
+
*/
|
|
41
|
+
export declare function readProjectScripts(root: string, scope?: string): Promise<ProjectRead<Record<string, string>>>;
|
|
42
|
+
/** A folder's project types, declared tasks, and lockfile-selected runner. */
|
|
43
|
+
export interface ShippedFolder {
|
|
44
|
+
readonly scope: string;
|
|
45
|
+
readonly types: readonly string[];
|
|
46
|
+
readonly scripts: Record<string, string>;
|
|
47
|
+
readonly runner: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Read an audited folder of this repository without following a folder link.
|
|
51
|
+
* @param root - Real repository path
|
|
52
|
+
* @param scope - The folder path, relative to the repository
|
|
53
|
+
* @param detect - The same project type detector used for a single project
|
|
54
|
+
* @returns The folder's facts, or a manifest read error
|
|
55
|
+
*/
|
|
56
|
+
export declare function readShippedFolder(root: string, scope: string, detect?: typeof detectSupportedTypes): Promise<ProjectRead<ShippedFolder>>;
|
|
57
|
+
/**
|
|
58
|
+
* Detect support at the scope where each declared control runs.
|
|
59
|
+
* @param root - The repository root
|
|
60
|
+
* @param scopes - The scopes in the control register
|
|
61
|
+
* @returns Scopes whose own project type provides shipped checks
|
|
62
|
+
*/
|
|
63
|
+
export declare function supportedControlScopes(root: string, scopes: readonly string[]): Promise<ReadonlySet<string>>;
|
|
64
|
+
/** A shipped gate with one fixed argv for each covered folder. */
|
|
65
|
+
interface ShippedGate {
|
|
66
|
+
readonly declaration: Record<string, unknown>;
|
|
67
|
+
readonly seeded: readonly SeededGate[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Compose the scoped checks that can be represented without changing when
|
|
71
|
+
* they run. Each configured moment runs every part of a gate with the same
|
|
72
|
+
* argv, so only keep moments that all its participating folders share.
|
|
73
|
+
* @param folders - The supported folder projects
|
|
74
|
+
* @param registry - The shipped gate registry
|
|
75
|
+
* @returns Gates and the moments to report as seeded
|
|
76
|
+
*/
|
|
77
|
+
export declare function planShippedPartGates(folders: readonly ShippedFolder[], registry: SeedingGatesModule): Map<string, ShippedGate>;
|
|
78
|
+
/**
|
|
79
|
+
* Identify folder declarations that can be reproduced exactly from shipping
|
|
80
|
+
* defaults and the checked-out project. Only these can support the register
|
|
81
|
+
* without an audit locator or answered question.
|
|
82
|
+
* @param root - Real repository path
|
|
83
|
+
* @param declaration - The validated gates declaration
|
|
84
|
+
* @param registry - The shipped gate registry
|
|
85
|
+
* @returns Gate IDs with a confirmed shipped declaration
|
|
86
|
+
*/
|
|
87
|
+
export declare function confirmedShippedPartGates(root: string, declaration: GatesDeclaration, registry: GatesModule): Promise<ReadonlySet<string>>;
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=shipped-parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipped-parts.d.ts","sourceRoot":"","sources":["../../src/controls/shipped-parts.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAQ5E,4DAA4D;AAC5D,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,+DAA+D;AAC/D,MAAM,MAAM,WAAW,CAAC,KAAK,IACzB;IAAE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAE7C,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,8EAA8E;AAC9E,MA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,SAAS,MAAM,EAAE,GACxB,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAY9B;AAED,kEAAkE;AAClE,UAAU,WAAW;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;CACxC;AAiDD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,QAAQ,EAAE,kBAAkB,GAC3B,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAO1B;AA4CD;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,gBAAgB,EAC7B,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CA+C9B"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/** Read and declare the checks Lisa ships for each supported folder. */
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { createDetectorRegistry } from "../detection/index.js";
|
|
5
|
+
import { detectRunner } from "../migrations/ensure-seeded-gates.js";
|
|
6
|
+
import { isJsonObject } from "../sync/json-path.js";
|
|
7
|
+
import { pathKind, resolveRepositoryRoot } from "./audit-report-file.js";
|
|
8
|
+
import { canonicalText, compareCodeUnits } from "./canonical-json.js";
|
|
9
|
+
import { WHOLE_REPOSITORY_SCOPE } from "./register-types.js";
|
|
10
|
+
import { createRepositoryReader, recordKeepingPlace, } from "./repository-reader.js";
|
|
11
|
+
import { parseProblemWithoutExcerpt } from "./secret-scan-json.js";
|
|
12
|
+
/** The package manifest a project declares its tasks in. */
|
|
13
|
+
export const MANIFEST_PATH = "package.json";
|
|
14
|
+
/**
|
|
15
|
+
* Detect the shipped types for a project, including any parent types.
|
|
16
|
+
* @param root - The project directory
|
|
17
|
+
* @returns The supported types, in Lisa's order
|
|
18
|
+
*/
|
|
19
|
+
export async function detectSupportedTypes(root) {
|
|
20
|
+
const registry = createDetectorRegistry();
|
|
21
|
+
return registry.expandAndOrderTypes(await registry.detectAll(root));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Read the project's tasks. A missing manifest means no scripts. An unreadable
|
|
25
|
+
* manifest leaves the project's tasks unknown.
|
|
26
|
+
* @param root - The project directory
|
|
27
|
+
* @param scope - The project path in the repository, for diagnostics
|
|
28
|
+
* @returns The parsed scripts or the reason they could not be read
|
|
29
|
+
*/
|
|
30
|
+
export async function readProjectScripts(root, scope = WHOLE_REPOSITORY_SCOPE) {
|
|
31
|
+
const file = path.join(root, MANIFEST_PATH);
|
|
32
|
+
const kind = await pathKind(file);
|
|
33
|
+
if (kind === "missing")
|
|
34
|
+
return { problems: null, value: {} };
|
|
35
|
+
const manifestPath = scope === WHOLE_REPOSITORY_SCOPE
|
|
36
|
+
? MANIFEST_PATH
|
|
37
|
+
: `${scope}/${MANIFEST_PATH}`;
|
|
38
|
+
const refused = (why) => ({
|
|
39
|
+
problems: [
|
|
40
|
+
`${manifestPath} ${why}, so the tasks this repository has cannot be read from it.`,
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
if (scope !== WHOLE_REPOSITORY_SCOPE && kind !== "file") {
|
|
44
|
+
return refused("is not an ordinary file");
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const manifest = JSON.parse(await readFile(file, "utf8"));
|
|
48
|
+
if (!isJsonObject(manifest))
|
|
49
|
+
return refused("does not hold a JSON object");
|
|
50
|
+
if (manifest.scripts === undefined)
|
|
51
|
+
return { problems: null, value: {} };
|
|
52
|
+
return isJsonObject(manifest.scripts)
|
|
53
|
+
? { problems: null, value: manifest.scripts }
|
|
54
|
+
: refused(`has a "scripts" entry that is not an object`);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
return refused(`cannot be read as JSON (${parseProblemWithoutExcerpt(error)})`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Read an audited folder of this repository without following a folder link.
|
|
62
|
+
* @param root - Real repository path
|
|
63
|
+
* @param scope - The folder path, relative to the repository
|
|
64
|
+
* @param detect - The same project type detector used for a single project
|
|
65
|
+
* @returns The folder's facts, or a manifest read error
|
|
66
|
+
*/
|
|
67
|
+
export async function readShippedFolder(root, scope, detect = detectSupportedTypes) {
|
|
68
|
+
const folder = path.resolve(root, scope);
|
|
69
|
+
if (folder === root ||
|
|
70
|
+
recordKeepingPlace(scope) !== null ||
|
|
71
|
+
!createRepositoryReader(root).isFolder(scope) ||
|
|
72
|
+
(await resolveRepositoryRoot(folder)) !== folder) {
|
|
73
|
+
return {
|
|
74
|
+
problems: null,
|
|
75
|
+
value: { scope, types: [], scripts: {}, runner: "" },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const scripts = await readProjectScripts(folder, scope);
|
|
79
|
+
if (scripts.problems !== null)
|
|
80
|
+
return scripts;
|
|
81
|
+
const [types, runner] = await Promise.all([
|
|
82
|
+
detect(folder),
|
|
83
|
+
detectRunner(folder),
|
|
84
|
+
]);
|
|
85
|
+
return {
|
|
86
|
+
problems: null,
|
|
87
|
+
value: { scope, types, scripts: scripts.value, runner },
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Detect support at the scope where each declared control runs.
|
|
92
|
+
* @param root - The repository root
|
|
93
|
+
* @param scopes - The scopes in the control register
|
|
94
|
+
* @returns Scopes whose own project type provides shipped checks
|
|
95
|
+
*/
|
|
96
|
+
export async function supportedControlScopes(root, scopes) {
|
|
97
|
+
const supported = await Promise.all([...new Set(scopes)].map(async (scope) => {
|
|
98
|
+
if (scope === WHOLE_REPOSITORY_SCOPE)
|
|
99
|
+
return (await detectSupportedTypes(root)).length > 0 ? scope : null;
|
|
100
|
+
const folder = await readShippedFolder(root, scope);
|
|
101
|
+
return folder.problems === null && folder.value.types.length > 0
|
|
102
|
+
? scope
|
|
103
|
+
: null;
|
|
104
|
+
}));
|
|
105
|
+
return new Set(supported.filter(scope => scope !== null));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Resolve the actual tasks through the same registry as whole-project seeding.
|
|
109
|
+
* @param folder - A supported folder's project facts
|
|
110
|
+
* @param registry - The shipped gate registry
|
|
111
|
+
* @returns The tasks the registry can seed
|
|
112
|
+
*/
|
|
113
|
+
function folderTasks(folder, registry) {
|
|
114
|
+
const { scope, scripts, runner } = folder;
|
|
115
|
+
const { gates, seeded } = registry.seedGates({ scripts, runner });
|
|
116
|
+
return seeded.flatMap(row => {
|
|
117
|
+
const resolved = registry.resolveMoment({
|
|
118
|
+
gates,
|
|
119
|
+
scripts,
|
|
120
|
+
runner,
|
|
121
|
+
moment: row.moment,
|
|
122
|
+
});
|
|
123
|
+
const task = resolved.find(gate => gate.id === row.gate)?.task;
|
|
124
|
+
return typeof task === "string" ? [{ ...row, scope, task, runner }] : [];
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Group a gate's candidate tasks for comparing its folders and moments.
|
|
129
|
+
* @param tasks - The candidate tasks
|
|
130
|
+
* @param field - The task field identifying each group
|
|
131
|
+
* @returns Tasks grouped in their original order
|
|
132
|
+
*/
|
|
133
|
+
function groupTasks(tasks, field) {
|
|
134
|
+
const keys = [...new Set(tasks.map(task => task[field]))];
|
|
135
|
+
return new Map(keys.map(key => [key, tasks.filter(task => task[field] === key)]));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Compose the scoped checks that can be represented without changing when
|
|
139
|
+
* they run. Each configured moment runs every part of a gate with the same
|
|
140
|
+
* argv, so only keep moments that all its participating folders share.
|
|
141
|
+
* @param folders - The supported folder projects
|
|
142
|
+
* @param registry - The shipped gate registry
|
|
143
|
+
* @returns Gates and the moments to report as seeded
|
|
144
|
+
*/
|
|
145
|
+
export function planShippedPartGates(folders, registry) {
|
|
146
|
+
return assemblePartGates([...folders]
|
|
147
|
+
.sort((left, right) => compareCodeUnits(left.scope, right.scope))
|
|
148
|
+
.filter(folder => folder.types.length > 0)
|
|
149
|
+
.flatMap(folder => folderTasks(folder, registry)));
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Assemble representable declarations from observed tasks.
|
|
153
|
+
* @param tasks - The tasks selected for each folder
|
|
154
|
+
* @returns Scoped gates and their reported moments
|
|
155
|
+
*/
|
|
156
|
+
function assemblePartGates(tasks) {
|
|
157
|
+
return new Map([...groupTasks(tasks, "gate")].flatMap(([gate, rows]) => {
|
|
158
|
+
const byFolder = groupTasks(rows, "scope");
|
|
159
|
+
const moments = [...groupTasks(rows, "moment")]
|
|
160
|
+
.filter(([, matches]) => matches.length === byFolder.size)
|
|
161
|
+
.map(([moment]) => moment);
|
|
162
|
+
if (moments.length === 0)
|
|
163
|
+
return [];
|
|
164
|
+
const parts = [...byFolder].flatMap(([scope, folderRows]) => {
|
|
165
|
+
const chosen = folderRows.filter(row => moments.includes(row.moment));
|
|
166
|
+
const [first] = chosen;
|
|
167
|
+
return first !== undefined &&
|
|
168
|
+
chosen.every(row => row.task === first.task)
|
|
169
|
+
? [{ scope, command: [...first.runner.split(" "), first.task] }]
|
|
170
|
+
: [];
|
|
171
|
+
});
|
|
172
|
+
if (parts.length !== byFolder.size)
|
|
173
|
+
return [];
|
|
174
|
+
return [
|
|
175
|
+
[
|
|
176
|
+
gate,
|
|
177
|
+
{
|
|
178
|
+
declaration: {
|
|
179
|
+
...Object.fromEntries(moments.map(moment => [moment, "required"])),
|
|
180
|
+
parts,
|
|
181
|
+
},
|
|
182
|
+
seeded: moments.map(moment => ({ gate, moment, run: null })),
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
];
|
|
186
|
+
}));
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Identify folder declarations that can be reproduced exactly from shipping
|
|
190
|
+
* defaults and the checked-out project. Only these can support the register
|
|
191
|
+
* without an audit locator or answered question.
|
|
192
|
+
* @param root - Real repository path
|
|
193
|
+
* @param declaration - The validated gates declaration
|
|
194
|
+
* @param registry - The shipped gate registry
|
|
195
|
+
* @returns Gate IDs with a confirmed shipped declaration
|
|
196
|
+
*/
|
|
197
|
+
export async function confirmedShippedPartGates(root, declaration, registry) {
|
|
198
|
+
if (!("seedGates" in registry) || typeof registry.seedGates !== "function")
|
|
199
|
+
return new Set();
|
|
200
|
+
const seedingRegistry = registry;
|
|
201
|
+
const candidates = Object.entries(declaration.gates).flatMap(([id, gate]) => {
|
|
202
|
+
if (!Array.isArray(gate.parts))
|
|
203
|
+
return [];
|
|
204
|
+
const parts = gate.parts;
|
|
205
|
+
return parts.some(part => part.evidence !== undefined)
|
|
206
|
+
? []
|
|
207
|
+
: [{ id, gate, parts }];
|
|
208
|
+
});
|
|
209
|
+
const scopes = [
|
|
210
|
+
...new Set(candidates.flatMap(({ parts }) => parts.map(part => part.scope))),
|
|
211
|
+
].sort(compareCodeUnits);
|
|
212
|
+
const tasks = new Map(await Promise.all(scopes.map(async (scope) => {
|
|
213
|
+
const read = await readShippedFolder(root, scope);
|
|
214
|
+
return [
|
|
215
|
+
scope,
|
|
216
|
+
read.problems === null && read.value.types.length > 0
|
|
217
|
+
? folderTasks(read.value, seedingRegistry)
|
|
218
|
+
: [],
|
|
219
|
+
];
|
|
220
|
+
})));
|
|
221
|
+
return new Set(candidates.flatMap(({ id, gate, parts }) => {
|
|
222
|
+
const included = new Set(parts.map(part => part.scope));
|
|
223
|
+
const selected = scopes
|
|
224
|
+
.filter(scope => included.has(scope))
|
|
225
|
+
.flatMap(scope => (tasks.get(scope) ?? []).filter(task => task.gate === id));
|
|
226
|
+
const expected = assemblePartGates(selected).get(id);
|
|
227
|
+
return expected !== undefined &&
|
|
228
|
+
canonicalText(gate) === canonicalText(expected.declaration)
|
|
229
|
+
? [id]
|
|
230
|
+
: [];
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
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