@extenshi/cli 0.17.0 → 0.19.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 +52 -0
- package/dist/cli.js +71 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -1
- package/dist/config.js.map +1 -1
- package/dist/cws-policies.d.ts.map +1 -1
- package/dist/cws-policies.js +1 -0
- package/dist/cws-policies.js.map +1 -1
- package/dist/extension-localization.d.ts +20 -0
- package/dist/extension-localization.d.ts.map +1 -0
- package/dist/extension-localization.js +94 -0
- package/dist/extension-localization.js.map +1 -0
- package/dist/generate-listing.d.ts +31 -0
- package/dist/generate-listing.d.ts.map +1 -0
- package/dist/generate-listing.js +145 -0
- package/dist/generate-listing.js.map +1 -0
- package/dist/listing-checks.d.ts +9 -1
- package/dist/listing-checks.d.ts.map +1 -1
- package/dist/listing-checks.js +89 -1
- package/dist/listing-checks.js.map +1 -1
- package/dist/localize-init.d.ts +9 -0
- package/dist/localize-init.d.ts.map +1 -0
- package/dist/localize-init.js +166 -0
- package/dist/localize-init.js.map +1 -0
- package/dist/localize.d.ts +27 -0
- package/dist/localize.d.ts.map +1 -0
- package/dist/localize.js +292 -0
- package/dist/localize.js.map +1 -0
- package/dist/permission-justifications.d.ts +39 -0
- package/dist/permission-justifications.d.ts.map +1 -0
- package/dist/permission-justifications.js +145 -0
- package/dist/permission-justifications.js.map +1 -0
- package/dist/project-workspace.d.ts +1976 -0
- package/dist/project-workspace.d.ts.map +1 -0
- package/dist/project-workspace.js +350 -0
- package/dist/project-workspace.js.map +1 -0
- package/dist/project.d.ts +17 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +671 -0
- package/dist/project.js.map +1 -0
- package/dist/review-checks.d.ts +10 -0
- package/dist/review-checks.d.ts.map +1 -1
- package/dist/review-checks.js +24 -0
- package/dist/review-checks.js.map +1 -1
- package/package.json +7 -6
package/dist/localize.js
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { canonicalSerialize, EXTENSION_LOCALES, validateMessageCatalog, } from './extension-localization.js';
|
|
5
|
+
import { listingFromArtifact } from './listing.js';
|
|
6
|
+
import { runListingOnlyChecks } from './review-checks.js';
|
|
7
|
+
const STATE = '.extenshi-localization.json';
|
|
8
|
+
function locale(value) {
|
|
9
|
+
if (typeof value !== 'string' || !EXTENSION_LOCALES.includes(value))
|
|
10
|
+
throw new Error(`Unsupported extension locale: ${String(value)}`);
|
|
11
|
+
}
|
|
12
|
+
function object(value) {
|
|
13
|
+
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
14
|
+
}
|
|
15
|
+
/** Reject symlink components, including dangling links, before reading or replacing workspace files. */
|
|
16
|
+
function safePath(root, relative) {
|
|
17
|
+
const result = path.resolve(root, relative);
|
|
18
|
+
if (!result.startsWith(`${root}${path.sep}`))
|
|
19
|
+
throw new Error('Path must stay inside extension directory');
|
|
20
|
+
let current = root;
|
|
21
|
+
for (const part of path.relative(root, result).split(path.sep)) {
|
|
22
|
+
current = path.join(current, part);
|
|
23
|
+
try {
|
|
24
|
+
if (fs.lstatSync(current).isSymbolicLink())
|
|
25
|
+
throw new Error(`Symlinks are not supported: ${current}`);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
if (error.code !== 'ENOENT')
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function read(root, relative, fallback) {
|
|
35
|
+
const file = safePath(root, relative);
|
|
36
|
+
if (!fs.existsSync(file) && fallback !== undefined)
|
|
37
|
+
return fallback;
|
|
38
|
+
if (fs.statSync(file).size > 10 * 1024 * 1024)
|
|
39
|
+
throw new Error(`Localization file exceeds 10 MB: ${relative}`);
|
|
40
|
+
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
41
|
+
}
|
|
42
|
+
function catalogPath(code) {
|
|
43
|
+
locale(code);
|
|
44
|
+
return `_locales/${code}/messages.json`;
|
|
45
|
+
}
|
|
46
|
+
function hash(value) {
|
|
47
|
+
return createHash('sha256').update(canonicalSerialize(value)).digest('hex');
|
|
48
|
+
}
|
|
49
|
+
function assertValid(errors) {
|
|
50
|
+
if (errors.length)
|
|
51
|
+
throw new Error(errors.join('\n'));
|
|
52
|
+
}
|
|
53
|
+
function context(directory, protect) {
|
|
54
|
+
const root = fs.realpathSync(directory);
|
|
55
|
+
const manifest = read(root, 'manifest.json');
|
|
56
|
+
locale(manifest.default_locale);
|
|
57
|
+
const sourceLocale = manifest.default_locale;
|
|
58
|
+
const source = read(root, catalogPath(sourceLocale));
|
|
59
|
+
assertValid(validateMessageCatalog(source, source));
|
|
60
|
+
const config = read(root, 'localization.json', {});
|
|
61
|
+
if (config.sourceLocale && config.sourceLocale !== sourceLocale)
|
|
62
|
+
throw new Error('localization.json sourceLocale differs from manifest default_locale');
|
|
63
|
+
if (config.targetLocales &&
|
|
64
|
+
(!Array.isArray(config.targetLocales) || config.targetLocales.some((value) => typeof value !== 'string')))
|
|
65
|
+
throw new Error('Invalid targetLocales configuration');
|
|
66
|
+
if (config.protectedTerms &&
|
|
67
|
+
(!Array.isArray(config.protectedTerms) ||
|
|
68
|
+
config.protectedTerms.some((value) => typeof value !== 'string')))
|
|
69
|
+
throw new Error('Invalid protectedTerms configuration');
|
|
70
|
+
const protectedTerms = [...(config.protectedTerms ?? []), ...(protect?.split(',').filter(Boolean) ?? [])];
|
|
71
|
+
const state = read(root, STATE, { version: 1, locales: {} });
|
|
72
|
+
if (!object(state) || state.version !== 1 || !object(state.locales))
|
|
73
|
+
throw new Error('Invalid localization state');
|
|
74
|
+
if (state.targetHashes !== undefined && !object(state.targetHashes))
|
|
75
|
+
throw new Error('Invalid localization target hashes');
|
|
76
|
+
for (const [code, hashes] of [
|
|
77
|
+
...Object.entries(state.locales),
|
|
78
|
+
...Object.entries(state.targetHashes ?? {}),
|
|
79
|
+
]) {
|
|
80
|
+
locale(code);
|
|
81
|
+
if (!object(hashes) || Object.values(hashes).some((value) => typeof value !== 'string'))
|
|
82
|
+
throw new Error('Invalid localization state hashes');
|
|
83
|
+
}
|
|
84
|
+
return { root, manifest, sourceLocale, source, config, protectedTerms, state };
|
|
85
|
+
}
|
|
86
|
+
/** Stage every file first and restore originals if a rename fails. */
|
|
87
|
+
function writeBatch(root, files) {
|
|
88
|
+
const staged = [];
|
|
89
|
+
const written = [];
|
|
90
|
+
try {
|
|
91
|
+
for (const [relative, value] of Object.entries(files)) {
|
|
92
|
+
const file = safePath(root, relative);
|
|
93
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
94
|
+
const temp = `${file}.${randomUUID()}.tmp`;
|
|
95
|
+
const original = fs.existsSync(file) ? fs.readFileSync(file) : null;
|
|
96
|
+
staged.push({ file, temp, original });
|
|
97
|
+
fs.writeFileSync(temp, `${JSON.stringify(value, null, '\t')}\n`, { flag: 'wx' });
|
|
98
|
+
}
|
|
99
|
+
for (const item of staged) {
|
|
100
|
+
safePath(root, path.relative(root, item.file));
|
|
101
|
+
fs.renameSync(item.temp, item.file);
|
|
102
|
+
written.push(item);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
for (const item of written.reverse()) {
|
|
107
|
+
if (item.original)
|
|
108
|
+
fs.writeFileSync(item.file, item.original);
|
|
109
|
+
else
|
|
110
|
+
fs.rmSync(item.file, { force: true });
|
|
111
|
+
}
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
for (const item of staged)
|
|
116
|
+
fs.rmSync(item.temp, { force: true });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export function prepareLocalization(directory, options) {
|
|
120
|
+
const ctx = context(directory, options.protect);
|
|
121
|
+
const targets = [
|
|
122
|
+
...new Set(options.lang ? options.lang.split(',').map((code) => code.trim()) : (ctx.config.targetLocales ?? [])),
|
|
123
|
+
];
|
|
124
|
+
if (!targets.length)
|
|
125
|
+
throw new Error('Specify --lang fr,de,es or targetLocales in localization.json');
|
|
126
|
+
const bundle = { version: 1, sourceLocale: ctx.sourceLocale, locales: {} };
|
|
127
|
+
for (const code of targets) {
|
|
128
|
+
locale(code);
|
|
129
|
+
if (code === ctx.sourceLocale)
|
|
130
|
+
throw new Error('Target locale cannot be the default locale');
|
|
131
|
+
const existing = read(ctx.root, catalogPath(code), {});
|
|
132
|
+
assertValid(validateMessageCatalog(existing, existing));
|
|
133
|
+
const pending = Object.keys(ctx.source).filter((key) => !existing[key] ||
|
|
134
|
+
ctx.state.locales[code]?.[key] !== hash(ctx.source[key]) ||
|
|
135
|
+
ctx.state.targetHashes?.[code]?.[key] !== hash(existing[key]));
|
|
136
|
+
const removeKeys = Object.keys(existing).filter((key) => !Object.hasOwn(ctx.source, key));
|
|
137
|
+
if (pending.length || removeKeys.length)
|
|
138
|
+
bundle.locales[code] = {
|
|
139
|
+
removeKeys,
|
|
140
|
+
sourceHashes: Object.fromEntries(pending.map((key) => [key, hash(ctx.source[key])])),
|
|
141
|
+
messages: Object.fromEntries(pending.map((key) => [key, ctx.source[key]])),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
fs.mkdirSync(options.output, { recursive: true });
|
|
145
|
+
const output = fs.realpathSync(options.output);
|
|
146
|
+
const file = safePath(output, 'localization-request.json');
|
|
147
|
+
// Request files must never overwrite work a translator already started.
|
|
148
|
+
fs.writeFileSync(file, `${JSON.stringify({ ...bundle, instructions: 'REQUEST ONLY: translate messages for each locale; preserve sourceHashes, placeholders, dollar escapes and protected terms. Review every requested key, then add reviewed: true to each locale before apply.', protectedTerms: ctx.protectedTerms }, null, '\t')}\n`, { flag: 'wx' });
|
|
149
|
+
return bundle;
|
|
150
|
+
}
|
|
151
|
+
function listingGate(manifest, sourceLocale, source, target) {
|
|
152
|
+
const errors = [];
|
|
153
|
+
const resolvedManifest = (messages) => {
|
|
154
|
+
const resolved = { ...manifest };
|
|
155
|
+
for (const field of ['name', 'description']) {
|
|
156
|
+
const raw = manifest[field];
|
|
157
|
+
if (typeof raw !== 'string')
|
|
158
|
+
continue;
|
|
159
|
+
const match = /^__MSG_([A-Za-z0-9_]+)__$/.exec(raw);
|
|
160
|
+
if (!match)
|
|
161
|
+
continue;
|
|
162
|
+
const key = Object.keys(messages).find((item) => item.toLowerCase() === match[1].toLowerCase());
|
|
163
|
+
if (!key) {
|
|
164
|
+
errors.push(`Manifest ${field}: missing message ${match[1]}`);
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const entry = messages[key];
|
|
168
|
+
const expandContent = (content) => content.replace(/\${2,}|\$[1-9]/g, (token) => {
|
|
169
|
+
if (token.startsWith('$$'))
|
|
170
|
+
return token.slice(1);
|
|
171
|
+
errors.push(`Manifest ${field}: positional substitutions require runtime arguments; use static text`);
|
|
172
|
+
return '';
|
|
173
|
+
});
|
|
174
|
+
resolved[field] = entry.message.replace(/\${2,}|\$[A-Za-z0-9_]+\$|\$[1-9]/g, (token) => {
|
|
175
|
+
if (token.startsWith('$$'))
|
|
176
|
+
return token.slice(1);
|
|
177
|
+
if (/^\$[1-9]$/.test(token))
|
|
178
|
+
return expandContent(token);
|
|
179
|
+
const name = Object.keys(entry.placeholders ?? {}).find((item) => item.toLowerCase() === token.slice(1, -1).toLowerCase());
|
|
180
|
+
return name ? expandContent(entry.placeholders?.[name]?.content ?? '') : token;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return resolved;
|
|
184
|
+
};
|
|
185
|
+
const originalManifest = resolvedManifest(source);
|
|
186
|
+
const translatedManifest = resolvedManifest(target);
|
|
187
|
+
const findings = (messages) => runListingOnlyChecks(listingFromArtifact(messages === source ? originalManifest : translatedManifest, new Map([[catalogPath(sourceLocale), JSON.stringify(messages)]])));
|
|
188
|
+
// Preserve matched claim/pattern evidence too: a baseline ranking claim must
|
|
189
|
+
// never hide a new guarantee or a different field's finding.
|
|
190
|
+
const identity = (finding) => {
|
|
191
|
+
const evidence = (finding.evidence ?? '').replace(/^\[[^\]]+\]\s*/, '');
|
|
192
|
+
const field = evidence.split(':')[0].trim();
|
|
193
|
+
const pattern = evidence.includes(' — ') ? evidence.split(' — ').slice(1).join(' — ') : '';
|
|
194
|
+
return `${finding.check}:${finding.title}:${field}:${pattern}`;
|
|
195
|
+
};
|
|
196
|
+
const baseline = new Map();
|
|
197
|
+
for (const finding of findings(source))
|
|
198
|
+
baseline.set(identity(finding), (baseline.get(identity(finding)) ?? 0) + 1);
|
|
199
|
+
// Store limits apply to visible text after placeholder and escape expansion.
|
|
200
|
+
// https://developer.chrome.com/docs/extensions/reference/manifest
|
|
201
|
+
for (const [field, limit] of [
|
|
202
|
+
['name', 75],
|
|
203
|
+
['description', 132],
|
|
204
|
+
]) {
|
|
205
|
+
const message = translatedManifest[field];
|
|
206
|
+
if (typeof message === 'string' && message.length > limit)
|
|
207
|
+
errors.push(`Manifest ${field}: translation exceeds ${limit} characters`);
|
|
208
|
+
}
|
|
209
|
+
for (const finding of findings(target)) {
|
|
210
|
+
const remaining = baseline.get(identity(finding)) ?? 0;
|
|
211
|
+
if (remaining)
|
|
212
|
+
baseline.set(identity(finding), remaining - 1);
|
|
213
|
+
else
|
|
214
|
+
errors.push(`Translation introduces listing risk ${finding.check}: ${finding.title}`);
|
|
215
|
+
}
|
|
216
|
+
return errors;
|
|
217
|
+
}
|
|
218
|
+
export function applyLocalization(directory, translations, protect) {
|
|
219
|
+
const ctx = context(directory, protect);
|
|
220
|
+
if (!object(translations) ||
|
|
221
|
+
translations.version !== 1 ||
|
|
222
|
+
translations.sourceLocale !== ctx.sourceLocale ||
|
|
223
|
+
!object(translations.locales))
|
|
224
|
+
throw new Error('Invalid translation bundle or source locale');
|
|
225
|
+
const files = {};
|
|
226
|
+
let keys = 0;
|
|
227
|
+
for (const [code, value] of Object.entries(translations.locales)) {
|
|
228
|
+
locale(code);
|
|
229
|
+
if (code === ctx.sourceLocale)
|
|
230
|
+
throw new Error('Cannot replace the default locale');
|
|
231
|
+
if (!object(value) || value.reviewed !== true || !object(value.sourceHashes) || !object(value.messages))
|
|
232
|
+
throw new Error(`Invalid translation bundle for ${code}; set reviewed: true after reviewing each requested translation`);
|
|
233
|
+
assertValid(validateMessageCatalog(ctx.source, value.messages, {
|
|
234
|
+
allowMissing: true,
|
|
235
|
+
protectedTerms: ctx.protectedTerms,
|
|
236
|
+
}));
|
|
237
|
+
if (Object.keys(value.sourceHashes).length !== Object.keys(value.messages).length)
|
|
238
|
+
throw new Error(`${code}: sourceHashes must match translated keys`);
|
|
239
|
+
for (const key of Object.keys(value.messages))
|
|
240
|
+
if (value.sourceHashes[key] !== hash(ctx.source[key]))
|
|
241
|
+
throw new Error(`${code}.${key}: source changed; prepare translations again`);
|
|
242
|
+
const existing = read(ctx.root, catalogPath(code), {});
|
|
243
|
+
const removeKeys = value.removeKeys ?? [];
|
|
244
|
+
if (!Array.isArray(removeKeys) ||
|
|
245
|
+
removeKeys.some((key) => typeof key !== 'string' || Object.hasOwn(ctx.source, key) || !Object.hasOwn(existing, key)))
|
|
246
|
+
throw new Error(`${code}: invalid or stale removed keys; prepare translations again`);
|
|
247
|
+
const merged = { ...existing, ...value.messages };
|
|
248
|
+
for (const key of removeKeys)
|
|
249
|
+
delete merged[key];
|
|
250
|
+
assertValid(validateMessageCatalog(ctx.source, merged, { protectedTerms: ctx.protectedTerms }));
|
|
251
|
+
assertValid(listingGate(ctx.manifest, ctx.sourceLocale, ctx.source, merged));
|
|
252
|
+
files[catalogPath(code)] = merged;
|
|
253
|
+
ctx.state.locales[code] = { ...ctx.state.locales[code], ...value.sourceHashes };
|
|
254
|
+
ctx.state.targetHashes ??= {};
|
|
255
|
+
ctx.state.targetHashes[code] = {
|
|
256
|
+
...ctx.state.targetHashes[code],
|
|
257
|
+
...Object.fromEntries(Object.entries(value.messages).map(([key, message]) => [key, hash(message)])),
|
|
258
|
+
};
|
|
259
|
+
for (const key of removeKeys) {
|
|
260
|
+
delete ctx.state.locales[code][key];
|
|
261
|
+
delete ctx.state.targetHashes[code][key];
|
|
262
|
+
}
|
|
263
|
+
keys += Object.keys(value.messages).length;
|
|
264
|
+
}
|
|
265
|
+
if (Object.keys(files).length) {
|
|
266
|
+
files[STATE] = ctx.state;
|
|
267
|
+
writeBatch(ctx.root, files);
|
|
268
|
+
}
|
|
269
|
+
return { locales: Object.keys(translations.locales), keys };
|
|
270
|
+
}
|
|
271
|
+
export function checkLocalization(directory, protect) {
|
|
272
|
+
const ctx = context(directory, protect);
|
|
273
|
+
const locales = [
|
|
274
|
+
...new Set([...fs.readdirSync(safePath(ctx.root, '_locales')), ...(ctx.config.targetLocales ?? [])]),
|
|
275
|
+
].filter((code) => code !== ctx.sourceLocale);
|
|
276
|
+
const errors = [];
|
|
277
|
+
for (const code of locales) {
|
|
278
|
+
locale(code);
|
|
279
|
+
const target = read(ctx.root, catalogPath(code), {});
|
|
280
|
+
const invalid = validateMessageCatalog(ctx.source, target, { protectedTerms: ctx.protectedTerms });
|
|
281
|
+
errors.push(...invalid.map((error) => `${code}: ${error}`));
|
|
282
|
+
if (!invalid.length)
|
|
283
|
+
errors.push(...listingGate(ctx.manifest, ctx.sourceLocale, ctx.source, target).map((error) => `${code}: ${error}`));
|
|
284
|
+
for (const key of Object.keys(ctx.source))
|
|
285
|
+
if (ctx.state.locales[code]?.[key] !== hash(ctx.source[key]) ||
|
|
286
|
+
!target[key] ||
|
|
287
|
+
ctx.state.targetHashes?.[code]?.[key] !== hash(target[key]))
|
|
288
|
+
errors.push(`${code}.${key}: unreviewed or stale translation; run localize prepare`);
|
|
289
|
+
}
|
|
290
|
+
return { locales, errors };
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=localize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localize.js","sourceRoot":"","sources":["../src/localize.ts"],"names":[],"m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CAAC;YACxC,IACC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACxD,CAAC,MAAM,CAAC,GAAG,CAAC;gBACZ,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAE3D,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,GAAG,yDAAyD,CAAC,CAAA;IACvF,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store-justification prompts for sensitive permissions (ROADMAP it.1 T6).
|
|
3
|
+
*
|
|
4
|
+
* The published CLI cannot import workspace `shared-types`, so this is a
|
|
5
|
+
* lockstep copy of `PERMISSION_JUSTIFICATION_PROMPTS` /
|
|
6
|
+
* `JUSTIFICATION_CRITICAL_PERMISSIONS` in `shared-types/permission-usage.ts`.
|
|
7
|
+
* `permission-justifications.test.ts` pins equality.
|
|
8
|
+
*
|
|
9
|
+
* These are QUESTIONS the developer answers in the dashboard, never prose we
|
|
10
|
+
* write on their behalf — an invented justification submitted verbatim is a
|
|
11
|
+
* policy problem for them.
|
|
12
|
+
*/
|
|
13
|
+
import type { Manifest } from './review-checks.js';
|
|
14
|
+
export type PermissionJustificationPrompt = {
|
|
15
|
+
question: string;
|
|
16
|
+
example: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const PERMISSION_JUSTIFICATION_PROMPTS: Readonly<Record<string, PermissionJustificationPrompt>>;
|
|
19
|
+
/**
|
|
20
|
+
* Mirror of `JUSTIFICATION_CRITICAL_PERMISSIONS` in shared-types. Used only to
|
|
21
|
+
* order the checklist so the scariest prompt is answered first.
|
|
22
|
+
*/
|
|
23
|
+
export declare const JUSTIFICATION_CRITICAL_PERMISSIONS: readonly string[];
|
|
24
|
+
/**
|
|
25
|
+
* Sensitive permissions declared, including host patterns. Matches
|
|
26
|
+
* `justification_permissions` in `dags/.../permission_usage.py`: host
|
|
27
|
+
* permissions are out of scope for used/unused but in scope here —
|
|
28
|
+
* `<all_urls>` is the single most-questioned dashboard entry.
|
|
29
|
+
*/
|
|
30
|
+
export declare function justificationPermissions(manifest: Manifest): string[];
|
|
31
|
+
export type JustificationRow = {
|
|
32
|
+
permission: string;
|
|
33
|
+
tier: 'CRITICAL' | 'HIGH';
|
|
34
|
+
question: string;
|
|
35
|
+
example: string;
|
|
36
|
+
};
|
|
37
|
+
/** Store-justification prompts for the sensitive permissions declared. */
|
|
38
|
+
export declare function buildJustificationChecklist(manifest: Manifest): JustificationRow[];
|
|
39
|
+
//# sourceMappingURL=permission-justifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-justifications.d.ts","sourceRoot":"","sources":["../src/permission-justifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,MAAM,6BAA6B,GAAG;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAmFpG,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,kCAAkC,EAAE,SAAS,MAAM,EAK/D,CAAA;AAiBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAAE,CAWrE;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,UAAU,GAAG,MAAM,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CACf,CAAA;AAED,0EAA0E;AAC1E,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,CAkBlF"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store-justification prompts for sensitive permissions (ROADMAP it.1 T6).
|
|
3
|
+
*
|
|
4
|
+
* The published CLI cannot import workspace `shared-types`, so this is a
|
|
5
|
+
* lockstep copy of `PERMISSION_JUSTIFICATION_PROMPTS` /
|
|
6
|
+
* `JUSTIFICATION_CRITICAL_PERMISSIONS` in `shared-types/permission-usage.ts`.
|
|
7
|
+
* `permission-justifications.test.ts` pins equality.
|
|
8
|
+
*
|
|
9
|
+
* These are QUESTIONS the developer answers in the dashboard, never prose we
|
|
10
|
+
* write on their behalf — an invented justification submitted verbatim is a
|
|
11
|
+
* policy problem for them.
|
|
12
|
+
*/
|
|
13
|
+
export const PERMISSION_JUSTIFICATION_PROMPTS = {
|
|
14
|
+
'<all_urls>': {
|
|
15
|
+
question: 'Which sites does the feature actually run on, and why can that not be expressed as a list of match patterns?',
|
|
16
|
+
example: 'The extension checks every page the user opens against a local blocklist, so it cannot know the origins in advance.',
|
|
17
|
+
},
|
|
18
|
+
debugger: {
|
|
19
|
+
question: 'Which debugger domain and commands do you attach, and what user-visible feature needs them?',
|
|
20
|
+
example: 'We attach to the Network domain to record HAR files when the user presses Record, and detach when recording stops.',
|
|
21
|
+
},
|
|
22
|
+
management: {
|
|
23
|
+
question: 'What do you read or change about other installed extensions, and does the user ask for it?',
|
|
24
|
+
example: 'The user picks which of their extensions to disable while a game is in fullscreen; we call management.setEnabled only for the ones they selected.',
|
|
25
|
+
},
|
|
26
|
+
nativeMessaging: {
|
|
27
|
+
question: 'Which native host do you connect to, who publishes it, and what data crosses that boundary?',
|
|
28
|
+
example: 'We connect to our own signed desktop helper to read the local Git repository the user selected; only the repository path crosses the boundary.',
|
|
29
|
+
},
|
|
30
|
+
desktopCapture: {
|
|
31
|
+
question: 'What does the user do to start a capture, and where does the captured stream go?',
|
|
32
|
+
example: 'The user clicks Record, picks a surface in the browser picker, and the stream is encoded locally and saved to their downloads.',
|
|
33
|
+
},
|
|
34
|
+
proxy: {
|
|
35
|
+
question: 'What traffic do you route where, and how does the user turn it off?',
|
|
36
|
+
example: 'We set a PAC script routing only the corporate domains the admin configured; the toolbar toggle clears the setting.',
|
|
37
|
+
},
|
|
38
|
+
cookies: {
|
|
39
|
+
question: 'Which cookies on which origins do you read or write, and for what feature?',
|
|
40
|
+
example: 'We read our own session cookie on app.example.com to show the signed-in user in the popup.',
|
|
41
|
+
},
|
|
42
|
+
tabs: {
|
|
43
|
+
question: 'Which privileged tab fields (url, title, favIconUrl) does the feature need, and why is activeTab not enough?',
|
|
44
|
+
example: 'The side panel lists every open tab by title so the user can search them, which activeTab cannot provide.',
|
|
45
|
+
},
|
|
46
|
+
history: {
|
|
47
|
+
question: 'What do you read from or write to browsing history, and does it leave the device?',
|
|
48
|
+
example: 'We search local history for pages matching the current query to surface them in the popup; nothing is uploaded.',
|
|
49
|
+
},
|
|
50
|
+
topSites: {
|
|
51
|
+
question: 'Where are the top sites shown, and does the list leave the device?',
|
|
52
|
+
example: 'The new-tab page renders the eight most-visited sites locally; the list is never sent anywhere.',
|
|
53
|
+
},
|
|
54
|
+
downloads: {
|
|
55
|
+
question: 'What do you download or inspect, and did the user ask for that file?',
|
|
56
|
+
example: 'We save the file the user chose to export and then open the downloads shelf entry for it.',
|
|
57
|
+
},
|
|
58
|
+
webRequest: {
|
|
59
|
+
question: 'Which requests do you observe or modify, and why can declarativeNetRequest not express it?',
|
|
60
|
+
example: 'We count requests per origin to render a live privacy meter; no request is modified or blocked.',
|
|
61
|
+
},
|
|
62
|
+
privacy: {
|
|
63
|
+
question: 'Which privacy settings do you change, and how is the user told?',
|
|
64
|
+
example: 'The onboarding screen offers to disable the network prediction setting and shows the current value.',
|
|
65
|
+
},
|
|
66
|
+
contentSettings: {
|
|
67
|
+
question: 'Which content setting do you change on which origins, and at whose request?',
|
|
68
|
+
example: 'The user adds a site to the allowlist and we enable JavaScript for that origin only.',
|
|
69
|
+
},
|
|
70
|
+
userScripts: {
|
|
71
|
+
question: 'Whose scripts run, where do they come from, and can the user read them first?',
|
|
72
|
+
example: 'Only scripts the user pastes into our editor run, on the origins they list, and the editor is the only source.',
|
|
73
|
+
},
|
|
74
|
+
pageCapture: {
|
|
75
|
+
question: 'What does the user do to capture a page, and where does the MHTML go?',
|
|
76
|
+
example: 'The user clicks Save page and the MHTML is written to their downloads folder unchanged.',
|
|
77
|
+
},
|
|
78
|
+
scripting: {
|
|
79
|
+
question: 'What do you inject, into which origins, and when?',
|
|
80
|
+
example: 'We inject the highlight overlay into the active tab after the user clicks the toolbar icon.',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Mirror of `JUSTIFICATION_CRITICAL_PERMISSIONS` in shared-types. Used only to
|
|
85
|
+
* order the checklist so the scariest prompt is answered first.
|
|
86
|
+
*/
|
|
87
|
+
export const JUSTIFICATION_CRITICAL_PERMISSIONS = [
|
|
88
|
+
'<all_urls>',
|
|
89
|
+
'debugger',
|
|
90
|
+
'management',
|
|
91
|
+
'nativeMessaging',
|
|
92
|
+
];
|
|
93
|
+
function promptFor(permission) {
|
|
94
|
+
return Object.hasOwn(PERMISSION_JUSTIFICATION_PROMPTS, permission)
|
|
95
|
+
? PERMISSION_JUSTIFICATION_PROMPTS[permission]
|
|
96
|
+
: undefined;
|
|
97
|
+
}
|
|
98
|
+
function stringEntries(raw) {
|
|
99
|
+
if (!Array.isArray(raw))
|
|
100
|
+
return [];
|
|
101
|
+
const out = [];
|
|
102
|
+
for (const p of raw) {
|
|
103
|
+
if (typeof p === 'string' && p.trim())
|
|
104
|
+
out.push(p.trim());
|
|
105
|
+
}
|
|
106
|
+
return out;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Sensitive permissions declared, including host patterns. Matches
|
|
110
|
+
* `justification_permissions` in `dags/.../permission_usage.py`: host
|
|
111
|
+
* permissions are out of scope for used/unused but in scope here —
|
|
112
|
+
* `<all_urls>` is the single most-questioned dashboard entry.
|
|
113
|
+
*/
|
|
114
|
+
export function justificationPermissions(manifest) {
|
|
115
|
+
const declared = [];
|
|
116
|
+
const seen = new Set();
|
|
117
|
+
for (const source of [manifest.permissions, manifest.host_permissions]) {
|
|
118
|
+
for (const permission of stringEntries(source)) {
|
|
119
|
+
if (seen.has(permission) || !promptFor(permission))
|
|
120
|
+
continue;
|
|
121
|
+
seen.add(permission);
|
|
122
|
+
declared.push(permission);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return declared;
|
|
126
|
+
}
|
|
127
|
+
/** Store-justification prompts for the sensitive permissions declared. */
|
|
128
|
+
export function buildJustificationChecklist(manifest) {
|
|
129
|
+
const out = [];
|
|
130
|
+
for (const permission of justificationPermissions(manifest)) {
|
|
131
|
+
const prompt = promptFor(permission);
|
|
132
|
+
if (!prompt)
|
|
133
|
+
continue;
|
|
134
|
+
out.push({
|
|
135
|
+
permission,
|
|
136
|
+
tier: JUSTIFICATION_CRITICAL_PERMISSIONS.includes(permission) ? 'CRITICAL' : 'HIGH',
|
|
137
|
+
question: prompt.question,
|
|
138
|
+
example: prompt.example,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
out.sort((a, b) => (a.tier === 'CRITICAL' ? 0 : 1) - (b.tier === 'CRITICAL' ? 0 : 1) ||
|
|
142
|
+
a.permission.localeCompare(b.permission));
|
|
143
|
+
return out;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=permission-justifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-justifications.js","sourceRoot":"","sources":["../src/permission-justifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,gCAAgC,GAA4D;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