attenu-guard 0.12.0 → 0.13.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/CHANGELOG.md +33 -0
- package/README.md +27 -0
- package/dist/cjs/audit.d.ts.map +1 -1
- package/dist/cjs/audit.js +45 -11
- package/dist/cjs/audit.js.map +1 -1
- package/dist/cjs/authority.d.ts.map +1 -1
- package/dist/cjs/authority.js +15 -9
- package/dist/cjs/authority.js.map +1 -1
- package/dist/cjs/canonical.d.ts +24 -0
- package/dist/cjs/canonical.d.ts.map +1 -1
- package/dist/cjs/canonical.js +49 -0
- package/dist/cjs/canonical.js.map +1 -1
- package/dist/cjs/ceilings.d.ts +17 -0
- package/dist/cjs/ceilings.d.ts.map +1 -1
- package/dist/cjs/ceilings.js +48 -0
- package/dist/cjs/ceilings.js.map +1 -1
- package/dist/cjs/cli.d.ts +12 -3
- package/dist/cjs/cli.d.ts.map +1 -1
- package/dist/cjs/cli.js +272 -20
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/display.d.ts +76 -0
- package/dist/cjs/display.d.ts.map +1 -0
- package/dist/cjs/display.js +238 -0
- package/dist/cjs/display.js.map +1 -0
- package/dist/cjs/evidence.d.ts +74 -5
- package/dist/cjs/evidence.d.ts.map +1 -1
- package/dist/cjs/evidence.js +655 -243
- package/dist/cjs/evidence.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/audit.d.ts.map +1 -1
- package/dist/esm/audit.js +46 -12
- package/dist/esm/audit.js.map +1 -1
- package/dist/esm/authority.d.ts.map +1 -1
- package/dist/esm/authority.js +15 -9
- package/dist/esm/authority.js.map +1 -1
- package/dist/esm/canonical.d.ts +24 -0
- package/dist/esm/canonical.d.ts.map +1 -1
- package/dist/esm/canonical.js +46 -0
- package/dist/esm/canonical.js.map +1 -1
- package/dist/esm/ceilings.d.ts +17 -0
- package/dist/esm/ceilings.d.ts.map +1 -1
- package/dist/esm/ceilings.js +46 -0
- package/dist/esm/ceilings.js.map +1 -1
- package/dist/esm/cli.d.ts +12 -3
- package/dist/esm/cli.d.ts.map +1 -1
- package/dist/esm/cli.js +273 -21
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/display.d.ts +76 -0
- package/dist/esm/display.d.ts.map +1 -0
- package/dist/esm/display.js +226 -0
- package/dist/esm/display.js.map +1 -0
- package/dist/esm/evidence.d.ts +74 -5
- package/dist/esm/evidence.d.ts.map +1 -1
- package/dist/esm/evidence.js +638 -229
- package/dist/esm/evidence.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* display.ts — how a value from a ledger, a bundle or a trust file is printed into a line of text.
|
|
3
|
+
*
|
|
4
|
+
* A ledger, a bundle and the envelopes beside it are untrusted input, and their values reach a
|
|
5
|
+
* terminal through the verifier's finding messages, `attenu-guard verify`, and `--entries`. A value
|
|
6
|
+
* that carries a line break can end the line it is printed on and start a forged one: a node named
|
|
7
|
+
* "n1\nOK" would print a line reading `OK` under a failed verification. Two rules cover every place
|
|
8
|
+
* such a value is printed, and both are the Python implementation's, byte for byte:
|
|
9
|
+
*
|
|
10
|
+
* - a value printed bare goes through `shown`: as its text when that text is printable ASCII
|
|
11
|
+
* 0x21-0x7E other than `"` and `\`, so clean input prints exactly as it always has, and as its
|
|
12
|
+
* `escaped` JSON form otherwise, which holds no whitespace and no line break;
|
|
13
|
+
* - a value printed the way Python's `repr` prints it goes through `pyRepr`, which quotes and
|
|
14
|
+
* escapes a string exactly as `repr` does. Python's `{x!r}` needs no other rule, so neither
|
|
15
|
+
* does this.
|
|
16
|
+
*/
|
|
17
|
+
import { RawNumber } from "./canonical.js";
|
|
18
|
+
/** The bare form: printable ASCII 0x21-0x7E without `"` (0x22) or `\` (0x5C). */
|
|
19
|
+
export const BARE = /^[!#-\[\]-~]+$/;
|
|
20
|
+
/**
|
|
21
|
+
* Python's `repr` of a `str`: single quotes unless the text holds a `'` and no `"`, the quote and
|
|
22
|
+
* the backslash escaped, `\t` `\n` `\r` by name, any other control character or DEL as `\xHH`, and
|
|
23
|
+
* a non-ASCII character as it is when Python counts it printable, as `\xHH`, `\uHHHH` or
|
|
24
|
+
* `\UHHHHHHHH` when it does not. Lower-case hex throughout, as CPython writes it.
|
|
25
|
+
*/
|
|
26
|
+
export function pyStrRepr(s) {
|
|
27
|
+
const quote = s.includes("'") && !s.includes('"') ? '"' : "'";
|
|
28
|
+
let out = quote;
|
|
29
|
+
// By code point: a surrogate pair is one character to Python, and a lone surrogate is one too.
|
|
30
|
+
for (const ch of s)
|
|
31
|
+
out += ch === quote || ch === "\\" ? `\\${ch}` : reprChar(ch);
|
|
32
|
+
return out + quote;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `text` with every character Python's `repr` would escape written as that escape, and nothing
|
|
36
|
+
* else changed: no quotes added, no backslash doubled. For a parser's message, which can quote a
|
|
37
|
+
* fragment of the input it refused: one line, always.
|
|
38
|
+
*/
|
|
39
|
+
export function oneLine(text) {
|
|
40
|
+
let out = "";
|
|
41
|
+
for (const ch of text)
|
|
42
|
+
out += reprChar(ch);
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
/** One character as Python's `repr` writes it inside a string, the quote and backslash aside. */
|
|
46
|
+
function reprChar(ch) {
|
|
47
|
+
const cp = ch.codePointAt(0);
|
|
48
|
+
if (ch === "\t")
|
|
49
|
+
return "\\t";
|
|
50
|
+
if (ch === "\n")
|
|
51
|
+
return "\\n";
|
|
52
|
+
if (ch === "\r")
|
|
53
|
+
return "\\r";
|
|
54
|
+
if (cp < 0x20 || cp === 0x7f)
|
|
55
|
+
return `\\x${hex(cp, 2)}`;
|
|
56
|
+
if (cp < 0x7f || !NOT_PRINTABLE.test(ch))
|
|
57
|
+
return ch;
|
|
58
|
+
if (cp <= 0xff)
|
|
59
|
+
return `\\x${hex(cp, 2)}`;
|
|
60
|
+
if (cp <= 0xffff)
|
|
61
|
+
return `\\u${hex(cp, 4)}`;
|
|
62
|
+
return `\\U${hex(cp, 8)}`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What Python's `str.isprintable` is false for, outside ASCII: the Unicode categories "Other"
|
|
66
|
+
* (Cc, Cf, Cs, Co, Cn) and "Separator" (Zl, Zp, Zs). The space is the one exception, and it is
|
|
67
|
+
* ASCII, which `pyStrRepr` decides before it asks.
|
|
68
|
+
*/
|
|
69
|
+
const NOT_PRINTABLE = /^[\p{Cc}\p{Cf}\p{Cs}\p{Co}\p{Cn}\p{Zl}\p{Zp}\p{Zs}]$/u;
|
|
70
|
+
function hex(n, width) {
|
|
71
|
+
return n.toString(16).padStart(width, "0");
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Python-style `repr` for the value types a finding message carries. A number that kept its
|
|
75
|
+
* literal prints as Python prints what `json` reads from it (`1` an int, `1.0` a float); a number
|
|
76
|
+
* that has lost its literal prints as JavaScript prints it, as this module always has.
|
|
77
|
+
*/
|
|
78
|
+
export function pyRepr(value) {
|
|
79
|
+
if (value === null)
|
|
80
|
+
return "None";
|
|
81
|
+
if (typeof value === "boolean")
|
|
82
|
+
return value ? "True" : "False";
|
|
83
|
+
if (value instanceof RawNumber)
|
|
84
|
+
return integerText(value) ?? pyFloat(value.value);
|
|
85
|
+
if (typeof value === "number")
|
|
86
|
+
return String(value);
|
|
87
|
+
if (typeof value === "string")
|
|
88
|
+
return pyStrRepr(value);
|
|
89
|
+
// Containers reach here only on hostile input — a member that is a list or an object where the
|
|
90
|
+
// contract wants a scalar. Rendered the way Python's repr renders them.
|
|
91
|
+
if (Array.isArray(value))
|
|
92
|
+
return `[${value.map(pyRepr).join(", ")}]`;
|
|
93
|
+
if (typeof value === "object") {
|
|
94
|
+
return `{${Object.entries(value)
|
|
95
|
+
.map(([k, v]) => `${pyStrRepr(k)}: ${pyRepr(v)}`)
|
|
96
|
+
.join(", ")}}`;
|
|
97
|
+
}
|
|
98
|
+
return JSON.stringify(value);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Python's `str()` where a message interpolates a value bare (`{x}`) rather than through `repr`
|
|
102
|
+
* (`{x!r}`): the same rendering for every type except a string, which `str` leaves unquoted.
|
|
103
|
+
*/
|
|
104
|
+
export function pyStr(value) {
|
|
105
|
+
return typeof value === "string" ? value : pyRepr(value);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* `value` as a finding message prints it bare: its text (Python's `str`) when that text is bare,
|
|
109
|
+
* its `escaped` JSON form otherwise. Clean values print exactly as they always have. An absent
|
|
110
|
+
* value is Python's `None`.
|
|
111
|
+
*/
|
|
112
|
+
export function shown(value) {
|
|
113
|
+
const v = value === undefined ? null : value;
|
|
114
|
+
return shownText(pyStr(v), v);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* `shown`, for a caller that already holds the text Python's `str` gives for `value` (a ceiling
|
|
118
|
+
* renders its numbers the way Python renders a float): the text when it is bare, `value`'s
|
|
119
|
+
* `escaped` form otherwise.
|
|
120
|
+
*/
|
|
121
|
+
export function shownText(text, value) {
|
|
122
|
+
return BARE.test(text) ? text : escaped(value);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* `value` as whitespace-free, ASCII-only JSON: Python's
|
|
126
|
+
* `json.dumps(value, ensure_ascii=True, separators=(",", ":"))`, with every space then written as
|
|
127
|
+
* `\u0020`. Inside a string that is `\"` and `\\`, the short escapes `\n` `\t` `\r` `\b` `\f`, and
|
|
128
|
+
* a lower-case `\uXXXX` for every other UTF-16 unit outside printable ASCII. That form holds no
|
|
129
|
+
* whitespace and no line break, and a JSON parser gives the value back.
|
|
130
|
+
*/
|
|
131
|
+
export function escaped(value) {
|
|
132
|
+
return pyJson(value).replace(/ /g, "\\u0020");
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A number Python's `json` reads as an `int`, in decimal, or `null` for anything else. A parsed
|
|
136
|
+
* bundle keeps every number's literal, so `1` and `1.0` stay as distinct as they are in Python. A
|
|
137
|
+
* number that has lost its literal is read as an integer when it is integral.
|
|
138
|
+
*/
|
|
139
|
+
export function integerText(value) {
|
|
140
|
+
if (value instanceof RawNumber) {
|
|
141
|
+
return /^-?(?:0|[1-9][0-9]*)$/.test(value.raw) ? BigInt(value.raw).toString() : null;
|
|
142
|
+
}
|
|
143
|
+
if (typeof value === "number" && Number.isInteger(value))
|
|
144
|
+
return BigInt(value).toString();
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
/** Python's `json.dumps(value, ensure_ascii=True, separators=(",", ":"))`. */
|
|
148
|
+
function pyJson(value) {
|
|
149
|
+
if (value === null)
|
|
150
|
+
return "null";
|
|
151
|
+
if (typeof value === "boolean")
|
|
152
|
+
return value ? "true" : "false";
|
|
153
|
+
if (typeof value === "string")
|
|
154
|
+
return pyJsonString(value);
|
|
155
|
+
const integer = integerText(value);
|
|
156
|
+
if (integer !== null)
|
|
157
|
+
return integer;
|
|
158
|
+
if (value instanceof RawNumber)
|
|
159
|
+
return pyFloat(value.value);
|
|
160
|
+
if (typeof value === "number")
|
|
161
|
+
return pyFloat(value);
|
|
162
|
+
if (Array.isArray(value))
|
|
163
|
+
return `[${value.map(pyJson).join(",")}]`;
|
|
164
|
+
return `{${Object.entries(value)
|
|
165
|
+
.map(([key, member]) => `${pyJsonString(key)}:${pyJson(member)}`)
|
|
166
|
+
.join(",")}}`;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A JSON string as Python's `json` writes it with `ensure_ascii`: printable ASCII as it is, the
|
|
170
|
+
* five short escapes, and every other UTF-16 unit as a lowercase \uXXXX. A character beyond the
|
|
171
|
+
* BMP is already a surrogate pair in a JavaScript string, and Python writes it as the same pair.
|
|
172
|
+
*/
|
|
173
|
+
function pyJsonString(s) {
|
|
174
|
+
let out = '"';
|
|
175
|
+
for (let i = 0; i < s.length; i++) {
|
|
176
|
+
const unit = s.charCodeAt(i);
|
|
177
|
+
if (unit === 0x22)
|
|
178
|
+
out += '\\"';
|
|
179
|
+
else if (unit === 0x5c)
|
|
180
|
+
out += "\\\\";
|
|
181
|
+
else if (unit === 0x0a)
|
|
182
|
+
out += "\\n";
|
|
183
|
+
else if (unit === 0x0d)
|
|
184
|
+
out += "\\r";
|
|
185
|
+
else if (unit === 0x09)
|
|
186
|
+
out += "\\t";
|
|
187
|
+
else if (unit === 0x08)
|
|
188
|
+
out += "\\b";
|
|
189
|
+
else if (unit === 0x0c)
|
|
190
|
+
out += "\\f";
|
|
191
|
+
else if (unit >= 0x20 && unit <= 0x7e)
|
|
192
|
+
out += s[i];
|
|
193
|
+
else
|
|
194
|
+
out += `\\u${hex(unit, 4)}`;
|
|
195
|
+
}
|
|
196
|
+
return `${out}"`;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Python's `repr` of a float, which `json` writes: the shortest digits that read back as the same
|
|
200
|
+
* number, in positional form from 1e-4 up to below 1e16 with `.0` on an integral value, and in
|
|
201
|
+
* exponent form, with a two-digit exponent at least, outside that range.
|
|
202
|
+
*/
|
|
203
|
+
export function pyFloat(n) {
|
|
204
|
+
if (Number.isNaN(n))
|
|
205
|
+
return "NaN";
|
|
206
|
+
if (n === Infinity)
|
|
207
|
+
return "Infinity";
|
|
208
|
+
if (n === -Infinity)
|
|
209
|
+
return "-Infinity";
|
|
210
|
+
if (n === 0)
|
|
211
|
+
return Object.is(n, -0) ? "-0.0" : "0.0";
|
|
212
|
+
const m = /^(-?)([0-9])(?:\.([0-9]+))?e([+-][0-9]+)$/.exec(n.toExponential());
|
|
213
|
+
const sign = m[1];
|
|
214
|
+
const digits = m[2] + (m[3] ?? "");
|
|
215
|
+
const exponent = Number(m[4]);
|
|
216
|
+
if (exponent < -4 || exponent >= 16) {
|
|
217
|
+
const mantissa = digits.length > 1 ? `${digits[0]}.${digits.slice(1)}` : digits;
|
|
218
|
+
return `${sign}${mantissa}e${exponent < 0 ? "-" : "+"}${String(Math.abs(exponent)).padStart(2, "0")}`;
|
|
219
|
+
}
|
|
220
|
+
if (exponent < 0)
|
|
221
|
+
return `${sign}0.${"0".repeat(-exponent - 1)}${digits}`;
|
|
222
|
+
const whole = digits.slice(0, exponent + 1).padEnd(exponent + 1, "0");
|
|
223
|
+
const fraction = digits.slice(exponent + 1);
|
|
224
|
+
return `${sign}${whole}.${fraction === "" ? "0" : fraction}`;
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../src/display.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAc,MAAM,gBAAgB,CAAC;AAEvD,iFAAiF;AACjF,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,CAAS;IACjC,MAAM,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC9D,IAAI,GAAG,GAAG,KAAK,CAAC;IAChB,+FAA+F;IAC/F,KAAK,MAAM,EAAE,IAAI,CAAC;QAAE,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClF,OAAO,GAAG,GAAG,KAAK,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,MAAM,EAAE,IAAI,IAAI;QAAE,GAAG,IAAI,QAAQ,CAAC,E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AAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;IACxG,CAAC;IACD,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,GAAG,IAAI,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC;IAC1E,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IAC5C,OAAO,GAAG,IAAI,GAAG,KAAK,IAAI,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC/D,CAAC"}
|
package/dist/esm/evidence.d.ts
CHANGED
|
@@ -247,7 +247,9 @@ export declare const ENVELOPE_ALG = "EdDSA";
|
|
|
247
247
|
/**
|
|
248
248
|
* A verifying envelope's state. It says where the signature came from and NOTHING about
|
|
249
249
|
* authority — the witness is whoever holds the key `witness.kid` names, which nothing in the
|
|
250
|
-
* envelope makes the delegation parent.
|
|
250
|
+
* envelope makes the delegation parent. The signature covers the entry's hash and chain position
|
|
251
|
+
* plus what the witness-key holder observed; it does not attest that the action was permitted.
|
|
252
|
+
* Monotonicity and containment answer that, from the ledger.
|
|
251
253
|
*/
|
|
252
254
|
export declare const WITNESS_SIGNED = "witness-signed";
|
|
253
255
|
/**
|
|
@@ -268,11 +270,19 @@ export interface Envelope {
|
|
|
268
270
|
witness: Record<string, CJson>;
|
|
269
271
|
sig: string;
|
|
270
272
|
}
|
|
271
|
-
/**
|
|
273
|
+
/**
|
|
274
|
+
* One trusted witness key, in the shape the vector file carries.
|
|
275
|
+
*
|
|
276
|
+
* `not_after` is optional: an RFC 3339 date-time in UTC, written with `Z`, such as
|
|
277
|
+
* `2026-10-05T00:00:00Z`. A row whose `not_after` is at or before the verification time is left
|
|
278
|
+
* out of the trust set, so an envelope naming its kid fails `envelope_unknown_witness`, and the
|
|
279
|
+
* message says the key expired and when. A row without it is trusted as before.
|
|
280
|
+
*/
|
|
272
281
|
export interface WitnessKey {
|
|
273
282
|
kid: string;
|
|
274
283
|
alg: string;
|
|
275
284
|
public_key_hex: string;
|
|
285
|
+
not_after?: string;
|
|
276
286
|
}
|
|
277
287
|
/**
|
|
278
288
|
* The bytes a witness signs: `JCS(envelope minus its "sig" member)`.
|
|
@@ -281,10 +291,19 @@ export interface WitnessKey {
|
|
|
281
291
|
* implementation, not a second one for envelopes.
|
|
282
292
|
*/
|
|
283
293
|
export declare function envelopeSigningInput(envelope: Record<string, CJson>): Buffer;
|
|
294
|
+
/**
|
|
295
|
+
* Where `states` and `results` file an entry: its seq when it has one, as the integer when it is
|
|
296
|
+
* integral (`intOr`: `1.0` is filed as 1), and its index when it has none. The Python
|
|
297
|
+
* implementation's `_state_key`, rendered as a record key. It is a report key, never a lookup: an
|
|
298
|
+
* envelope finds the entry it covers through `subjectIndex`.
|
|
299
|
+
*/
|
|
300
|
+
export declare function stateKey(e: LedgerEntry, index: number): string;
|
|
284
301
|
/**
|
|
285
302
|
* The v1 subject for the entry at `seq`, recomputed from the ledger.
|
|
286
303
|
*
|
|
287
|
-
*
|
|
304
|
+
* `seq` finds its entry the way a verifier finds it (`subjectIndex`), so the subject is the one the
|
|
305
|
+
* verifier will check it against. Throws when `seq` names no entry, or names one whose `event` v1
|
|
306
|
+
* defines no subject for.
|
|
288
307
|
*/
|
|
289
308
|
export declare function envelopeSubject(entries: readonly LedgerEntry[], seq: number): Record<string, CJson>;
|
|
290
309
|
/** What a witness asserts about the event it signed. */
|
|
@@ -304,6 +323,13 @@ export interface Observation {
|
|
|
304
323
|
* one call for exactly this reason.
|
|
305
324
|
*/
|
|
306
325
|
export declare function signEnvelope(entries: readonly LedgerEntry[], seq: number, seed: Buffer, kid: string, observed: Observation): Envelope;
|
|
326
|
+
/**
|
|
327
|
+
* Every row of a trust set checked as the verifier checks it — kid, alg, public key, `not_after` —
|
|
328
|
+
* and an `Error` naming the kid for the first bad one. The CLI runs this when it loads a
|
|
329
|
+
* `--witness-keys` file, so a bad row is reported against that file before any bundle is read.
|
|
330
|
+
* Expiry is not an error: an expired row is a row the verifier leaves out, not a malformed one.
|
|
331
|
+
*/
|
|
332
|
+
export declare function validateWitnessKeys(witnessKeys: readonly WitnessKey[]): void;
|
|
307
333
|
/** What `verifyEnvelopes` and `verifyBundle`'s `envelopes` field report. */
|
|
308
334
|
export interface EnvelopeSummary {
|
|
309
335
|
status: "verified" | "FAILED" | "not present";
|
|
@@ -314,6 +340,13 @@ export interface EnvelopeSummary {
|
|
|
314
340
|
states: Record<string, EnvelopeState>;
|
|
315
341
|
/** The `observed.result` of each witness-signed entry. */
|
|
316
342
|
results: Record<string, Json>;
|
|
343
|
+
/**
|
|
344
|
+
* The index in `bundle.entries` of every witness-signed entry -> the `witness.kid` of the
|
|
345
|
+
* envelope that verified for it. By index, not by seq: the index is the entry the subject
|
|
346
|
+
* resolved to, the one `failure_entries` names, so of two entries sharing a seq only the one the
|
|
347
|
+
* witness signed is in it. An entry two envelopes dispute is not.
|
|
348
|
+
*/
|
|
349
|
+
witnesses: Record<string, string>;
|
|
317
350
|
/** The report line for each entry: `witness-signed (matched)`, or `process-asserted`. */
|
|
318
351
|
lines: Record<string, string>;
|
|
319
352
|
failures: string[];
|
|
@@ -326,16 +359,27 @@ export interface VerifyEnvelopesOptions {
|
|
|
326
359
|
* null). Only `envelope_non_canonical` needs them, and only where a deployment kept them.
|
|
327
360
|
*/
|
|
328
361
|
envelopeBytes?: readonly (Buffer | string | null)[] | null;
|
|
362
|
+
/**
|
|
363
|
+
* The verification time a trust-set row's `not_after` is compared with: a `Date`, or a string in
|
|
364
|
+
* the `not_after` grammar; never a number, whose unit would be a guess. The current time when
|
|
365
|
+
* absent. A row whose `not_after` is at or before it is left out of the trust set.
|
|
366
|
+
*/
|
|
367
|
+
now?: Date | string | null;
|
|
329
368
|
}
|
|
330
369
|
/**
|
|
331
370
|
* Score a bundle's observer envelopes on their own, without the ledger checks.
|
|
332
371
|
*
|
|
333
|
-
* Returns `{ok, ...summary, failure_details}`. `states` maps every entry's seq to
|
|
334
|
-
* `witness-signed` or `process-asserted`; `lines` is the report line for each.
|
|
372
|
+
* Returns `{ok, ...summary, failure_details, failure_entries}`. `states` maps every entry's seq to
|
|
373
|
+
* `witness-signed` or `process-asserted`; `lines` is the report line for each. `results` maps a
|
|
374
|
+
* covered seq to the verifying envelope's `observed.result`. `witnesses` maps the index in
|
|
375
|
+
* `bundle.entries` of every witness-signed entry to that envelope's `witness.kid`: the entry the
|
|
376
|
+
* subject resolved to, the one `failure_entries` names, so of two entries sharing a seq only the
|
|
377
|
+
* one the witness signed is in it.
|
|
335
378
|
*/
|
|
336
379
|
export declare function verifyEnvelopes(bundle: Partial<Bundle>, options?: VerifyEnvelopesOptions): EnvelopeSummary & {
|
|
337
380
|
ok: boolean;
|
|
338
381
|
failure_details: FailureDetail[];
|
|
382
|
+
failure_entries: (number | null)[];
|
|
339
383
|
};
|
|
340
384
|
export type ExecutionBinding = {
|
|
341
385
|
status: "not applicable";
|
|
@@ -347,6 +391,17 @@ export type ExecutionBinding = {
|
|
|
347
391
|
per_node_lifecycle: Record<string, "finalized" | "in_progress" | "revoked" | "revoked_with_pending">;
|
|
348
392
|
failures: string[];
|
|
349
393
|
};
|
|
394
|
+
/**
|
|
395
|
+
* The index of the FIRST entry the hash chain does not reproduce at — position only.
|
|
396
|
+
*
|
|
397
|
+
* `AuditLog.verify` stays the authority on WHETHER the chain is broken and on the message this
|
|
398
|
+
* module reports; this walk exists so the structured twin of that message can say WHERE, which
|
|
399
|
+
* the message's own text does not expose in a parseable form. Mirrors `AuditLog.verify`'s walk
|
|
400
|
+
* exactly (same seq/prev_hash/hash order, and the same rule that a seq is an integral number and
|
|
401
|
+
* never a boolean, `integral`). `null` when nothing entry-local is wrong — a consistently
|
|
402
|
+
* re-hashed ledger fails against the signed anchor, not here, and that failure is chain-level.
|
|
403
|
+
*/
|
|
404
|
+
export declare function integrityBreak(entries: readonly LedgerEntry[]): number | null;
|
|
350
405
|
export interface VerifyReport {
|
|
351
406
|
ok: boolean;
|
|
352
407
|
checks: VerifyChecks;
|
|
@@ -357,6 +412,13 @@ export interface VerifyReport {
|
|
|
357
412
|
* reason AND the position of every failure instead of matching prose.
|
|
358
413
|
*/
|
|
359
414
|
failure_details: FailureDetail[];
|
|
415
|
+
/**
|
|
416
|
+
* In step with `failures` and `failure_details` again: the index in `bundle.entries` of the entry
|
|
417
|
+
* each failure is about, or `null` for a failure about no single entry. Exact where a seq is
|
|
418
|
+
* not, since a forged entry's seq can be missing, null, a boolean or a duplicate; it is what
|
|
419
|
+
* `attenu-guard verify --entries` attributes by.
|
|
420
|
+
*/
|
|
421
|
+
failure_entries: (number | null)[];
|
|
360
422
|
nodes: number;
|
|
361
423
|
actions_checked: number;
|
|
362
424
|
/**
|
|
@@ -414,6 +476,13 @@ export interface VerifyBundleOptions {
|
|
|
414
476
|
* `envelope_non_canonical` needs them, and only where a deployment kept them.
|
|
415
477
|
*/
|
|
416
478
|
envelopeBytes?: readonly (Buffer | string | null)[] | null;
|
|
479
|
+
/**
|
|
480
|
+
* The verification time a trust-set row's `not_after` is compared with: a `Date`, or a string in
|
|
481
|
+
* the `not_after` grammar; never a number, whose unit would be a guess. The current time when
|
|
482
|
+
* absent. A row whose `not_after` is at or before it is left out of the trust set, so an envelope
|
|
483
|
+
* naming that kid fails `envelope_unknown_witness`.
|
|
484
|
+
*/
|
|
485
|
+
now?: Date | string | null;
|
|
417
486
|
}
|
|
418
487
|
export declare function verifyBundle(bundle: Partial<Bundle>, signer?: Signer | null, options?: VerifyBundleOptions): VerifyReport;
|
|
419
488
|
/** Read a bundle from JSON text, keeping every number's original literal. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAUL,KAAK,KAAK,EACV,KAAK,IAAI,EACV,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAiD,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAMpH,OAAO,EAAkC,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CAmD5C,CAAC;AAEH;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAAmB,CAAC;AAe9E,MAAM,WAAW,MAAM;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,EAA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