@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
|
@@ -726,11 +726,14 @@ HTTP_CLIS = {"curl", "http", "httpie", "wget"}
|
|
|
726
726
|
# and permitting something we demonstrably cannot read. Deliberately narrower
|
|
727
727
|
# than "mentions a tracker CLI" so an ordinary unparseable command
|
|
728
728
|
# (`echo 'it's fine`) still passes.
|
|
729
|
+
# The GitHub collection can create an issue. A complete numeric member path
|
|
730
|
+
# identifies an existing issue. Keep the fallback for other route forms and
|
|
731
|
+
# for independent creation signatures appearing alongside a member path.
|
|
729
732
|
UNPARSEABLE_CREATION = re.compile(
|
|
730
733
|
r"\b(?:gh|jira|linear)\b[^\n]*?\bissue\b[^\n]*?\bcreate\b"
|
|
731
734
|
r"|\bacli\b[^\n]*?\b(?:workitem|issue)s?\b[^\n]*?\bcreate\b"
|
|
732
735
|
r"|\bcreateIssue\b|\bissueCreate\b"
|
|
733
|
-
r"|repos/[^/\s]+/[^/\s]+/issues"
|
|
736
|
+
r"|repos/[^/\s]+/[^/\s]+/issues\b(?!/[0-9]+(?:$|[\s'\"`.,);?#]))"
|
|
734
737
|
r"|atlassian\.net/rest/api/[^/\s]+/issue",
|
|
735
738
|
re.IGNORECASE,
|
|
736
739
|
)
|
|
@@ -439,6 +439,56 @@ function applyCd(current, target) {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
+
const PYTHON_STRING = String.raw`(?:"[^"\\]*"|'[^'\\]*')`;
|
|
443
|
+
const PYTHON_BYTES = `b${PYTHON_STRING}`;
|
|
444
|
+
const PYTHON_NAME = "[A-Za-z_][A-Za-z0-9_]*";
|
|
445
|
+
const PYTHON_BYTES_ASSIGNMENT = new RegExp(
|
|
446
|
+
String.raw`^(${PYTHON_NAME})[ \t]*=[ \t]*${PYTHON_BYTES}$`,
|
|
447
|
+
"u"
|
|
448
|
+
);
|
|
449
|
+
const PYTHON_BYTES_COMPARISON = new RegExp(
|
|
450
|
+
String.raw`^assert[ \t]+(${PYTHON_NAME})\.replace\([ \t]*${PYTHON_BYTES}[ \t]*,[ \t]*${PYTHON_BYTES}[ \t]*\)[ \t]*==[ \t]*(${PYTHON_NAME})$`,
|
|
451
|
+
"u"
|
|
452
|
+
);
|
|
453
|
+
const PYTHON_LITERAL_GIT_CALL = new RegExp(
|
|
454
|
+
String.raw`^subprocess\.check_output\(\[[ \t]*(?:"git"|'git')(?:[ \t]*,[ \t]*${PYTHON_STRING})*[ \t]*\](?:[ \t]*,[ \t]*cwd[ \t]*=[ \t]*b?${PYTHON_STRING})?[ \t]*\)$`,
|
|
455
|
+
"u"
|
|
456
|
+
);
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Ignore the literals of a bounded Python source-byte comparison. The script
|
|
460
|
+
* can assign two bytes values and compare one replacement with the other.
|
|
461
|
+
* Optional literal Git subprocess calls remain visible to the path scanner.
|
|
462
|
+
* Any additional Python statement keeps the full source under inspection.
|
|
463
|
+
* @param {string} text - The bounded source read from the script
|
|
464
|
+
* @returns {string} The source to inspect for directory paths
|
|
465
|
+
*/
|
|
466
|
+
function pythonSourceForPathScan(text) {
|
|
467
|
+
const lines = text
|
|
468
|
+
.split(/\r\n?|\n/u)
|
|
469
|
+
.map(line => line.trim())
|
|
470
|
+
.filter(line => line !== "" && !line.startsWith("#"));
|
|
471
|
+
const importsSubprocess = lines[0] === "import subprocess";
|
|
472
|
+
const [first, second, assertion, ...calls] = lines.slice(
|
|
473
|
+
importsSubprocess ? 1 : 0
|
|
474
|
+
);
|
|
475
|
+
const before = PYTHON_BYTES_ASSIGNMENT.exec(first ?? "")?.[1];
|
|
476
|
+
const after = PYTHON_BYTES_ASSIGNMENT.exec(second ?? "")?.[1];
|
|
477
|
+
const compared = PYTHON_BYTES_COMPARISON.exec(assertion ?? "");
|
|
478
|
+
if (
|
|
479
|
+
before === undefined ||
|
|
480
|
+
after === undefined ||
|
|
481
|
+
before === after ||
|
|
482
|
+
compared?.[1] !== before ||
|
|
483
|
+
compared[2] !== after ||
|
|
484
|
+
(calls.length > 0 && !importsSubprocess) ||
|
|
485
|
+
!calls.every(line => PYTHON_LITERAL_GIT_CALL.test(line))
|
|
486
|
+
) {
|
|
487
|
+
return text;
|
|
488
|
+
}
|
|
489
|
+
return calls.join("\n");
|
|
490
|
+
}
|
|
491
|
+
|
|
442
492
|
/**
|
|
443
493
|
* The foreign worktree an executed script reaches, or null.
|
|
444
494
|
*
|
|
@@ -529,7 +579,12 @@ function scriptReachingForeignTree(payload, bound) {
|
|
|
529
579
|
// Not a readable file: nothing was executed that this can read.
|
|
530
580
|
continue;
|
|
531
581
|
}
|
|
532
|
-
const
|
|
582
|
+
const program = tokenise(segment)[0]?.split("/").at(-1);
|
|
583
|
+
const inspected =
|
|
584
|
+
program === "python" || program === "python3"
|
|
585
|
+
? pythonSourceForPathScan(text)
|
|
586
|
+
: text;
|
|
587
|
+
const foreign = foreignTreeIn(inspected, bound, cwd);
|
|
533
588
|
if (foreign) return { script: path, foreign };
|
|
534
589
|
}
|
|
535
590
|
return null;
|
|
@@ -129,6 +129,13 @@ For a before-enforce run, go from here to "The before-enforce run".
|
|
|
129
129
|
**Needs:** the repository root. **Hands on:** one result for each declared check, and three
|
|
130
130
|
written files.
|
|
131
131
|
|
|
132
|
+
Read the committed `controls.proof_copy.prepare` in `.lisa.config.json` before
|
|
133
|
+
running a proof. If commands are declared and the operator has yet to approve
|
|
134
|
+
this repository and command list, show the exact arguments and ask once before
|
|
135
|
+
the first run. Say that the commands run in the temporary copy and can use this
|
|
136
|
+
machine's network and credentials. Reuse approval recorded by configure for the
|
|
137
|
+
same list. Apply the same rule before a `--before-enforce` run.
|
|
138
|
+
|
|
132
139
|
```bash
|
|
133
140
|
lisa controls attest --json
|
|
134
141
|
```
|
|
@@ -146,8 +153,11 @@ A proof is two test changes, kept as patch files: one that breaks the check's ru
|
|
|
146
153
|
does not. At commit and at push a check is only started when the change touches the check's own
|
|
147
154
|
folder. So each test change has to edit a file inside the check's own folder: one that edits a
|
|
148
155
|
file anywhere else never starts the check, and that half reads `unknown` (not started), never a
|
|
149
|
-
pass. When an entry is `unknown` for that reason, say so
|
|
150
|
-
|
|
156
|
+
pass. When an entry is `unknown` for that reason, say so and send it back to
|
|
157
|
+
`/lisa:configure` to correct the test change. If the reason is an unavailable
|
|
158
|
+
dependency or hook, read the detail for what is still missing after any declared
|
|
159
|
+
preparation. A preparation failure ends the command before it produces an
|
|
160
|
+
entry verdict.
|
|
151
161
|
|
|
152
162
|
An entry that is `unproved` because a test change is missing (`reason` is `half-missing`) has
|
|
153
163
|
nothing wrong with its check: the two test changes were never written for it, or only one was. The
|
|
@@ -149,10 +149,11 @@ It prints one JSON document. Read these fields:
|
|
|
149
149
|
| `seeded` | The checks it declared just now, each with the moment it runs at. |
|
|
150
150
|
| `declared_gates` | How many checks the declaration holds now. |
|
|
151
151
|
|
|
152
|
-
- **`paved`.**
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
- **`paved`.** Lisa ships checks for the whole repository's project type or for every folder
|
|
153
|
+
the audit named. The command declares the available shipped checks using each project's own
|
|
154
|
+
tasks. A folder check runs in that folder with its task runner. Already declared gates keep
|
|
155
|
+
their settings, and running the command again leaves the declarations unchanged.
|
|
156
|
+
**Go straight to step 7, and
|
|
156
157
|
skip step 8.** If
|
|
157
158
|
`declared_gates` is `0`, nothing could be declared because the repository does not yet have the
|
|
158
159
|
tasks those checks run: say so in your closing message, and that setting Lisa up for this
|
|
@@ -317,14 +318,14 @@ exist. Keep everything else in the file as it is.
|
|
|
317
318
|
|
|
318
319
|
### Step 7: Have the declaration checked against the audit
|
|
319
320
|
|
|
320
|
-
**Needs:** the declaration. **Hands on:** a declaration
|
|
321
|
+
**Needs:** the declaration. **Hands on:** a declaration supported by shipped checks or audit evidence.
|
|
321
322
|
|
|
322
323
|
```bash
|
|
323
324
|
lisa controls declaration-check
|
|
324
325
|
```
|
|
325
326
|
|
|
326
|
-
- **Exit 0.**
|
|
327
|
-
|
|
327
|
+
- **Exit 0.** Lisa reproduced the shipped folder checks from the local task manifests and
|
|
328
|
+
confirmed audit support for any parts declared from findings.
|
|
328
329
|
- **Any other exit.** Each line printed is one problem, naming the gate and the part. A part that
|
|
329
330
|
names a place the audit did not report, rests on a question nobody answered or on an answer
|
|
330
331
|
about something else, or serves a requirement the audit still asks about is refused. Correct the
|
|
@@ -430,13 +431,26 @@ is written, remove the scratch folder. Nothing of it is left in the repository.
|
|
|
430
431
|
|
|
431
432
|
**4. Have the pairs tried.**
|
|
432
433
|
|
|
434
|
+
If a fresh clone needs dependencies, generated output or a hook manager, propose
|
|
435
|
+
the argument lists for `controls.proof_copy.prepare` in `.lisa.config.json`. Use
|
|
436
|
+
the repository's lockfile, declared package manager and hook configuration to
|
|
437
|
+
identify the commands. For example, a Bun project with Lefthook may need
|
|
438
|
+
`[["bun", "install", "--frozen-lockfile"], ["./node_modules/.bin/lefthook", "install"]]`.
|
|
439
|
+
Record the approved commands in the committed config before trying the pairs.
|
|
440
|
+
|
|
441
|
+
Before the first run that uses those commands, show their exact arguments and
|
|
442
|
+
ask the operator once. For example, “May I run these setup commands in the
|
|
443
|
+
temporary copy? They can use this machine's network and credentials.” Carry
|
|
444
|
+
the answer into the attest handoff for the same repository and command list.
|
|
445
|
+
Ask again only if the command list changes.
|
|
446
|
+
|
|
433
447
|
```bash
|
|
434
448
|
lisa controls proof-check
|
|
435
449
|
```
|
|
436
450
|
|
|
437
451
|
It puts each change on the last commit in a temporary copy, runs the check's own command on it
|
|
438
|
-
there, and removes the copy.
|
|
439
|
-
works with uncommitted work in place. It prints one JSON document; read `parts`, one entry per
|
|
452
|
+
there, and removes the copy. The configured preparation runs once in that copy before the
|
|
453
|
+
checks. It works with uncommitted work in place and leaves the repository files alone. It prints one JSON document; read `parts`, one entry per
|
|
440
454
|
declared part:
|
|
441
455
|
|
|
442
456
|
| `result` | Meaning | What you do |
|
|
@@ -454,10 +468,10 @@ declared part:
|
|
|
454
468
|
Repeat until every part that declares a pair reads `ready`. Ground rule 9 holds throughout: you
|
|
455
469
|
change the test changes, never the check.
|
|
456
470
|
|
|
457
|
-
The temporary copy
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
471
|
+
The temporary copy starts from the last commit. If a check needs dependencies or generated files,
|
|
472
|
+
configure and obtain approval for `controls.proof_copy.prepare` as described above, then rerun
|
|
473
|
+
`proof-check`. Without suitable preparation, the check may fail to start or fail on the clean
|
|
474
|
+
change. Keep installed dependencies and generated output out of the commit.
|
|
461
475
|
|
|
462
476
|
When a pair cannot be made ready honestly (the tool is not installed on this machine, it cannot run
|
|
463
477
|
in a copy of the last commit, or the check does not catch what it was assumed to catch), delete its
|