@gate-forge/cli 0.6.2 → 0.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/README.md +117 -20
- package/dist/args.js +1 -1
- package/dist/args.js.map +1 -1
- package/dist/broker.d.ts.map +1 -1
- package/dist/broker.js +19 -10
- package/dist/broker.js.map +1 -1
- package/dist/candidate-tree.d.ts +2 -1
- package/dist/candidate-tree.d.ts.map +1 -1
- package/dist/candidate-tree.js +66 -4
- package/dist/candidate-tree.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/blocking.d.ts +7 -4
- package/dist/commands/blocking.d.ts.map +1 -1
- package/dist/commands/blocking.js +116 -40
- package/dist/commands/blocking.js.map +1 -1
- package/dist/commands/check.d.ts +10 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +146 -33
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/common.d.ts +4 -2
- package/dist/commands/common.d.ts.map +1 -1
- package/dist/commands/common.js +4 -2
- package/dist/commands/common.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +105 -165
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.d.ts +6 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.js +72 -0
- package/dist/commands/keys.js.map +1 -0
- package/dist/commands/next.d.ts.map +1 -1
- package/dist/commands/next.js +23 -21
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/pre-commit.d.ts.map +1 -1
- package/dist/commands/pre-commit.js +21 -8
- package/dist/commands/pre-commit.js.map +1 -1
- package/dist/commands/test-gates.d.ts +12 -4
- package/dist/commands/test-gates.d.ts.map +1 -1
- package/dist/commands/test-gates.js +357 -75
- package/dist/commands/test-gates.js.map +1 -1
- package/dist/commands/tests.d.ts +1 -1
- package/dist/commands/tests.d.ts.map +1 -1
- package/dist/commands/tests.js +37 -3
- package/dist/commands/tests.js.map +1 -1
- package/dist/docs-exclusions.d.ts +12 -0
- package/dist/docs-exclusions.d.ts.map +1 -0
- package/dist/docs-exclusions.js +211 -0
- package/dist/docs-exclusions.js.map +1 -0
- package/dist/evaluate.d.ts +8 -12
- package/dist/evaluate.d.ts.map +1 -1
- package/dist/evaluate.js +53 -11
- package/dist/evaluate.js.map +1 -1
- package/dist/execution.d.ts +7 -3
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +9 -2
- package/dist/execution.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/input-snapshot.d.ts +30 -6
- package/dist/input-snapshot.d.ts.map +1 -1
- package/dist/input-snapshot.js +58 -21
- package/dist/input-snapshot.js.map +1 -1
- package/dist/mapping.d.ts +18 -30
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +75 -51
- package/dist/mapping.js.map +1 -1
- package/dist/package-compatibility.d.ts +27 -0
- package/dist/package-compatibility.d.ts.map +1 -0
- package/dist/package-compatibility.js +112 -0
- package/dist/package-compatibility.js.map +1 -0
- package/dist/receipts.d.ts +13 -2
- package/dist/receipts.d.ts.map +1 -1
- package/dist/receipts.js +58 -4
- package/dist/receipts.js.map +1 -1
- package/dist/runtime-reuse.d.ts +24 -0
- package/dist/runtime-reuse.d.ts.map +1 -0
- package/dist/runtime-reuse.js +168 -0
- package/dist/runtime-reuse.js.map +1 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +118 -108
- package/dist/runtime.js.map +1 -1
- package/dist/staged-candidate.d.ts +4 -0
- package/dist/staged-candidate.d.ts.map +1 -1
- package/dist/staged-candidate.js +57 -11
- package/dist/staged-candidate.js.map +1 -1
- package/dist/state.d.ts +3 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +4 -0
- package/dist/state.js.map +1 -1
- package/dist/verifier-keys.d.ts +59 -0
- package/dist/verifier-keys.d.ts.map +1 -0
- package/dist/verifier-keys.js +339 -0
- package/dist/verifier-keys.js.map +1 -0
- package/package.json +13 -10
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trusted verifier-key sources and rotation helpers.
|
|
3
|
+
*
|
|
4
|
+
* Secrets come from the protected environment or an owner-only external
|
|
5
|
+
* key-ring file. Candidate files and run artifacts are never key sources.
|
|
6
|
+
*/
|
|
7
|
+
import { closeSync, constants, fstatSync, fsyncSync, lstatSync, openSync, readFileSync, realpathSync, renameSync, unlinkSync, writeFileSync, } from 'node:fs';
|
|
8
|
+
import { createHash, randomBytes, randomUUID } from 'node:crypto';
|
|
9
|
+
import { dirname, isAbsolute, relative, resolve, sep } from 'node:path';
|
|
10
|
+
import { GateReceiptSchema, verifyGateReceipt } from '@gate-forge/core';
|
|
11
|
+
import { UsageError } from './errors.js';
|
|
12
|
+
import { resolveGitDir } from './candidate-tree.js';
|
|
13
|
+
import { resolveStateDir } from './state.js';
|
|
14
|
+
import { VERIFIER_KEY_ENV, VERIFIER_KEY_FILE_ENV } from './commands/common.js';
|
|
15
|
+
const KEY_ID_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/;
|
|
16
|
+
/** Returns the stable non-secret identifier used for an environment key. */
|
|
17
|
+
export function environmentVerifierKeyId(key) {
|
|
18
|
+
return `env-${createHash('sha256').update('gateforge.verifier-key-id.v1\0').update(key).digest('hex').slice(0, 24)}`;
|
|
19
|
+
}
|
|
20
|
+
/** Resolves the trusted key source and rejects any source inside candidate artifacts. */
|
|
21
|
+
export function resolveVerifierKeyring(cwd, env, additionalArtifactRoots = []) {
|
|
22
|
+
const environmentKey = env[VERIFIER_KEY_ENV];
|
|
23
|
+
const keyFile = env[VERIFIER_KEY_FILE_ENV];
|
|
24
|
+
if (typeof environmentKey === 'string' && environmentKey.length > 0 && typeof keyFile === 'string' && keyFile.length > 0) {
|
|
25
|
+
throw new UsageError(`set only one verifier-key source: ${VERIFIER_KEY_ENV} or ${VERIFIER_KEY_FILE_ENV}`);
|
|
26
|
+
}
|
|
27
|
+
if (typeof environmentKey === 'string' && environmentKey.length > 0) {
|
|
28
|
+
const active = { keyId: environmentVerifierKeyId(environmentKey), key: environmentKey };
|
|
29
|
+
return { active, keys: [active] };
|
|
30
|
+
}
|
|
31
|
+
if (typeof keyFile !== 'string' || keyFile.length === 0)
|
|
32
|
+
return null;
|
|
33
|
+
const path = resolve(cwd, keyFile);
|
|
34
|
+
assertExternalVerifierKeyPath(cwd, path, env, additionalArtifactRoots);
|
|
35
|
+
const document = readSecureKeyring(path);
|
|
36
|
+
const keys = Object.entries(document.keys).map(([keyId, key]) => ({ keyId, key }));
|
|
37
|
+
const active = keys.find((entry) => entry.keyId === document.activeKeyId);
|
|
38
|
+
if (active === undefined)
|
|
39
|
+
throw new UsageError('verifier key ring has no active key');
|
|
40
|
+
return { active, keys: [active, ...keys.filter((entry) => entry.keyId !== active.keyId)] };
|
|
41
|
+
}
|
|
42
|
+
/** Checks that a key path stays outside candidate, Git, state, and artifact roots. */
|
|
43
|
+
export function assertExternalVerifierKeyPath(cwd, keyPath, env, additionalArtifactRoots = []) {
|
|
44
|
+
if (process.platform === 'win32' || constants.O_NOFOLLOW === undefined) {
|
|
45
|
+
throw new UsageError('verifier key files need POSIX owner and mode checks with no-follow open; use a protected environment or a supported secret provider on this platform');
|
|
46
|
+
}
|
|
47
|
+
const absolutePath = resolve(cwd, keyPath);
|
|
48
|
+
const canonicalPath = canonicalizePath(absolutePath);
|
|
49
|
+
const protectedRoots = [
|
|
50
|
+
cwd,
|
|
51
|
+
resolveGitDir(cwd, env) ?? '',
|
|
52
|
+
resolveStateDir(cwd),
|
|
53
|
+
...additionalArtifactRoots,
|
|
54
|
+
].filter((root) => root !== '');
|
|
55
|
+
for (const root of protectedRoots) {
|
|
56
|
+
const canonicalRoot = canonicalizePath(resolve(root));
|
|
57
|
+
if (isWithin(canonicalRoot, canonicalPath)) {
|
|
58
|
+
throw new UsageError(`verifier key file must be outside the candidate repository, Git directory, run state, and uploaded artifact roots: '${absolutePath}'`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return absolutePath;
|
|
62
|
+
}
|
|
63
|
+
/** Verifies a receipt with the identified key or any retained key for older receipts. */
|
|
64
|
+
export function verifyGateReceiptWithKeyring(keyring, candidate, expected = {}) {
|
|
65
|
+
const parsed = GateReceiptSchema.safeParse(candidate);
|
|
66
|
+
if (!parsed.success)
|
|
67
|
+
return verifyGateReceipt(keyring.active.key, candidate, expected);
|
|
68
|
+
const receiptKeyId = parsed.data.verifierKeyId;
|
|
69
|
+
if (receiptKeyId !== undefined) {
|
|
70
|
+
const selected = keyring.keys.find((entry) => entry.keyId === receiptKeyId);
|
|
71
|
+
if (selected === undefined) {
|
|
72
|
+
return {
|
|
73
|
+
ok: false,
|
|
74
|
+
rejection: 'key-unknown',
|
|
75
|
+
detail: `KEY_UNKNOWN: verifier key '${receiptKeyId}' is not in the trusted key ring`,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const result = verifyGateReceipt(selected.key, candidate, expected);
|
|
79
|
+
return result.ok || result.rejection !== 'mac-fail'
|
|
80
|
+
? result
|
|
81
|
+
: {
|
|
82
|
+
ok: false,
|
|
83
|
+
rejection: 'key-mismatch',
|
|
84
|
+
detail: `KEY_MISMATCH: verifier key '${receiptKeyId}' does not authenticate this receipt`,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
let lastMacFailure = null;
|
|
88
|
+
for (const entry of keyring.keys) {
|
|
89
|
+
const result = verifyGateReceipt(entry.key, candidate, expected);
|
|
90
|
+
if (result.ok)
|
|
91
|
+
return result;
|
|
92
|
+
if (result.rejection === 'mac-fail')
|
|
93
|
+
lastMacFailure = result;
|
|
94
|
+
else
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
ok: false,
|
|
99
|
+
rejection: 'key-mismatch',
|
|
100
|
+
detail: `KEY_MISMATCH: no trusted verifier key authenticates this receipt${lastMacFailure === null ? '' : ' (MAC check failed)'}`,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Loads and validates an owner-only regular key-ring file without following links. */
|
|
104
|
+
export function readSecureKeyring(path) {
|
|
105
|
+
const fd = openSecureFile(path);
|
|
106
|
+
let raw;
|
|
107
|
+
try {
|
|
108
|
+
const info = fstatSync(fd);
|
|
109
|
+
assertSecureFileInfo(info, path);
|
|
110
|
+
raw = readFileSync(fd, 'utf8');
|
|
111
|
+
}
|
|
112
|
+
finally {
|
|
113
|
+
closeSync(fd);
|
|
114
|
+
}
|
|
115
|
+
return parseKeyringDocument(raw, path);
|
|
116
|
+
}
|
|
117
|
+
/** Creates an initial owner-only key ring at a new external path. */
|
|
118
|
+
export function createVerifierKeyringFile(path) {
|
|
119
|
+
const keyId = newKeyId();
|
|
120
|
+
const document = {
|
|
121
|
+
schemaVersion: 1,
|
|
122
|
+
activeKeyId: keyId,
|
|
123
|
+
keys: { [keyId]: randomBytes(32).toString('base64url') },
|
|
124
|
+
};
|
|
125
|
+
let fd;
|
|
126
|
+
try {
|
|
127
|
+
fd = openSync(path, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
throw new UsageError(`key create: cannot create verifier key file '${path}': ${error.message}`);
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
assertSecureFileInfo(fstatSync(fd), path);
|
|
134
|
+
writeFileSync(fd, `${JSON.stringify(document, null, 2)}\n`, 'utf8');
|
|
135
|
+
fsyncSync(fd);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
closeSync(fd);
|
|
139
|
+
unlinkSync(path);
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
closeSync(fd);
|
|
143
|
+
return { document, keyId };
|
|
144
|
+
}
|
|
145
|
+
/** Rotates the active key and retains every previous key for receipt verification. */
|
|
146
|
+
export function rotateVerifierKeyring(document) {
|
|
147
|
+
const keyId = newKeyId();
|
|
148
|
+
return {
|
|
149
|
+
document: { schemaVersion: 1, activeKeyId: keyId, keys: { ...document.keys, [keyId]: randomBytes(32).toString('base64url') } },
|
|
150
|
+
keyId,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/** Adds an environment key to a ring so existing receipts stay verifiable after source migration. */
|
|
154
|
+
export function importEnvironmentVerifierKey(document, key) {
|
|
155
|
+
if (key.length === 0)
|
|
156
|
+
throw new UsageError(`key import-env: ${VERIFIER_KEY_ENV} is required`);
|
|
157
|
+
const keyId = environmentVerifierKeyId(key);
|
|
158
|
+
const existing = document.keys[keyId];
|
|
159
|
+
if (existing !== undefined && existing !== key) {
|
|
160
|
+
throw new UsageError(`key import-env: key id collision for '${keyId}'`);
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
document: { schemaVersion: 1, activeKeyId: document.activeKeyId, keys: { ...document.keys, [keyId]: key } },
|
|
164
|
+
keyId,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/** Removes a retained key after confirming it is not active. */
|
|
168
|
+
export function retireVerifierKey(document, keyId) {
|
|
169
|
+
if (keyId === document.activeKeyId)
|
|
170
|
+
throw new UsageError('cannot retire the active verifier key; rotate first');
|
|
171
|
+
if (document.keys[keyId] === undefined)
|
|
172
|
+
throw new UsageError(`unknown verifier key id '${keyId}'`);
|
|
173
|
+
const keys = { ...document.keys };
|
|
174
|
+
delete keys[keyId];
|
|
175
|
+
return { schemaVersion: 1, activeKeyId: document.activeKeyId, keys };
|
|
176
|
+
}
|
|
177
|
+
/** Atomically replaces an existing secure key ring. */
|
|
178
|
+
export function writeSecureKeyring(path, document) {
|
|
179
|
+
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
180
|
+
const fd = openSync(temporary, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600);
|
|
181
|
+
try {
|
|
182
|
+
assertSecureFileInfo(fstatSync(fd), temporary);
|
|
183
|
+
writeFileSync(fd, `${JSON.stringify(document, null, 2)}\n`, 'utf8');
|
|
184
|
+
fsyncSync(fd);
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
closeSync(fd);
|
|
188
|
+
unlinkSync(temporary);
|
|
189
|
+
throw error;
|
|
190
|
+
}
|
|
191
|
+
closeSync(fd);
|
|
192
|
+
try {
|
|
193
|
+
renameSync(temporary, path);
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
unlinkSync(temporary);
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/** Converts a secret or existing ring argument to a ring. */
|
|
201
|
+
export function verifierKeyringFrom(source) {
|
|
202
|
+
if (source === null)
|
|
203
|
+
return null;
|
|
204
|
+
if (typeof source !== 'string')
|
|
205
|
+
return source;
|
|
206
|
+
const active = { keyId: environmentVerifierKeyId(source), key: source };
|
|
207
|
+
return { active, keys: [active] };
|
|
208
|
+
}
|
|
209
|
+
/** Opens one regular key file without following a symbolic link.
|
|
210
|
+
*
|
|
211
|
+
* Args:
|
|
212
|
+
* path: absolute external key-file path.
|
|
213
|
+
*
|
|
214
|
+
* Returns:
|
|
215
|
+
* number: an open file descriptor.
|
|
216
|
+
*/
|
|
217
|
+
function openSecureFile(path) {
|
|
218
|
+
try {
|
|
219
|
+
const linkInfo = lstatSync(path);
|
|
220
|
+
if (linkInfo.isSymbolicLink())
|
|
221
|
+
throw new UsageError('verifier key file must not be a symbolic link');
|
|
222
|
+
assertSecureFileInfo(linkInfo, path);
|
|
223
|
+
return openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
if (error instanceof UsageError)
|
|
227
|
+
throw error;
|
|
228
|
+
throw new UsageError(`cannot open verifier key file '${path}': ${error.message}`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/** Requires a current-user-owned file with no group access or other links.
|
|
232
|
+
*
|
|
233
|
+
* Args:
|
|
234
|
+
* info: filesystem metadata for the open file.
|
|
235
|
+
* path: key-file path used in diagnostics.
|
|
236
|
+
*/
|
|
237
|
+
function assertSecureFileInfo(info, path) {
|
|
238
|
+
if (!info.isFile())
|
|
239
|
+
throw new UsageError(`verifier key file '${path}' must be a regular file`);
|
|
240
|
+
if ((info.mode & 0o077) !== 0) {
|
|
241
|
+
throw new UsageError(`verifier key file '${path}' must be owner-only (mode 0600 or stricter)`);
|
|
242
|
+
}
|
|
243
|
+
if (info.nlink !== 1)
|
|
244
|
+
throw new UsageError(`verifier key file '${path}' must not have other hard links`);
|
|
245
|
+
const currentUid = typeof process.getuid === 'function' ? process.getuid() : null;
|
|
246
|
+
if (currentUid !== null && info.uid !== currentUid) {
|
|
247
|
+
throw new UsageError(`verifier key file '${path}' must be owned by the current user`);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/** Parses the versioned key-ring JSON without exposing secret values in errors.
|
|
251
|
+
*
|
|
252
|
+
* Args:
|
|
253
|
+
* raw: key-ring file contents.
|
|
254
|
+
* path: source path used in diagnostics.
|
|
255
|
+
*
|
|
256
|
+
* Returns:
|
|
257
|
+
* VerifierKeyringDocument: validated ids and secret values.
|
|
258
|
+
*/
|
|
259
|
+
function parseKeyringDocument(raw, path) {
|
|
260
|
+
let value;
|
|
261
|
+
try {
|
|
262
|
+
value = JSON.parse(raw);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
throw new UsageError(`verifier key file '${path}' is not valid JSON`);
|
|
266
|
+
}
|
|
267
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
268
|
+
throw new UsageError(`verifier key file '${path}' must contain a key-ring object`);
|
|
269
|
+
}
|
|
270
|
+
const document = value;
|
|
271
|
+
if (document['schemaVersion'] !== 1 ||
|
|
272
|
+
typeof document['activeKeyId'] !== 'string' ||
|
|
273
|
+
!KEY_ID_PATTERN.test(document['activeKeyId']) ||
|
|
274
|
+
typeof document['keys'] !== 'object' ||
|
|
275
|
+
document['keys'] === null ||
|
|
276
|
+
Array.isArray(document['keys'])) {
|
|
277
|
+
throw new UsageError(`verifier key file '${path}' has an invalid key-ring header`);
|
|
278
|
+
}
|
|
279
|
+
const keys = {};
|
|
280
|
+
for (const [keyId, key] of Object.entries(document['keys'])) {
|
|
281
|
+
if (!KEY_ID_PATTERN.test(keyId) || typeof key !== 'string' || key.length === 0) {
|
|
282
|
+
throw new UsageError(`verifier key file '${path}' has an invalid key entry`);
|
|
283
|
+
}
|
|
284
|
+
keys[keyId] = key;
|
|
285
|
+
}
|
|
286
|
+
if (Object.keys(keys).length === 0 || keys[document['activeKeyId']] === undefined) {
|
|
287
|
+
throw new UsageError(`verifier key file '${path}' must include its active key`);
|
|
288
|
+
}
|
|
289
|
+
return { schemaVersion: 1, activeKeyId: document['activeKeyId'], keys };
|
|
290
|
+
}
|
|
291
|
+
/** Resolves existing symlinks and appends any not-yet-existing path suffix.
|
|
292
|
+
*
|
|
293
|
+
* Args:
|
|
294
|
+
* path: absolute or relative filesystem path.
|
|
295
|
+
*
|
|
296
|
+
* Returns:
|
|
297
|
+
* string: canonical absolute path when its existing parent can be read.
|
|
298
|
+
*/
|
|
299
|
+
function canonicalizePath(path) {
|
|
300
|
+
if (isAbsolute(path)) {
|
|
301
|
+
let cursor = resolve(path);
|
|
302
|
+
const suffix = [];
|
|
303
|
+
while (true) {
|
|
304
|
+
try {
|
|
305
|
+
return resolve(realpathSync(cursor), ...suffix.reverse());
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
const parent = dirname(cursor);
|
|
309
|
+
if (parent === cursor)
|
|
310
|
+
return resolve(path);
|
|
311
|
+
suffix.push(cursor.slice(parent.length + (parent.endsWith(sep) ? 0 : 1)));
|
|
312
|
+
cursor = parent;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return canonicalizePath(resolve(path));
|
|
317
|
+
}
|
|
318
|
+
/** Returns whether one resolved path is the root or one of its descendants.
|
|
319
|
+
*
|
|
320
|
+
* Args:
|
|
321
|
+
* root: canonical protected root.
|
|
322
|
+
* path: canonical candidate path.
|
|
323
|
+
*
|
|
324
|
+
* Returns:
|
|
325
|
+
* boolean: true when `path` is within `root`.
|
|
326
|
+
*/
|
|
327
|
+
function isWithin(root, path) {
|
|
328
|
+
const child = relative(root, path);
|
|
329
|
+
return child === '' || (child !== '..' && !child.startsWith(`..${sep}`) && !isAbsolute(child));
|
|
330
|
+
}
|
|
331
|
+
/** Creates an unrelated, non-secret id for one newly generated key.
|
|
332
|
+
*
|
|
333
|
+
* Returns:
|
|
334
|
+
* string: a unique key id.
|
|
335
|
+
*/
|
|
336
|
+
function newKeyId() {
|
|
337
|
+
return `key-${randomBytes(12).toString('hex')}`;
|
|
338
|
+
}
|
|
339
|
+
//# sourceMappingURL=verifier-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifier-keys.js","sourceRoot":"","sources":["../src/verifier-keys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAA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;oBAAE,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;gBAC5C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,GAAG,MAAM,CAAC;YAClB,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAY;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,OAAO,KAAK,KAAK,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AACjG,CAAC;AAED;;;;GAIG;AACH,SAAS,QAAQ;IACf,OAAO,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;AAClD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gate-forge/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"gateforgeCompatibility": {
|
|
5
|
+
"supervisedFixtureProtocol": "gateforge.supervised-playwright.v1"
|
|
6
|
+
},
|
|
4
7
|
"license": "Apache-2.0",
|
|
5
8
|
"description": "Gateforge CLI: init, discover, obligations, check, test-gates, baseline update.",
|
|
6
9
|
"type": "module",
|
|
@@ -8,7 +11,7 @@
|
|
|
8
11
|
"node": ">=20"
|
|
9
12
|
},
|
|
10
13
|
"bin": {
|
|
11
|
-
"gateforge": "
|
|
14
|
+
"gateforge": "bin/gateforge.js"
|
|
12
15
|
},
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
@@ -27,14 +30,14 @@
|
|
|
27
30
|
"test": "vitest run"
|
|
28
31
|
},
|
|
29
32
|
"dependencies": {
|
|
30
|
-
"@gate-forge/core": "^0.
|
|
31
|
-
"@gate-forge/http-contract": "^0.
|
|
32
|
-
"@gate-forge/pack-fastapi": "^0.
|
|
33
|
-
"@gate-forge/pack-http": "^0.
|
|
34
|
-
"@gate-forge/pack-playwright": "^0.
|
|
35
|
-
"@gate-forge/pack-sqlalchemy": "^0.
|
|
36
|
-
"@gate-forge/pack-task": "^0.
|
|
37
|
-
"@gate-forge/plugin-protocol": "^0.
|
|
33
|
+
"@gate-forge/core": "^0.7.0",
|
|
34
|
+
"@gate-forge/http-contract": "^0.7.0",
|
|
35
|
+
"@gate-forge/pack-fastapi": "^0.7.0",
|
|
36
|
+
"@gate-forge/pack-http": "^0.7.0",
|
|
37
|
+
"@gate-forge/pack-playwright": "^0.7.0",
|
|
38
|
+
"@gate-forge/pack-sqlalchemy": "^0.7.0",
|
|
39
|
+
"@gate-forge/pack-task": "^0.7.0",
|
|
40
|
+
"@gate-forge/plugin-protocol": "^0.7.0",
|
|
38
41
|
"picomatch": "^4.0.7",
|
|
39
42
|
"yaml": "^2.8.1"
|
|
40
43
|
},
|