@codyswann/lisa 8.6.0 → 8.7.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/completion-authorization.mjs +3 -3
- package/all/copy-overwrite/scripts/lib/completion-proof-publisher.mjs +2 -1
- package/all/copy-overwrite/scripts/lib/completion-proof-shape.mjs +21 -1
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -3
- package/dist/controls/attest-check.d.ts.map +1 -1
- package/dist/controls/attest-check.js +31 -18
- package/dist/controls/attest-check.js.map +1 -1
- package/dist/controls/attest-record.d.ts +3 -0
- package/dist/controls/attest-record.d.ts.map +1 -1
- package/dist/controls/attest-record.js +28 -5
- package/dist/controls/attest-record.js.map +1 -1
- package/dist/controls/checks-binding.d.ts.map +1 -1
- package/dist/controls/checks-binding.js +28 -1
- package/dist/controls/checks-binding.js.map +1 -1
- package/dist/controls/commands/attest-host-proof.d.ts +18 -0
- package/dist/controls/commands/attest-host-proof.d.ts.map +1 -0
- package/dist/controls/commands/attest-host-proof.js +168 -0
- package/dist/controls/commands/attest-host-proof.js.map +1 -0
- package/dist/controls/commands/attest-options.d.ts +4 -0
- package/dist/controls/commands/attest-options.d.ts.map +1 -1
- package/dist/controls/commands/attest.d.ts.map +1 -1
- package/dist/controls/commands/attest.js +52 -0
- package/dist/controls/commands/attest.js.map +1 -1
- package/dist/controls/commands/declaration-check.d.ts.map +1 -1
- package/dist/controls/commands/declaration-check.js +19 -5
- package/dist/controls/commands/declaration-check.js.map +1 -1
- package/dist/controls/commands/register.d.ts.map +1 -1
- package/dist/controls/commands/register.js +4 -1
- package/dist/controls/commands/register.js.map +1 -1
- package/dist/controls/evidence-document.d.ts.map +1 -1
- package/dist/controls/evidence-document.js +12 -0
- package/dist/controls/evidence-document.js.map +1 -1
- package/dist/controls/evidence-gather.d.ts +1 -0
- package/dist/controls/evidence-gather.d.ts.map +1 -1
- package/dist/controls/evidence-gather.js +5 -2
- package/dist/controls/evidence-gather.js.map +1 -1
- package/dist/controls/evidence-types.d.ts +19 -1
- package/dist/controls/evidence-types.d.ts.map +1 -1
- package/dist/controls/evidence-types.js +11 -0
- package/dist/controls/evidence-types.js.map +1 -1
- package/dist/controls/evidence-write.d.ts.map +1 -1
- package/dist/controls/evidence-write.js +7 -1
- package/dist/controls/evidence-write.js.map +1 -1
- package/dist/controls/exercise-declaration.d.ts +58 -0
- package/dist/controls/exercise-declaration.d.ts.map +1 -0
- package/dist/controls/exercise-declaration.js +138 -0
- package/dist/controls/exercise-declaration.js.map +1 -0
- package/dist/controls/exercise-observations.d.ts +32 -0
- package/dist/controls/exercise-observations.d.ts.map +1 -0
- package/dist/controls/exercise-observations.js +141 -0
- package/dist/controls/exercise-observations.js.map +1 -0
- package/dist/controls/exercise-record-shape.d.ts +10 -0
- package/dist/controls/exercise-record-shape.d.ts.map +1 -0
- package/dist/controls/exercise-record-shape.js +29 -0
- package/dist/controls/exercise-record-shape.js.map +1 -0
- package/dist/controls/exercise-records.d.ts +28 -0
- package/dist/controls/exercise-records.d.ts.map +1 -0
- package/dist/controls/exercise-records.js +113 -0
- package/dist/controls/exercise-records.js.map +1 -0
- package/dist/controls/exercise-result.d.ts +23 -0
- package/dist/controls/exercise-result.d.ts.map +1 -0
- package/dist/controls/exercise-result.js +186 -0
- package/dist/controls/exercise-result.js.map +1 -0
- package/dist/controls/host-proof-input.d.ts +53 -0
- package/dist/controls/host-proof-input.d.ts.map +1 -0
- package/dist/controls/host-proof-input.js +129 -0
- package/dist/controls/host-proof-input.js.map +1 -0
- package/dist/controls/host-proof-receipt.d.ts +47 -0
- package/dist/controls/host-proof-receipt.d.ts.map +1 -0
- package/dist/controls/host-proof-receipt.js +132 -0
- package/dist/controls/host-proof-receipt.js.map +1 -0
- package/dist/controls/host-proof-register.d.ts +37 -0
- package/dist/controls/host-proof-register.d.ts.map +1 -0
- package/dist/controls/host-proof-register.js +153 -0
- package/dist/controls/host-proof-register.js.map +1 -0
- package/dist/controls/host-proof-signature.d.ts +30 -0
- package/dist/controls/host-proof-signature.d.ts.map +1 -0
- package/dist/controls/host-proof-signature.js +49 -0
- package/dist/controls/host-proof-signature.js.map +1 -0
- package/dist/controls/host-proof-trust.d.ts +33 -0
- package/dist/controls/host-proof-trust.d.ts.map +1 -0
- package/dist/controls/host-proof-trust.js +124 -0
- package/dist/controls/host-proof-trust.js.map +1 -0
- package/dist/controls/pull-request-executor.d.ts +18 -6
- package/dist/controls/pull-request-executor.d.ts.map +1 -1
- package/dist/controls/pull-request-executor.js +19 -24
- package/dist/controls/pull-request-executor.js.map +1 -1
- package/dist/controls/register-types.d.ts +3 -4
- package/dist/controls/register-types.d.ts.map +1 -1
- package/dist/controls/register-types.js +3 -4
- package/dist/controls/register-types.js.map +1 -1
- package/dist/controls/register.d.ts +4 -7
- package/dist/controls/register.d.ts.map +1 -1
- package/dist/controls/register.js +17 -6
- package/dist/controls/register.js.map +1 -1
- package/dist/controls/verdict-answers.d.ts.map +1 -1
- package/dist/controls/verdict-answers.js +6 -2
- package/dist/controls/verdict-answers.js.map +1 -1
- package/dist/controls/verdict-types.d.ts +1 -1
- package/dist/controls/verdict-types.d.ts.map +1 -1
- package/dist/controls/verdict-types.js +2 -0
- package/dist/controls/verdict-types.js.map +1 -1
- package/dist/controls/verdict-wording.d.ts +2 -0
- package/dist/controls/verdict-wording.d.ts.map +1 -1
- package/dist/controls/verdict-wording.js +7 -0
- package/dist/controls/verdict-wording.js.map +1 -1
- package/dist/controls/verdict.d.ts +2 -0
- package/dist/controls/verdict.d.ts.map +1 -1
- package/dist/controls/verdict.js +17 -2
- package/dist/controls/verdict.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +14 -0
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +64 -9
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/scripts/human-gate-act.mjs +50 -21
- package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/lisa/.codex-plugin/skills/lisa-usage-accounting/references/estimate.md +5 -5
- package/plugins/lisa/scripts/human-gate-act.mjs +50 -21
- package/plugins/lisa/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/lisa/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/lisa/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/lisa/skills/lisa-usage-accounting/references/estimate.md +5 -5
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/human-gate-act.mjs +50 -21
- package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/lisa-agy/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/lisa-agy/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/lisa-agy/skills/lisa-usage-accounting/references/estimate.md +5 -5
- 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/scripts/human-gate-act.mjs +50 -21
- package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/lisa-copilot/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/lisa-copilot/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/lisa-copilot/skills/lisa-usage-accounting/references/estimate.md +5 -5
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/scripts/human-gate-act.mjs +50 -21
- package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/lisa-cursor/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/lisa-cursor/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/lisa-cursor/skills/lisa-usage-accounting/references/estimate.md +5 -5
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/scripts/human-gate-act.mjs +50 -21
- package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/lisa-devin/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/lisa-devin/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/lisa-devin/skills/lisa-usage-accounting/references/estimate.md +5 -5
- 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/scripts/human-gate-act.mjs +50 -21
- package/plugins/src/base/skills/lisa-attest/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-configure/SKILL.md +3 -2
- package/plugins/src/base/skills/lisa-configure/references/exercised-artifacts.md +55 -0
- package/plugins/src/base/skills/lisa-enforce/references/pull-request-executor.md +34 -10
- package/plugins/src/base/skills/lisa-usage-accounting/references/estimate.md +5 -5
- package/schemas/control-evidence.schema.json +39 -1
- package/schemas/control-verdict.schema.json +1 -0
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"zod": "^4.6.7"
|
|
200
200
|
},
|
|
201
201
|
"name": "@codyswann/lisa",
|
|
202
|
-
"version": "8.
|
|
202
|
+
"version": "8.7.0",
|
|
203
203
|
"description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
|
|
204
204
|
"main": "dist/index.js",
|
|
205
205
|
"exports": {
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
"optional": true
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
|
-
"lisaReleaseCommit": "
|
|
374
|
-
"gitHead": "
|
|
375
|
-
"lisaReleaseTag": "v8.
|
|
373
|
+
"lisaReleaseCommit": "224f6660d7f38f4d02f6f02a9531ffda21fcb9cb",
|
|
374
|
+
"gitHead": "224f6660d7f38f4d02f6f02a9531ffda21fcb9cb",
|
|
375
|
+
"lisaReleaseTag": "v8.7.0"
|
|
376
376
|
}
|
|
@@ -116,6 +116,24 @@ function readConfig(file) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Whether parsed JSON is an object that can hold configuration keys.
|
|
121
|
+
* @param {unknown} value - Parsed configuration value
|
|
122
|
+
* @returns {boolean} Whether the value is a config object
|
|
123
|
+
*/
|
|
124
|
+
function isConfigObject(value) {
|
|
125
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Read the raw block, preserving invalid declarations for the mode resolver.
|
|
130
|
+
* @param {unknown} config - Parsed config file
|
|
131
|
+
* @returns {unknown} Raw human-gate block
|
|
132
|
+
*/
|
|
133
|
+
function humanGateBlock(config) {
|
|
134
|
+
return isConfigObject(config) ? config.humanGate : undefined;
|
|
135
|
+
}
|
|
136
|
+
|
|
119
137
|
/**
|
|
120
138
|
* The effective human-only classes: local override replaces global when set.
|
|
121
139
|
* @param {unknown} local - Parsed local config
|
|
@@ -123,10 +141,10 @@ function readConfig(file) {
|
|
|
123
141
|
* @returns {unknown[]} Declared classes
|
|
124
142
|
*/
|
|
125
143
|
export function resolveHumanOnly(local, global) {
|
|
126
|
-
const pick = config =>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
144
|
+
const pick = config => {
|
|
145
|
+
const block = humanGateBlock(config);
|
|
146
|
+
return isConfigObject(block) ? block.humanOnly : undefined;
|
|
147
|
+
};
|
|
130
148
|
const value = pick(local) ?? pick(global);
|
|
131
149
|
return Array.isArray(value) ? value : [];
|
|
132
150
|
}
|
|
@@ -142,27 +160,37 @@ export function resolveHumanOnly(local, global) {
|
|
|
142
160
|
* as `rejected` (its JSON spelling) so the caller can report it.
|
|
143
161
|
* @param {unknown} local - Parsed local config
|
|
144
162
|
* @param {unknown} global - Parsed global config
|
|
145
|
-
* @returns {{ mode: string, rejected?: string }} The mode in force
|
|
163
|
+
* @returns {{ mode: string, rejected?: string, rejectedBlock?: true }} The mode in force
|
|
146
164
|
*/
|
|
147
165
|
export function resolveHumanGateMode(local, global) {
|
|
148
|
-
const pick = config =>
|
|
149
|
-
|
|
166
|
+
const pick = config => {
|
|
167
|
+
const block = humanGateBlock(config);
|
|
168
|
+
if (!isConfigObject(block))
|
|
169
|
+
return { value: block, mode: undefined, malformed: true };
|
|
170
|
+
return {
|
|
171
|
+
value: block.mode,
|
|
172
|
+
mode: normalizeHumanGateMode(block.mode),
|
|
173
|
+
malformed: false,
|
|
174
|
+
};
|
|
175
|
+
};
|
|
150
176
|
// Every declaration is judged, so a typo in the committed file is reported
|
|
151
177
|
// even while a valid local value is in force.
|
|
152
178
|
const declared = [pick(local), pick(global)].filter(
|
|
153
|
-
|
|
179
|
+
entry => entry.value !== undefined
|
|
154
180
|
);
|
|
155
|
-
const valid = declared
|
|
156
|
-
.map(normalizeHumanGateMode)
|
|
157
|
-
.find(mode => HUMAN_GATE_MODES.includes(mode));
|
|
181
|
+
const valid = declared.find(entry => HUMAN_GATE_MODES.includes(entry.mode));
|
|
158
182
|
const invalid = declared.find(
|
|
159
|
-
|
|
183
|
+
entry => !HUMAN_GATE_MODES.includes(entry.mode)
|
|
160
184
|
);
|
|
161
185
|
const mode =
|
|
162
|
-
valid ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
|
|
186
|
+
valid?.mode ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
|
|
163
187
|
return invalid === undefined
|
|
164
188
|
? { mode }
|
|
165
|
-
: {
|
|
189
|
+
: {
|
|
190
|
+
mode,
|
|
191
|
+
rejected: JSON.stringify(invalid.value),
|
|
192
|
+
...(invalid.malformed ? { rejectedBlock: true } : {}),
|
|
193
|
+
};
|
|
166
194
|
}
|
|
167
195
|
|
|
168
196
|
/**
|
|
@@ -170,23 +198,24 @@ export function resolveHumanGateMode(local, global) {
|
|
|
170
198
|
* human-only classes, each resolved local-then-global.
|
|
171
199
|
* @param {unknown} local - Parsed local config
|
|
172
200
|
* @param {unknown} global - Parsed global config
|
|
173
|
-
* @returns {{ mode: string, humanOnly: unknown[], rejected?: string }} Policy
|
|
201
|
+
* @returns {{ mode: string, humanOnly: unknown[], rejected?: string, rejectedBlock?: true }} Policy
|
|
174
202
|
*/
|
|
175
203
|
export function resolveHumanGatePolicy(local, global) {
|
|
176
|
-
const { mode, rejected } = resolveHumanGateMode(local, global);
|
|
177
204
|
return {
|
|
178
|
-
|
|
205
|
+
...resolveHumanGateMode(local, global),
|
|
179
206
|
humanOnly: resolveHumanOnly(local, global),
|
|
180
|
-
...(rejected === undefined ? {} : { rejected }),
|
|
181
207
|
};
|
|
182
208
|
}
|
|
183
209
|
|
|
184
210
|
/**
|
|
185
211
|
* The stderr line for an invalid `humanGate.mode`.
|
|
186
212
|
* @param {string} rejected - JSON spelling of the declared value
|
|
213
|
+
* @param {boolean} rejectedBlock - Whether the whole block was invalid
|
|
187
214
|
* @returns {string} One warning line
|
|
188
215
|
*/
|
|
189
|
-
function invalidModeWarning(rejected) {
|
|
216
|
+
function invalidModeWarning(rejected, rejectedBlock) {
|
|
217
|
+
if (rejectedBlock)
|
|
218
|
+
return `Invalid humanGate: ${rejected} is not an object.\n`;
|
|
190
219
|
const accepted = HUMAN_GATE_MODES.map(value => `"${value}"`).join(" | ");
|
|
191
220
|
return `Invalid humanGate.mode: ${rejected} is not one of ${accepted}; ignored.\n`;
|
|
192
221
|
}
|
|
@@ -250,12 +279,12 @@ export function main(argv, io = {}) {
|
|
|
250
279
|
error(`${failed.error}\n`);
|
|
251
280
|
return 2;
|
|
252
281
|
}
|
|
253
|
-
const { rejected, ...policy } = resolveHumanGatePolicy(
|
|
282
|
+
const { rejected, rejectedBlock, ...policy } = resolveHumanGatePolicy(
|
|
254
283
|
local.value,
|
|
255
284
|
global.value
|
|
256
285
|
);
|
|
257
286
|
if (rejected !== undefined) {
|
|
258
|
-
error(invalidModeWarning(rejected));
|
|
287
|
+
error(invalidModeWarning(rejected, rejectedBlock === true));
|
|
259
288
|
error(`humanGate.mode in force: "${policy.mode}".\n`);
|
|
260
289
|
}
|
|
261
290
|
if (command === "policy") {
|
|
@@ -353,7 +353,7 @@ verdict.
|
|
|
353
353
|
|
|
354
354
|
| `rung` | Say it as |
|
|
355
355
|
| --- | --- |
|
|
356
|
-
| `exercised` | Proved
|
|
356
|
+
| `exercised` | Proved by a real exercise. A check rejected a controlled violation, or a verified artifact exercise recorded its result. |
|
|
357
357
|
| `observed` | Observed: a document was found where it should be, or a platform setting was read. Nothing was tried. |
|
|
358
358
|
| `asserted` | A person's answer: someone answered the audit's question. Nothing was checked by code. |
|
|
359
359
|
|
|
@@ -191,7 +191,7 @@ Sort the findings:
|
|
|
191
191
|
| `question` | **Still open.** Declare nothing for that requirement in that part. List it for the closing message. |
|
|
192
192
|
| `missing` | Nothing to declare. The enforce step files a ticket for it. |
|
|
193
193
|
| `unknown` or `not-applicable` | Nothing to declare. |
|
|
194
|
-
| any state, for a requirement whose `kind` is `artifact` or `human-attested` |
|
|
194
|
+
| any state, for a requirement whose `kind` is `artifact` or `human-attested` | Record the artifact or the person's evidence through audit. For AC5.5, AC6.4, AC7.2, and AC8.9, configure the required exercises before attest. See [Exercised artifacts](references/exercised-artifacts.md). |
|
|
195
195
|
|
|
196
196
|
**What a person answered.** The report's `answers` list holds what people have answered. Each
|
|
197
197
|
entry has the `id` of the question, the `question` as it was asked, and the `answer`. A question
|
|
@@ -327,7 +327,8 @@ lisa controls declaration-check
|
|
|
327
327
|
```
|
|
328
328
|
|
|
329
329
|
- **Exit 0.** Lisa reproduced the shipped folder checks from the local task manifests and
|
|
330
|
-
confirmed audit support for any parts declared from findings.
|
|
330
|
+
confirmed audit support for any parts declared from findings. It also checked the fields in the
|
|
331
|
+
exercise plan when the repository has one.
|
|
331
332
|
- **Any other exit.** Each line printed is one problem, naming the gate and the part. A part that
|
|
332
333
|
names a place the audit did not report, rests on a question nobody answered or on an answer
|
|
333
334
|
about something else, or serves a requirement the audit still asks about is refused. Correct the
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Exercised artifacts
|
|
2
|
+
|
|
3
|
+
Record the required exercises in `.lisa/controls/exercises.json`. Use one environment per plan.
|
|
4
|
+
A scope is `.` for the whole repository or a folder from its root. Give every target its own id.
|
|
5
|
+
Include each authoritative gate and scope for AC5.5, and each applicable connection and execution
|
|
6
|
+
surface for AC6.4. For rollback and staff qualification, include every release path and role
|
|
7
|
+
that the audit identifies as applicable.
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"schema_version": 1,
|
|
12
|
+
"environment": "production-representative",
|
|
13
|
+
"targets": [
|
|
14
|
+
{ "id": "lint", "criterion": "AC5.5", "scope": ".", "producer": "gate-owner", "adjudicator": "independent-reviewer", "gate": "code-style", "moment": "pull-request" },
|
|
15
|
+
{ "id": "registry-worker", "criterion": "AC6.4", "scope": "api", "producer": "connection-owner", "adjudicator": "independent-reviewer", "connection": "registry", "surface": "worker" },
|
|
16
|
+
{ "id": "rollback", "criterion": "AC7.2", "scope": ".", "producer": "release-owner", "adjudicator": "independent-reviewer", "release_track": "production-representative" },
|
|
17
|
+
{ "id": "release-qualification", "criterion": "AC8.9", "scope": ".", "producer": "staff-owner", "adjudicator": "independent-reviewer", "role": "release-operator", "minimum_shadow_seconds": 86400 }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Check the plan with `lisa controls declaration-check`, then commit it before collecting evidence.
|
|
23
|
+
Run `lisa controls attest` to get the current
|
|
24
|
+
`checks.digest` in `.lisa/controls/evidence.json`. Give the producer the current digest and scope
|
|
25
|
+
so the independent reviewer can link each result to that plan and those checks.
|
|
26
|
+
|
|
27
|
+
The externally administered `LISA_HOST_PROOF_TRUST_FILE` authorizes the reviewer for the exact
|
|
28
|
+
repository origin and environment. Keep it outside the checkout. Its JSON contains
|
|
29
|
+
`schema_version: 1`, `repository`, `environment`, and distinct `adjudicator` and `attestor`
|
|
30
|
+
objects with `id` and an Ed25519 `public_key` in PEM form. Each exercise's producer and reviewer
|
|
31
|
+
must also be distinct. The producer runs the exercise. The reviewer independently checks the
|
|
32
|
+
result, its scope and the source artifact before signing it.
|
|
33
|
+
|
|
34
|
+
Each signed body contains `schema_version: 1`, `repository`, `environment`, `checks_digest`,
|
|
35
|
+
`target_id`, `criterion`, `scope`, `producer`, `adjudicator`, `artifact`, `completed_at`, and
|
|
36
|
+
`outcome`. Set `artifact` to an object containing `sha256`, or an immutable `locator` in the
|
|
37
|
+
form `git:<full-object-id>:<path>`. Set `completed_at` and the other time fields to UTC with
|
|
38
|
+
milliseconds. These are the required outcome fields.
|
|
39
|
+
|
|
40
|
+
| Criterion | Outcome fields |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| AC5.5 Gate exercise | `gate`, `moment`, `violation_exit`, `violation_output`, and `clean_exit` when a clean companion is required. Use the authoritative moment. Capture the nonzero refusal and its declared failure text. |
|
|
43
|
+
| AC6.4 Credential paths | `connection`, `surface`, `principal`, and `identity_verified: true` after an identity check on that surface. Record the public principal name. Keep credential values out of the result and its source artifact. |
|
|
44
|
+
| AC7.2 Rollback | `release_track`, `incident`, `actor`, `finding`, `previous_generation`, `rolled_back_from`, `restored_generation`, `detected_at`, `rolled_back_at`, `verified_at`, and `recovery_verified: true`. Confirm the previous generation was restored and is serving. |
|
|
45
|
+
| AC8.9 Staff qualification | `role`, `actor`, `roster_sha256`, `shadow_started_at`, `shadow_completed_at`, `comparisons`, `shadow_agreed: true`, `adversarial_passed: true`, and `qualification: "qualified"`. Observe the planned shadow period and record both checks. |
|
|
46
|
+
|
|
47
|
+
Sign the compact canonical JSON of `{"purpose":"artifact-exercise","body":…}` using the authorized
|
|
48
|
+
reviewer's Ed25519 key. Canonical JSON sorts object keys by code unit at every depth and keeps array
|
|
49
|
+
order. Add the unpadded Base64url `signature` to the envelope. Put one envelope per target in an
|
|
50
|
+
array at `.lisa/controls/exercise-results.json`.
|
|
51
|
+
|
|
52
|
+
Run `lisa controls attest`, then `lisa controls attest --check`. Attest records exercised evidence
|
|
53
|
+
for a criterion after each applicable target has a current, verified result. The check authenticates
|
|
54
|
+
the signed results again and compares them with the saved evidence. When a target is missing or
|
|
55
|
+
unusable, the command names the evidence that remains due.
|
|
@@ -262,7 +262,7 @@ lisa controls register
|
|
|
262
262
|
The command names the rules that read unproved, for example:
|
|
263
263
|
|
|
264
264
|
```text
|
|
265
|
-
register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write
|
|
265
|
+
register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write. Authenticating both halves of their proof in .lisa/controls/evidence.json requires a trusted, current receipt. They stay unproved until the attest step records that both held.
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
Each of those entries now carries `"status": "unproved"` in `.lisa/controls/register.json`. That is
|
|
@@ -271,16 +271,40 @@ together in one change.
|
|
|
271
271
|
|
|
272
272
|
## How a rule stops being unproved
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
(`clean`),
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
A trusted, current attest receipt clears the mark. It binds **both** held halves in
|
|
275
|
+
`.lisa/controls/evidence.json`, the deliberate violation (`violation`) and the accepted change
|
|
276
|
+
(`clean`), to the current check definitions. `lisa controls register --check` says when the status
|
|
277
|
+
is what differs. The same verification applies to host-authored workflows on GitHub.
|
|
278
|
+
|
|
279
|
+
The protected attest process needs `LISA_HOST_PROOF_TRUST_FILE` set to an absolute JSON file
|
|
280
|
+
outside the checkout. Set `schema_version` to `1`, `repository` to the checkout's exact
|
|
281
|
+
`remote.origin.url`, and `environment` to the environment the checks ran against. Give
|
|
282
|
+
`adjudicator` and `attestor` separate objects, each with `id` and an Ed25519 PEM `public_key`.
|
|
283
|
+
Keep the corresponding private keys under their distinct authorized roles.
|
|
284
|
+
|
|
285
|
+
The independent reviewer verifies both platform runs and their artifact hashes. Their signed
|
|
286
|
+
`host-proof-import` body has `schema_version: 1`, the common `subject`, distinct `producer` and
|
|
287
|
+
`adjudicator` ids, and the `clean` and `violation` runs. The `subject` names `repository`,
|
|
288
|
+
`environment`, `work_item`, `entry_id`, `platform`, `executor_path`, and `checks_digest`. Read
|
|
289
|
+
`checks.digest` from a fresh attest evidence document for the current check definitions.
|
|
290
|
+
|
|
291
|
+
Each run records `run_id`, `run_url`, `commit`, `artifact_sha256`, `started_at`, `completed_at`,
|
|
292
|
+
`exit_status`, and `output_excerpt`. Use immutable run ids, HTTPS run URLs without credentials or
|
|
293
|
+
query parameters, and UTC timestamps. The clean run must exit zero. The violating run must exit
|
|
294
|
+
nonzero and include the declared failure text. Sign the canonical JSON object containing `purpose`
|
|
295
|
+
and `body` with the adjudicator's Ed25519 key. Attach the unpadded Base64url `signature` to that
|
|
296
|
+
object. The protected attestor verifies this signature before issuing its own signed receipt.
|
|
279
297
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
298
|
+
```bash
|
|
299
|
+
lisa controls attest --import-host-proof reviewed-pair.json --host-proof-signing-key /protected/attestor.pem
|
|
300
|
+
lisa controls register --check
|
|
301
|
+
lisa controls attest --check
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
The import uses the protected key to write `.lisa/controls/host-proof-receipts.json` with the
|
|
305
|
+
exact records it wrote. Both check commands read the same trust file. Changed check definitions,
|
|
306
|
+
expired records, or an unverifiable receipt leave the hosted entry unproved. The check commands
|
|
307
|
+
report why they could not use the receipt.
|
|
284
308
|
|
|
285
309
|
## Step 4: return the result
|
|
286
310
|
|
|
@@ -130,11 +130,11 @@ reached done with no estimate shows `none recorded` in the estimate row rather t
|
|
|
130
130
|
range.
|
|
131
131
|
|
|
132
132
|
`lisa-work-item complete` enforces it: when `required` is true, it refuses (as `pending-proof`) an
|
|
133
|
-
item with no usage entry, with no tally, or with a tally that no longer matches the ledger.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
item with no usage entry, with no tally, or with a tally that no longer matches the ledger.
|
|
134
|
+
The specification digest stays the same when Lisa first adds the estimate section or refreshes
|
|
135
|
+
its tally. The digest includes prose a person adds inside that section, including lines starting
|
|
136
|
+
with `Actual:` or `Basis:`. Existing proofs can still match the digest that Lisa calculated for
|
|
137
|
+
their unchanged specification.
|
|
138
138
|
|
|
139
139
|
## When the config is off
|
|
140
140
|
|
|
@@ -116,6 +116,24 @@ function readConfig(file) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Whether parsed JSON is an object that can hold configuration keys.
|
|
121
|
+
* @param {unknown} value - Parsed configuration value
|
|
122
|
+
* @returns {boolean} Whether the value is a config object
|
|
123
|
+
*/
|
|
124
|
+
function isConfigObject(value) {
|
|
125
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Read the raw block, preserving invalid declarations for the mode resolver.
|
|
130
|
+
* @param {unknown} config - Parsed config file
|
|
131
|
+
* @returns {unknown} Raw human-gate block
|
|
132
|
+
*/
|
|
133
|
+
function humanGateBlock(config) {
|
|
134
|
+
return isConfigObject(config) ? config.humanGate : undefined;
|
|
135
|
+
}
|
|
136
|
+
|
|
119
137
|
/**
|
|
120
138
|
* The effective human-only classes: local override replaces global when set.
|
|
121
139
|
* @param {unknown} local - Parsed local config
|
|
@@ -123,10 +141,10 @@ function readConfig(file) {
|
|
|
123
141
|
* @returns {unknown[]} Declared classes
|
|
124
142
|
*/
|
|
125
143
|
export function resolveHumanOnly(local, global) {
|
|
126
|
-
const pick = config =>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
144
|
+
const pick = config => {
|
|
145
|
+
const block = humanGateBlock(config);
|
|
146
|
+
return isConfigObject(block) ? block.humanOnly : undefined;
|
|
147
|
+
};
|
|
130
148
|
const value = pick(local) ?? pick(global);
|
|
131
149
|
return Array.isArray(value) ? value : [];
|
|
132
150
|
}
|
|
@@ -142,27 +160,37 @@ export function resolveHumanOnly(local, global) {
|
|
|
142
160
|
* as `rejected` (its JSON spelling) so the caller can report it.
|
|
143
161
|
* @param {unknown} local - Parsed local config
|
|
144
162
|
* @param {unknown} global - Parsed global config
|
|
145
|
-
* @returns {{ mode: string, rejected?: string }} The mode in force
|
|
163
|
+
* @returns {{ mode: string, rejected?: string, rejectedBlock?: true }} The mode in force
|
|
146
164
|
*/
|
|
147
165
|
export function resolveHumanGateMode(local, global) {
|
|
148
|
-
const pick = config =>
|
|
149
|
-
|
|
166
|
+
const pick = config => {
|
|
167
|
+
const block = humanGateBlock(config);
|
|
168
|
+
if (!isConfigObject(block))
|
|
169
|
+
return { value: block, mode: undefined, malformed: true };
|
|
170
|
+
return {
|
|
171
|
+
value: block.mode,
|
|
172
|
+
mode: normalizeHumanGateMode(block.mode),
|
|
173
|
+
malformed: false,
|
|
174
|
+
};
|
|
175
|
+
};
|
|
150
176
|
// Every declaration is judged, so a typo in the committed file is reported
|
|
151
177
|
// even while a valid local value is in force.
|
|
152
178
|
const declared = [pick(local), pick(global)].filter(
|
|
153
|
-
|
|
179
|
+
entry => entry.value !== undefined
|
|
154
180
|
);
|
|
155
|
-
const valid = declared
|
|
156
|
-
.map(normalizeHumanGateMode)
|
|
157
|
-
.find(mode => HUMAN_GATE_MODES.includes(mode));
|
|
181
|
+
const valid = declared.find(entry => HUMAN_GATE_MODES.includes(entry.mode));
|
|
158
182
|
const invalid = declared.find(
|
|
159
|
-
|
|
183
|
+
entry => !HUMAN_GATE_MODES.includes(entry.mode)
|
|
160
184
|
);
|
|
161
185
|
const mode =
|
|
162
|
-
valid ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
|
|
186
|
+
valid?.mode ?? (invalid === undefined ? DEFAULT_HUMAN_GATE_MODE : "strict");
|
|
163
187
|
return invalid === undefined
|
|
164
188
|
? { mode }
|
|
165
|
-
: {
|
|
189
|
+
: {
|
|
190
|
+
mode,
|
|
191
|
+
rejected: JSON.stringify(invalid.value),
|
|
192
|
+
...(invalid.malformed ? { rejectedBlock: true } : {}),
|
|
193
|
+
};
|
|
166
194
|
}
|
|
167
195
|
|
|
168
196
|
/**
|
|
@@ -170,23 +198,24 @@ export function resolveHumanGateMode(local, global) {
|
|
|
170
198
|
* human-only classes, each resolved local-then-global.
|
|
171
199
|
* @param {unknown} local - Parsed local config
|
|
172
200
|
* @param {unknown} global - Parsed global config
|
|
173
|
-
* @returns {{ mode: string, humanOnly: unknown[], rejected?: string }} Policy
|
|
201
|
+
* @returns {{ mode: string, humanOnly: unknown[], rejected?: string, rejectedBlock?: true }} Policy
|
|
174
202
|
*/
|
|
175
203
|
export function resolveHumanGatePolicy(local, global) {
|
|
176
|
-
const { mode, rejected } = resolveHumanGateMode(local, global);
|
|
177
204
|
return {
|
|
178
|
-
|
|
205
|
+
...resolveHumanGateMode(local, global),
|
|
179
206
|
humanOnly: resolveHumanOnly(local, global),
|
|
180
|
-
...(rejected === undefined ? {} : { rejected }),
|
|
181
207
|
};
|
|
182
208
|
}
|
|
183
209
|
|
|
184
210
|
/**
|
|
185
211
|
* The stderr line for an invalid `humanGate.mode`.
|
|
186
212
|
* @param {string} rejected - JSON spelling of the declared value
|
|
213
|
+
* @param {boolean} rejectedBlock - Whether the whole block was invalid
|
|
187
214
|
* @returns {string} One warning line
|
|
188
215
|
*/
|
|
189
|
-
function invalidModeWarning(rejected) {
|
|
216
|
+
function invalidModeWarning(rejected, rejectedBlock) {
|
|
217
|
+
if (rejectedBlock)
|
|
218
|
+
return `Invalid humanGate: ${rejected} is not an object.\n`;
|
|
190
219
|
const accepted = HUMAN_GATE_MODES.map(value => `"${value}"`).join(" | ");
|
|
191
220
|
return `Invalid humanGate.mode: ${rejected} is not one of ${accepted}; ignored.\n`;
|
|
192
221
|
}
|
|
@@ -250,12 +279,12 @@ export function main(argv, io = {}) {
|
|
|
250
279
|
error(`${failed.error}\n`);
|
|
251
280
|
return 2;
|
|
252
281
|
}
|
|
253
|
-
const { rejected, ...policy } = resolveHumanGatePolicy(
|
|
282
|
+
const { rejected, rejectedBlock, ...policy } = resolveHumanGatePolicy(
|
|
254
283
|
local.value,
|
|
255
284
|
global.value
|
|
256
285
|
);
|
|
257
286
|
if (rejected !== undefined) {
|
|
258
|
-
error(invalidModeWarning(rejected));
|
|
287
|
+
error(invalidModeWarning(rejected, rejectedBlock === true));
|
|
259
288
|
error(`humanGate.mode in force: "${policy.mode}".\n`);
|
|
260
289
|
}
|
|
261
290
|
if (command === "policy") {
|
|
@@ -351,7 +351,7 @@ verdict.
|
|
|
351
351
|
|
|
352
352
|
| `rung` | Say it as |
|
|
353
353
|
| --- | --- |
|
|
354
|
-
| `exercised` | Proved
|
|
354
|
+
| `exercised` | Proved by a real exercise. A check rejected a controlled violation, or a verified artifact exercise recorded its result. |
|
|
355
355
|
| `observed` | Observed: a document was found where it should be, or a platform setting was read. Nothing was tried. |
|
|
356
356
|
| `asserted` | A person's answer: someone answered the audit's question. Nothing was checked by code. |
|
|
357
357
|
|
|
@@ -189,7 +189,7 @@ Sort the findings:
|
|
|
189
189
|
| `question` | **Still open.** Declare nothing for that requirement in that part. List it for the closing message. |
|
|
190
190
|
| `missing` | Nothing to declare. The enforce step files a ticket for it. |
|
|
191
191
|
| `unknown` or `not-applicable` | Nothing to declare. |
|
|
192
|
-
| any state, for a requirement whose `kind` is `artifact` or `human-attested` |
|
|
192
|
+
| any state, for a requirement whose `kind` is `artifact` or `human-attested` | Record the artifact or the person's evidence through audit. For AC5.5, AC6.4, AC7.2, and AC8.9, configure the required exercises before attest. See [Exercised artifacts](references/exercised-artifacts.md). |
|
|
193
193
|
|
|
194
194
|
**What a person answered.** The report's `answers` list holds what people have answered. Each
|
|
195
195
|
entry has the `id` of the question, the `question` as it was asked, and the `answer`. A question
|
|
@@ -325,7 +325,8 @@ lisa controls declaration-check
|
|
|
325
325
|
```
|
|
326
326
|
|
|
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
|
+
confirmed audit support for any parts declared from findings. It also checked the fields in the
|
|
329
|
+
exercise plan when the repository has one.
|
|
329
330
|
- **Any other exit.** Each line printed is one problem, naming the gate and the part. A part that
|
|
330
331
|
names a place the audit did not report, rests on a question nobody answered or on an answer
|
|
331
332
|
about something else, or serves a requirement the audit still asks about is refused. Correct the
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Exercised artifacts
|
|
2
|
+
|
|
3
|
+
Record the required exercises in `.lisa/controls/exercises.json`. Use one environment per plan.
|
|
4
|
+
A scope is `.` for the whole repository or a folder from its root. Give every target its own id.
|
|
5
|
+
Include each authoritative gate and scope for AC5.5, and each applicable connection and execution
|
|
6
|
+
surface for AC6.4. For rollback and staff qualification, include every release path and role
|
|
7
|
+
that the audit identifies as applicable.
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"schema_version": 1,
|
|
12
|
+
"environment": "production-representative",
|
|
13
|
+
"targets": [
|
|
14
|
+
{ "id": "lint", "criterion": "AC5.5", "scope": ".", "producer": "gate-owner", "adjudicator": "independent-reviewer", "gate": "code-style", "moment": "pull-request" },
|
|
15
|
+
{ "id": "registry-worker", "criterion": "AC6.4", "scope": "api", "producer": "connection-owner", "adjudicator": "independent-reviewer", "connection": "registry", "surface": "worker" },
|
|
16
|
+
{ "id": "rollback", "criterion": "AC7.2", "scope": ".", "producer": "release-owner", "adjudicator": "independent-reviewer", "release_track": "production-representative" },
|
|
17
|
+
{ "id": "release-qualification", "criterion": "AC8.9", "scope": ".", "producer": "staff-owner", "adjudicator": "independent-reviewer", "role": "release-operator", "minimum_shadow_seconds": 86400 }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Check the plan with `lisa controls declaration-check`, then commit it before collecting evidence.
|
|
23
|
+
Run `lisa controls attest` to get the current
|
|
24
|
+
`checks.digest` in `.lisa/controls/evidence.json`. Give the producer the current digest and scope
|
|
25
|
+
so the independent reviewer can link each result to that plan and those checks.
|
|
26
|
+
|
|
27
|
+
The externally administered `LISA_HOST_PROOF_TRUST_FILE` authorizes the reviewer for the exact
|
|
28
|
+
repository origin and environment. Keep it outside the checkout. Its JSON contains
|
|
29
|
+
`schema_version: 1`, `repository`, `environment`, and distinct `adjudicator` and `attestor`
|
|
30
|
+
objects with `id` and an Ed25519 `public_key` in PEM form. Each exercise's producer and reviewer
|
|
31
|
+
must also be distinct. The producer runs the exercise. The reviewer independently checks the
|
|
32
|
+
result, its scope and the source artifact before signing it.
|
|
33
|
+
|
|
34
|
+
Each signed body contains `schema_version: 1`, `repository`, `environment`, `checks_digest`,
|
|
35
|
+
`target_id`, `criterion`, `scope`, `producer`, `adjudicator`, `artifact`, `completed_at`, and
|
|
36
|
+
`outcome`. Set `artifact` to an object containing `sha256`, or an immutable `locator` in the
|
|
37
|
+
form `git:<full-object-id>:<path>`. Set `completed_at` and the other time fields to UTC with
|
|
38
|
+
milliseconds. These are the required outcome fields.
|
|
39
|
+
|
|
40
|
+
| Criterion | Outcome fields |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| AC5.5 Gate exercise | `gate`, `moment`, `violation_exit`, `violation_output`, and `clean_exit` when a clean companion is required. Use the authoritative moment. Capture the nonzero refusal and its declared failure text. |
|
|
43
|
+
| AC6.4 Credential paths | `connection`, `surface`, `principal`, and `identity_verified: true` after an identity check on that surface. Record the public principal name. Keep credential values out of the result and its source artifact. |
|
|
44
|
+
| AC7.2 Rollback | `release_track`, `incident`, `actor`, `finding`, `previous_generation`, `rolled_back_from`, `restored_generation`, `detected_at`, `rolled_back_at`, `verified_at`, and `recovery_verified: true`. Confirm the previous generation was restored and is serving. |
|
|
45
|
+
| AC8.9 Staff qualification | `role`, `actor`, `roster_sha256`, `shadow_started_at`, `shadow_completed_at`, `comparisons`, `shadow_agreed: true`, `adversarial_passed: true`, and `qualification: "qualified"`. Observe the planned shadow period and record both checks. |
|
|
46
|
+
|
|
47
|
+
Sign the compact canonical JSON of `{"purpose":"artifact-exercise","body":…}` using the authorized
|
|
48
|
+
reviewer's Ed25519 key. Canonical JSON sorts object keys by code unit at every depth and keeps array
|
|
49
|
+
order. Add the unpadded Base64url `signature` to the envelope. Put one envelope per target in an
|
|
50
|
+
array at `.lisa/controls/exercise-results.json`.
|
|
51
|
+
|
|
52
|
+
Run `lisa controls attest`, then `lisa controls attest --check`. Attest records exercised evidence
|
|
53
|
+
for a criterion after each applicable target has a current, verified result. The check authenticates
|
|
54
|
+
the signed results again and compares them with the saved evidence. When a target is missing or
|
|
55
|
+
unusable, the command names the evidence that remains due.
|
|
@@ -262,7 +262,7 @@ lisa controls register
|
|
|
262
262
|
The command names the rules that read unproved, for example:
|
|
263
263
|
|
|
264
264
|
```text
|
|
265
|
-
register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write
|
|
265
|
+
register: 2 entries read unproved: code-style@api, code-style@web. The pull-request check for them runs from .gitlab-ci.yml on gitlab, a file Lisa did not write. Authenticating both halves of their proof in .lisa/controls/evidence.json requires a trusted, current receipt. They stay unproved until the attest step records that both held.
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
Each of those entries now carries `"status": "unproved"` in `.lisa/controls/register.json`. That is
|
|
@@ -271,16 +271,40 @@ together in one change.
|
|
|
271
271
|
|
|
272
272
|
## How a rule stops being unproved
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
(`clean`),
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
A trusted, current attest receipt clears the mark. It binds **both** held halves in
|
|
275
|
+
`.lisa/controls/evidence.json`, the deliberate violation (`violation`) and the accepted change
|
|
276
|
+
(`clean`), to the current check definitions. `lisa controls register --check` says when the status
|
|
277
|
+
is what differs. The same verification applies to host-authored workflows on GitHub.
|
|
278
|
+
|
|
279
|
+
The protected attest process needs `LISA_HOST_PROOF_TRUST_FILE` set to an absolute JSON file
|
|
280
|
+
outside the checkout. Set `schema_version` to `1`, `repository` to the checkout's exact
|
|
281
|
+
`remote.origin.url`, and `environment` to the environment the checks ran against. Give
|
|
282
|
+
`adjudicator` and `attestor` separate objects, each with `id` and an Ed25519 PEM `public_key`.
|
|
283
|
+
Keep the corresponding private keys under their distinct authorized roles.
|
|
284
|
+
|
|
285
|
+
The independent reviewer verifies both platform runs and their artifact hashes. Their signed
|
|
286
|
+
`host-proof-import` body has `schema_version: 1`, the common `subject`, distinct `producer` and
|
|
287
|
+
`adjudicator` ids, and the `clean` and `violation` runs. The `subject` names `repository`,
|
|
288
|
+
`environment`, `work_item`, `entry_id`, `platform`, `executor_path`, and `checks_digest`. Read
|
|
289
|
+
`checks.digest` from a fresh attest evidence document for the current check definitions.
|
|
290
|
+
|
|
291
|
+
Each run records `run_id`, `run_url`, `commit`, `artifact_sha256`, `started_at`, `completed_at`,
|
|
292
|
+
`exit_status`, and `output_excerpt`. Use immutable run ids, HTTPS run URLs without credentials or
|
|
293
|
+
query parameters, and UTC timestamps. The clean run must exit zero. The violating run must exit
|
|
294
|
+
nonzero and include the declared failure text. Sign the canonical JSON object containing `purpose`
|
|
295
|
+
and `body` with the adjudicator's Ed25519 key. Attach the unpadded Base64url `signature` to that
|
|
296
|
+
object. The protected attestor verifies this signature before issuing its own signed receipt.
|
|
279
297
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
298
|
+
```bash
|
|
299
|
+
lisa controls attest --import-host-proof reviewed-pair.json --host-proof-signing-key /protected/attestor.pem
|
|
300
|
+
lisa controls register --check
|
|
301
|
+
lisa controls attest --check
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
The import uses the protected key to write `.lisa/controls/host-proof-receipts.json` with the
|
|
305
|
+
exact records it wrote. Both check commands read the same trust file. Changed check definitions,
|
|
306
|
+
expired records, or an unverifiable receipt leave the hosted entry unproved. The check commands
|
|
307
|
+
report why they could not use the receipt.
|
|
284
308
|
|
|
285
309
|
## Step 4: return the result
|
|
286
310
|
|