@extenshi/cli 0.21.0 → 0.23.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 +4 -0
- package/dist/amo-source-detect.d.ts +18 -0
- package/dist/amo-source-detect.d.ts.map +1 -0
- package/dist/amo-source-detect.js +41 -0
- package/dist/amo-source-detect.js.map +1 -0
- package/dist/amo-source.d.ts +41 -0
- package/dist/amo-source.d.ts.map +1 -0
- package/dist/amo-source.js +240 -0
- package/dist/amo-source.js.map +1 -0
- package/dist/amowebstore-md.d.ts +38 -0
- package/dist/amowebstore-md.d.ts.map +1 -0
- package/dist/amowebstore-md.js +118 -0
- package/dist/amowebstore-md.js.map +1 -0
- package/dist/auto-evidence.d.ts +154 -0
- package/dist/auto-evidence.d.ts.map +1 -0
- package/dist/auto-evidence.js +297 -0
- package/dist/auto-evidence.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +366 -11
- package/dist/cli.js.map +1 -1
- package/dist/domain.d.ts +40 -0
- package/dist/domain.d.ts.map +1 -0
- package/dist/domain.js +64 -0
- package/dist/domain.js.map +1 -0
- package/dist/edgewebstore-md.d.ts +26 -0
- package/dist/edgewebstore-md.d.ts.map +1 -0
- package/dist/edgewebstore-md.js +95 -0
- package/dist/edgewebstore-md.js.map +1 -0
- package/dist/evidence-ingest.d.ts +60 -0
- package/dist/evidence-ingest.d.ts.map +1 -0
- package/dist/evidence-ingest.js +141 -0
- package/dist/evidence-ingest.js.map +1 -0
- package/dist/extension-localization.d.ts +6 -1
- package/dist/extension-localization.d.ts.map +1 -1
- package/dist/extension-localization.js +4 -0
- package/dist/extension-localization.js.map +1 -1
- package/dist/firefox-rdp.d.ts +55 -0
- package/dist/firefox-rdp.d.ts.map +1 -0
- package/dist/firefox-rdp.js +203 -0
- package/dist/firefox-rdp.js.map +1 -0
- package/dist/gecko-id.d.ts +55 -0
- package/dist/gecko-id.d.ts.map +1 -0
- package/dist/gecko-id.js +132 -0
- package/dist/gecko-id.js.map +1 -0
- package/dist/generate-listing.d.ts +19 -8
- package/dist/generate-listing.d.ts.map +1 -1
- package/dist/generate-listing.js +66 -18
- package/dist/generate-listing.js.map +1 -1
- package/dist/icon.d.ts +18 -0
- package/dist/icon.d.ts.map +1 -1
- package/dist/icon.js +29 -20
- package/dist/icon.js.map +1 -1
- package/dist/landing-page.d.ts +22 -4
- package/dist/landing-page.d.ts.map +1 -1
- package/dist/landing-page.js +14 -11
- package/dist/landing-page.js.map +1 -1
- package/dist/landing-sections.d.ts +332 -0
- package/dist/landing-sections.d.ts.map +1 -0
- package/dist/landing-sections.js +1071 -0
- package/dist/landing-sections.js.map +1 -0
- package/dist/listing.d.ts +15 -0
- package/dist/listing.d.ts.map +1 -1
- package/dist/listing.js +1 -1
- package/dist/listing.js.map +1 -1
- package/dist/media.d.ts +42 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +96 -0
- package/dist/media.js.map +1 -0
- package/dist/package.d.ts +163 -0
- package/dist/package.d.ts.map +1 -0
- package/dist/package.js +500 -0
- package/dist/package.js.map +1 -0
- package/dist/page.d.ts +110 -21
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +240 -10
- package/dist/page.js.map +1 -1
- package/dist/pay-contract.d.ts +42 -11
- package/dist/pay-contract.d.ts.map +1 -1
- package/dist/pay-contract.js +31 -0
- package/dist/pay-contract.js.map +1 -1
- package/dist/pay-test-cycle.d.ts +40 -0
- package/dist/pay-test-cycle.d.ts.map +1 -0
- package/dist/pay-test-cycle.js +207 -0
- package/dist/pay-test-cycle.js.map +1 -0
- package/dist/pay.d.ts +1 -1
- package/dist/pay.d.ts.map +1 -1
- package/dist/pay.js +1 -0
- package/dist/pay.js.map +1 -1
- package/dist/project.d.ts +69 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +363 -54
- package/dist/project.js.map +1 -1
- package/dist/publish.d.ts +33 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +113 -2
- package/dist/publish.js.map +1 -1
- package/dist/review-checks.d.ts +13 -0
- package/dist/review-checks.d.ts.map +1 -1
- package/dist/review-checks.js.map +1 -1
- package/dist/review-risk.d.ts +10 -1
- package/dist/review-risk.d.ts.map +1 -1
- package/dist/review-risk.js +1 -0
- package/dist/review-risk.js.map +1 -1
- package/dist/scan.d.ts +3 -2
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +4 -2
- package/dist/scan.js.map +1 -1
- package/dist/screenshots-scenes.d.ts +1383 -0
- package/dist/screenshots-scenes.d.ts.map +1 -0
- package/dist/screenshots-scenes.js +276 -0
- package/dist/screenshots-scenes.js.map +1 -0
- package/dist/screenshots.d.ts +143 -0
- package/dist/screenshots.d.ts.map +1 -0
- package/dist/screenshots.js +558 -0
- package/dist/screenshots.js.map +1 -0
- package/dist/smoke.d.ts +81 -0
- package/dist/smoke.d.ts.map +1 -0
- package/dist/smoke.js +491 -0
- package/dist/smoke.js.map +1 -0
- package/dist/store-assets.d.ts +139 -0
- package/dist/store-assets.d.ts.map +1 -0
- package/dist/store-assets.js +582 -0
- package/dist/store-assets.js.map +1 -0
- package/dist/zip.d.ts +57 -0
- package/dist/zip.d.ts.map +1 -0
- package/dist/zip.js +134 -0
- package/dist/zip.js.map +1 -0
- package/package.json +7 -6
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--evidence` on `scan`, `review-risk`, `generate-listing`, `test smoke` and
|
|
3
|
+
* `screenshots`: turn the result the command just computed into the readiness
|
|
4
|
+
* evidence kind it attests, with the digests `releaseReadiness` matches against,
|
|
5
|
+
* and record it for the project bound in this directory — through the same client
|
|
6
|
+
* path as `extenshi evidence push` (project.ts → recordAgentEvidence).
|
|
7
|
+
*
|
|
8
|
+
* The digests are the contract (shared-types/project-workspace.ts
|
|
9
|
+
* `releaseReadiness`):
|
|
10
|
+
*
|
|
11
|
+
* kind artifactDigest inputDigest locale
|
|
12
|
+
* scan sha256(zip) sha256(zip) —
|
|
13
|
+
* installed sha256(zip) sha256(zip) —
|
|
14
|
+
* permissions sha256(zip) hashMetadata(packaged manifest) —
|
|
15
|
+
* listing sha256(zip) sha256(listing file bytes) each locale
|
|
16
|
+
* screenshots sha256(zip) sha256(listing file bytes) each shot locale
|
|
17
|
+
*
|
|
18
|
+
* `hashMetadata(manifest)` is what `release prepare` stores as manifestDigest,
|
|
19
|
+
* and `sha256(listing file)` is what `release prepare --listing <file>` stores as
|
|
20
|
+
* listingDigest — so evidence recorded here is current exactly when the release
|
|
21
|
+
* binds the same package and the same listing file.
|
|
22
|
+
*
|
|
23
|
+
* Status rules (documented in the CLI docs):
|
|
24
|
+
* scan failed on a REJECTION_LIKELY store-compliance finding or any
|
|
25
|
+
* CRITICAL security finding — the report's own "fail" verdict.
|
|
26
|
+
* permissions failed on a REJECTED review-risk finding outside the listing rules.
|
|
27
|
+
* listing failed only on a REJECTED listing-rule finding for that locale —
|
|
28
|
+
* exactly what would make `review-risk` exit non-zero. Listing rules
|
|
29
|
+
* are ADVISORY by roadmap policy (iteration 2 T9: the v3 dictionary
|
|
30
|
+
* measured a 78.7% false-positive rate) and never fail review-risk,
|
|
31
|
+
* so failing readiness on them would block releases on false
|
|
32
|
+
* positives. An advisory finding leaves the check `passed`.
|
|
33
|
+
* installed the smoke result.
|
|
34
|
+
* screenshots failed when the store's set for that locale is empty or over the
|
|
35
|
+
* store's limit (Chrome 5, Edge 6) — it cannot be submitted as shot.
|
|
36
|
+
* A locale the run cannot verify stops the run, so nothing is recorded.
|
|
37
|
+
*
|
|
38
|
+
* `screenshots` records carry their PNGs as attachments (private storage, the
|
|
39
|
+
* `evidence push --attach` upload path) — see recordScreenshotsEvidence.
|
|
40
|
+
*
|
|
41
|
+
* `permissions` and `listing` carry a `summary` (finding count, blocking count,
|
|
42
|
+
* distinct check ids) so the advisories behind a `passed` stay visible to
|
|
43
|
+
* whoever reads the record. It is sent only to a server that advertises it
|
|
44
|
+
* (project.ts → recordAgentEvidence).
|
|
45
|
+
*/
|
|
46
|
+
import { type Listing } from './listing.js';
|
|
47
|
+
import type { EvidenceRecord } from './project.js';
|
|
48
|
+
import { type ReviewFinding } from './review-checks.js';
|
|
49
|
+
import type { ScreenshotFile, ScreenshotsResult } from './screenshots.js';
|
|
50
|
+
import type { SmokeResult } from './smoke.js';
|
|
51
|
+
export type EvidenceBrowser = 'chrome' | 'edge' | 'firefox';
|
|
52
|
+
export declare const sha256Hex: (bytes: Uint8Array | string) => string;
|
|
53
|
+
/**
|
|
54
|
+
* `--evidence` is checked BEFORE the work it attests: a paid scan that cannot
|
|
55
|
+
* record its evidence afterwards would spend a credit for nothing.
|
|
56
|
+
*/
|
|
57
|
+
export declare function assertEvidenceBinding(cwd?: string): void;
|
|
58
|
+
/** Evidence binds to the exact package bytes, so it needs a package file, not an unpacked folder. */
|
|
59
|
+
export declare function evidenceArtifact(artifact: string): Promise<{
|
|
60
|
+
bytes: Buffer;
|
|
61
|
+
digest: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Which store(s) the evidence is for: the explicit list, else the browsers
|
|
65
|
+
* `extenshi package` recorded for these exact bytes (Chrome and Edge built from
|
|
66
|
+
* one directory are the same zip), else refuse — mislabelled evidence would
|
|
67
|
+
* satisfy the wrong release.
|
|
68
|
+
*/
|
|
69
|
+
export declare function evidenceBrowsers(artifactPath: string, artifactDigest: string, explicit?: string): EvidenceBrowser[];
|
|
70
|
+
export declare function scanEvidence(input: {
|
|
71
|
+
artifactDigest: string;
|
|
72
|
+
browsers: EvidenceBrowser[];
|
|
73
|
+
body: Record<string, unknown>;
|
|
74
|
+
}): EvidenceRecord[];
|
|
75
|
+
export declare function smokeEvidence(input: {
|
|
76
|
+
browser: EvidenceBrowser;
|
|
77
|
+
result: SmokeResult;
|
|
78
|
+
}): EvidenceRecord[];
|
|
79
|
+
type EvidenceSummary = NonNullable<EvidenceRecord['summary']>;
|
|
80
|
+
/** Counts and distinct check ids — never finding text, which can quote listing copy or code. */
|
|
81
|
+
export declare function findingSummary(findings: readonly ReviewFinding[]): EvidenceSummary;
|
|
82
|
+
export declare function permissionsEvidence(input: {
|
|
83
|
+
artifactDigest: string;
|
|
84
|
+
manifest: unknown;
|
|
85
|
+
browsers: EvidenceBrowser[];
|
|
86
|
+
findings: readonly ReviewFinding[];
|
|
87
|
+
listingCheckIds: ReadonlySet<string>;
|
|
88
|
+
}): EvidenceRecord[];
|
|
89
|
+
/** Listing findings carry `[locale] field…` evidence; one without a locale applies to every locale. */
|
|
90
|
+
export declare function findingLocale(finding: ReviewFinding): string | null;
|
|
91
|
+
export declare function listingEvidence(input: {
|
|
92
|
+
artifactDigest: string;
|
|
93
|
+
listingBytes: Uint8Array | string;
|
|
94
|
+
listing: Listing | null;
|
|
95
|
+
browsers: EvidenceBrowser[];
|
|
96
|
+
/** Output of runListingOnlyChecks for the same listing. */
|
|
97
|
+
listingFindings: readonly ReviewFinding[];
|
|
98
|
+
}): EvidenceRecord[];
|
|
99
|
+
/**
|
|
100
|
+
* `generate-listing --evidence`: read the draft the command just wrote
|
|
101
|
+
* (CHROMEWEBSTORE.md, EDGE.md or AMO.md — one parser, keyed on headings) back
|
|
102
|
+
* over the package, run the listing rules on it and bind the evidence to that
|
|
103
|
+
* file's bytes. `browsers` is the store the draft is for.
|
|
104
|
+
*/
|
|
105
|
+
export declare function generatedListingEvidence(input: {
|
|
106
|
+
artifactBytes: Buffer;
|
|
107
|
+
artifactDigest: string;
|
|
108
|
+
draftPath: string;
|
|
109
|
+
browsers: EvidenceBrowser[];
|
|
110
|
+
}): Promise<EvidenceRecord[]>;
|
|
111
|
+
/**
|
|
112
|
+
* What `screenshots --evidence` needs, settled before Chromium starts: the bound
|
|
113
|
+
* project, the exact zip (it is also what gets shot), the listing revision the
|
|
114
|
+
* shots illustrate, and the stores the evidence is for — each one a store this
|
|
115
|
+
* run shoots, since `<out>/<store>/<locale>/` is that store's own set.
|
|
116
|
+
*/
|
|
117
|
+
export declare function screenshotsEvidencePlan(input: {
|
|
118
|
+
extension: string;
|
|
119
|
+
listing?: string;
|
|
120
|
+
store?: string;
|
|
121
|
+
evidenceBrowser?: string;
|
|
122
|
+
}): Promise<{
|
|
123
|
+
artifactDigest: string;
|
|
124
|
+
listingBytes: Buffer;
|
|
125
|
+
browsers: EvidenceBrowser[];
|
|
126
|
+
}>;
|
|
127
|
+
/** One `screenshots` record per store and shot locale (status rules: file header). */
|
|
128
|
+
export declare function screenshotsEvidence(input: {
|
|
129
|
+
artifactDigest: string;
|
|
130
|
+
listingBytes: Uint8Array | string;
|
|
131
|
+
browsers: EvidenceBrowser[];
|
|
132
|
+
result: Pick<ScreenshotsResult, 'files' | 'locales'>;
|
|
133
|
+
}): EvidenceRecord[];
|
|
134
|
+
/**
|
|
135
|
+
* `screenshots --evidence`: record each record with its store's PNGs for that
|
|
136
|
+
* locale attached (project.ts → uploadEvidenceAttachment, the same upload path
|
|
137
|
+
* as `evidence push --attach`).
|
|
138
|
+
*
|
|
139
|
+
* Every file passes the local checks — type, 10 MB each, at most
|
|
140
|
+
* EVIDENCE_ATTACHMENTS_MAX per record, and bytes still matching the sha256 the
|
|
141
|
+
* run wrote to screenshots.json — before the first upload. Then one locale at a
|
|
142
|
+
* time: upload, record. The server caps uploads no record references yet (100
|
|
143
|
+
* per project), so uploading every locale ahead of a single record call would
|
|
144
|
+
* fail a large run midway; a locale is at most 12 scenes × 2 sizes.
|
|
145
|
+
*/
|
|
146
|
+
export declare function recordScreenshotsEvidence(records: EvidenceRecord[], files: readonly ScreenshotFile[], cwd?: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Record the batch for the bound project and say so on stderr (stdout stays the
|
|
149
|
+
* command's own output, e.g. --json). A queued (offline) record sets exit code 1
|
|
150
|
+
* like `evidence push`; any other failure throws — the caller asked for evidence.
|
|
151
|
+
*/
|
|
152
|
+
export declare function recordAutoEvidence(records: EvidenceRecord[], cwd?: string): Promise<void>;
|
|
153
|
+
export {};
|
|
154
|
+
//# sourceMappingURL=auto-ev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,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,OAAO,CAAC;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC,CAmBzF;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAC1C,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,UAAU,GAAG,MAAM,CAAA;IACjC,QAAQ,EAAE,eAAe,EAAE,CAAA;IAC3B,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC,CAAA;CACpD,GAAG,cAAc,EAAE,CAgBnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC9C,OAAO,EAAE,cAAc,EAAE,EACzB,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,GAAG,SAAgB,GACjB,OAAO,CAAC,IAAI,CAAC,CA4Bf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,GAAG,SAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBtG"}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--evidence` on `scan`, `review-risk`, `generate-listing`, `test smoke` and
|
|
3
|
+
* `screenshots`: turn the result the command just computed into the readiness
|
|
4
|
+
* evidence kind it attests, with the digests `releaseReadiness` matches against,
|
|
5
|
+
* and record it for the project bound in this directory — through the same client
|
|
6
|
+
* path as `extenshi evidence push` (project.ts → recordAgentEvidence).
|
|
7
|
+
*
|
|
8
|
+
* The digests are the contract (shared-types/project-workspace.ts
|
|
9
|
+
* `releaseReadiness`):
|
|
10
|
+
*
|
|
11
|
+
* kind artifactDigest inputDigest locale
|
|
12
|
+
* scan sha256(zip) sha256(zip) —
|
|
13
|
+
* installed sha256(zip) sha256(zip) —
|
|
14
|
+
* permissions sha256(zip) hashMetadata(packaged manifest) —
|
|
15
|
+
* listing sha256(zip) sha256(listing file bytes) each locale
|
|
16
|
+
* screenshots sha256(zip) sha256(listing file bytes) each shot locale
|
|
17
|
+
*
|
|
18
|
+
* `hashMetadata(manifest)` is what `release prepare` stores as manifestDigest,
|
|
19
|
+
* and `sha256(listing file)` is what `release prepare --listing <file>` stores as
|
|
20
|
+
* listingDigest — so evidence recorded here is current exactly when the release
|
|
21
|
+
* binds the same package and the same listing file.
|
|
22
|
+
*
|
|
23
|
+
* Status rules (documented in the CLI docs):
|
|
24
|
+
* scan failed on a REJECTION_LIKELY store-compliance finding or any
|
|
25
|
+
* CRITICAL security finding — the report's own "fail" verdict.
|
|
26
|
+
* permissions failed on a REJECTED review-risk finding outside the listing rules.
|
|
27
|
+
* listing failed only on a REJECTED listing-rule finding for that locale —
|
|
28
|
+
* exactly what would make `review-risk` exit non-zero. Listing rules
|
|
29
|
+
* are ADVISORY by roadmap policy (iteration 2 T9: the v3 dictionary
|
|
30
|
+
* measured a 78.7% false-positive rate) and never fail review-risk,
|
|
31
|
+
* so failing readiness on them would block releases on false
|
|
32
|
+
* positives. An advisory finding leaves the check `passed`.
|
|
33
|
+
* installed the smoke result.
|
|
34
|
+
* screenshots failed when the store's set for that locale is empty or over the
|
|
35
|
+
* store's limit (Chrome 5, Edge 6) — it cannot be submitted as shot.
|
|
36
|
+
* A locale the run cannot verify stops the run, so nothing is recorded.
|
|
37
|
+
*
|
|
38
|
+
* `screenshots` records carry their PNGs as attachments (private storage, the
|
|
39
|
+
* `evidence push --attach` upload path) — see recordScreenshotsEvidence.
|
|
40
|
+
*
|
|
41
|
+
* `permissions` and `listing` carry a `summary` (finding count, blocking count,
|
|
42
|
+
* distinct check ids) so the advisories behind a `passed` stay visible to
|
|
43
|
+
* whoever reads the record. It is sent only to a server that advertises it
|
|
44
|
+
* (project.ts → recordAgentEvidence).
|
|
45
|
+
*/
|
|
46
|
+
import { createHash } from 'node:crypto';
|
|
47
|
+
import fs from 'node:fs';
|
|
48
|
+
import { readFile } from 'node:fs/promises';
|
|
49
|
+
import path from 'node:path';
|
|
50
|
+
import { EVIDENCE_ATTACHMENTS_MAX, hashMetadata } from '@extenshi/contracts';
|
|
51
|
+
import { InvalidInputError } from './expected-error.js';
|
|
52
|
+
import { assembleListing } from './listing.js';
|
|
53
|
+
import { packagedBrowsersFor } from './package.js';
|
|
54
|
+
import { summarizeCompliance, summarizeReport } from './render.js';
|
|
55
|
+
import { computeVerdict } from './report.js';
|
|
56
|
+
import { loadArtifact } from './review-archive.js';
|
|
57
|
+
import { runListingOnlyChecks } from './review-checks.js';
|
|
58
|
+
import { parseStores, STORE_SCREENSHOT_SPECS } from './store-assets.js';
|
|
59
|
+
const BROWSERS = ['chrome', 'edge', 'firefox'];
|
|
60
|
+
export const sha256Hex = (bytes) => createHash('sha256').update(bytes).digest('hex');
|
|
61
|
+
/**
|
|
62
|
+
* `--evidence` is checked BEFORE the work it attests: a paid scan that cannot
|
|
63
|
+
* record its evidence afterwards would spend a credit for nothing.
|
|
64
|
+
*/
|
|
65
|
+
export function assertEvidenceBinding(cwd = process.cwd()) {
|
|
66
|
+
if (!fs.existsSync(path.join(cwd, '.extenshi/project.json')))
|
|
67
|
+
throw new InvalidInputError('--evidence records against the project bound in this directory. Run extenshi project bind --project <id> --repo <owner/repo> first.');
|
|
68
|
+
}
|
|
69
|
+
/** Evidence binds to the exact package bytes, so it needs a package file, not an unpacked folder. */
|
|
70
|
+
export async function evidenceArtifact(artifact) {
|
|
71
|
+
if (!fs.existsSync(artifact) || !fs.statSync(artifact).isFile())
|
|
72
|
+
throw new InvalidInputError('--evidence binds to the exact package: pass the zip (e.g. from extenshi package), not an unpacked folder.');
|
|
73
|
+
const bytes = await readFile(artifact);
|
|
74
|
+
return { bytes, digest: sha256Hex(bytes) };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Which store(s) the evidence is for: the explicit list, else the browsers
|
|
78
|
+
* `extenshi package` recorded for these exact bytes (Chrome and Edge built from
|
|
79
|
+
* one directory are the same zip), else refuse — mislabelled evidence would
|
|
80
|
+
* satisfy the wrong release.
|
|
81
|
+
*/
|
|
82
|
+
export function evidenceBrowsers(artifactPath, artifactDigest, explicit) {
|
|
83
|
+
if (explicit) {
|
|
84
|
+
const list = explicit
|
|
85
|
+
.split(',')
|
|
86
|
+
.map((s) => s.trim().toLowerCase())
|
|
87
|
+
.filter(Boolean);
|
|
88
|
+
const bad = list.filter((s) => !BROWSERS.includes(s));
|
|
89
|
+
if (bad.length || !list.length)
|
|
90
|
+
throw new InvalidInputError(`--evidence-browser takes a comma-separated list of: ${BROWSERS.join(', ')}`);
|
|
91
|
+
return [...new Set(list)];
|
|
92
|
+
}
|
|
93
|
+
const packaged = packagedBrowsersFor(artifactPath, artifactDigest);
|
|
94
|
+
if (packaged.length)
|
|
95
|
+
return packaged;
|
|
96
|
+
throw new InvalidInputError('--evidence needs to know which store this package is for. Pass --evidence-browser chrome|edge|firefox, ' +
|
|
97
|
+
'or run it on a zip from `extenshi package`, whose extenshi-packages.json records the browser.');
|
|
98
|
+
}
|
|
99
|
+
export function scanEvidence(input) {
|
|
100
|
+
const verdict = computeVerdict(summarizeCompliance(input.body), summarizeReport(input.body));
|
|
101
|
+
const critical = summarizeReport(input.body).findings.some((f) => f.severity === 'CRITICAL');
|
|
102
|
+
const status = verdict.level === 'fail' || critical ? 'failed' : 'passed';
|
|
103
|
+
return input.browsers.map((browser) => ({
|
|
104
|
+
kind: 'scan',
|
|
105
|
+
browser,
|
|
106
|
+
artifactDigest: input.artifactDigest,
|
|
107
|
+
inputDigest: input.artifactDigest,
|
|
108
|
+
status,
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
export function smokeEvidence(input) {
|
|
112
|
+
return [
|
|
113
|
+
{
|
|
114
|
+
kind: 'installed',
|
|
115
|
+
browser: input.browser,
|
|
116
|
+
artifactDigest: input.result.sha256,
|
|
117
|
+
inputDigest: input.result.sha256,
|
|
118
|
+
status: input.result.status,
|
|
119
|
+
},
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Mirrors EVIDENCE_SUMMARY_MAX_IDS in the contract. Not imported: an installed
|
|
124
|
+
* @extenshi/contracts that predates the summary has no such export, and a
|
|
125
|
+
* missing named ESM import would stop the whole CLI from loading.
|
|
126
|
+
*/
|
|
127
|
+
const SUMMARY_MAX_IDS = 50;
|
|
128
|
+
/** Counts and distinct check ids — never finding text, which can quote listing copy or code. */
|
|
129
|
+
export function findingSummary(findings) {
|
|
130
|
+
return {
|
|
131
|
+
findingCount: findings.length,
|
|
132
|
+
blockingCount: findings.filter(isBlocking).length,
|
|
133
|
+
findingIds: [...new Set(findings.map((f) => f.check))].sort().slice(0, SUMMARY_MAX_IDS),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** What makes `review-risk` exit non-zero (summarize → `blocking`). */
|
|
137
|
+
const isBlocking = (f) => f.verdict === 'REJECTED';
|
|
138
|
+
export function permissionsEvidence(input) {
|
|
139
|
+
const own = input.findings.filter((f) => !input.listingCheckIds.has(f.check));
|
|
140
|
+
const summary = findingSummary(own);
|
|
141
|
+
const inputDigest = hashMetadata(input.manifest);
|
|
142
|
+
return input.browsers.map((browser) => ({
|
|
143
|
+
kind: 'permissions',
|
|
144
|
+
browser,
|
|
145
|
+
artifactDigest: input.artifactDigest,
|
|
146
|
+
inputDigest,
|
|
147
|
+
status: summary.blockingCount ? 'failed' : 'passed',
|
|
148
|
+
summary,
|
|
149
|
+
}));
|
|
150
|
+
}
|
|
151
|
+
/** Listing findings carry `[locale] field…` evidence; one without a locale applies to every locale. */
|
|
152
|
+
export function findingLocale(finding) {
|
|
153
|
+
return /^\[([^\]\s]+)\]/.exec(finding.evidence ?? '')?.[1] ?? null;
|
|
154
|
+
}
|
|
155
|
+
export function listingEvidence(input) {
|
|
156
|
+
const locales = input.listing?.locales.map((l) => l.locale) ?? [];
|
|
157
|
+
if (!locales.length)
|
|
158
|
+
throw new InvalidInputError('The listing has no locale with text, so there is nothing to attest.');
|
|
159
|
+
const inputDigest = sha256Hex(input.listingBytes);
|
|
160
|
+
return input.browsers.flatMap((browser) => locales.map((locale) => {
|
|
161
|
+
const hits = input.listingFindings.filter((f) => {
|
|
162
|
+
const at = findingLocale(f);
|
|
163
|
+
return at === null || at === locale;
|
|
164
|
+
});
|
|
165
|
+
const summary = findingSummary(hits);
|
|
166
|
+
return {
|
|
167
|
+
kind: 'listing',
|
|
168
|
+
browser,
|
|
169
|
+
locale,
|
|
170
|
+
artifactDigest: input.artifactDigest,
|
|
171
|
+
inputDigest,
|
|
172
|
+
// Advisory findings are carried in the summary, never in the status.
|
|
173
|
+
status: summary.blockingCount ? 'failed' : 'passed',
|
|
174
|
+
summary,
|
|
175
|
+
};
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* `generate-listing --evidence`: read the draft the command just wrote
|
|
180
|
+
* (CHROMEWEBSTORE.md, EDGE.md or AMO.md — one parser, keyed on headings) back
|
|
181
|
+
* over the package, run the listing rules on it and bind the evidence to that
|
|
182
|
+
* file's bytes. `browsers` is the store the draft is for.
|
|
183
|
+
*/
|
|
184
|
+
export async function generatedListingEvidence(input) {
|
|
185
|
+
const { manifest, files } = await loadArtifact(input.artifactBytes);
|
|
186
|
+
const listing = assembleListing(manifest, files, input.draftPath);
|
|
187
|
+
return listingEvidence({
|
|
188
|
+
artifactDigest: input.artifactDigest,
|
|
189
|
+
listingBytes: fs.readFileSync(input.draftPath),
|
|
190
|
+
listing,
|
|
191
|
+
browsers: input.browsers,
|
|
192
|
+
listingFindings: runListingOnlyChecks(listing),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* What `screenshots --evidence` needs, settled before Chromium starts: the bound
|
|
197
|
+
* project, the exact zip (it is also what gets shot), the listing revision the
|
|
198
|
+
* shots illustrate, and the stores the evidence is for — each one a store this
|
|
199
|
+
* run shoots, since `<out>/<store>/<locale>/` is that store's own set.
|
|
200
|
+
*/
|
|
201
|
+
export async function screenshotsEvidencePlan(input) {
|
|
202
|
+
assertEvidenceBinding();
|
|
203
|
+
const { digest } = await evidenceArtifact(input.extension);
|
|
204
|
+
const listing = input.listing;
|
|
205
|
+
if (!listing)
|
|
206
|
+
throw new InvalidInputError('--evidence binds screenshots to the listing they illustrate: pass --listing <file>, the file you give release prepare --listing.');
|
|
207
|
+
const listingBytes = await readFile(listing).catch(() => {
|
|
208
|
+
throw new InvalidInputError(`Listing file not found: ${listing}`);
|
|
209
|
+
});
|
|
210
|
+
const browsers = evidenceBrowsers(input.extension, digest, input.evidenceBrowser ?? input.store);
|
|
211
|
+
const shot = parseStores(input.store);
|
|
212
|
+
const unshot = browsers.filter((b) => !shot.includes(b));
|
|
213
|
+
if (unshot.length)
|
|
214
|
+
throw new InvalidInputError(`--evidence-browser ${unshot.join(',')}: this run shoots only ${shot.join(',')} (--store), and screenshots evidence is that store's own set.`);
|
|
215
|
+
return { artifactDigest: digest, listingBytes, browsers };
|
|
216
|
+
}
|
|
217
|
+
/** One `screenshots` record per store and shot locale (status rules: file header). */
|
|
218
|
+
export function screenshotsEvidence(input) {
|
|
219
|
+
const inputDigest = sha256Hex(input.listingBytes);
|
|
220
|
+
return input.browsers.flatMap((browser) => input.result.locales.map(({ locale }) => {
|
|
221
|
+
const count = input.result.files.filter((f) => f.store === browser && f.locale === locale).length;
|
|
222
|
+
const max = STORE_SCREENSHOT_SPECS[browser].max;
|
|
223
|
+
return {
|
|
224
|
+
kind: 'screenshots',
|
|
225
|
+
browser,
|
|
226
|
+
locale,
|
|
227
|
+
artifactDigest: input.artifactDigest,
|
|
228
|
+
inputDigest,
|
|
229
|
+
status: count && (max === null || count <= max) ? 'passed' : 'failed',
|
|
230
|
+
};
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* `screenshots --evidence`: record each record with its store's PNGs for that
|
|
235
|
+
* locale attached (project.ts → uploadEvidenceAttachment, the same upload path
|
|
236
|
+
* as `evidence push --attach`).
|
|
237
|
+
*
|
|
238
|
+
* Every file passes the local checks — type, 10 MB each, at most
|
|
239
|
+
* EVIDENCE_ATTACHMENTS_MAX per record, and bytes still matching the sha256 the
|
|
240
|
+
* run wrote to screenshots.json — before the first upload. Then one locale at a
|
|
241
|
+
* time: upload, record. The server caps uploads no record references yet (100
|
|
242
|
+
* per project), so uploading every locale ahead of a single record call would
|
|
243
|
+
* fail a large run midway; a locale is at most 12 scenes × 2 sizes.
|
|
244
|
+
*/
|
|
245
|
+
export async function recordScreenshotsEvidence(records, files, cwd = process.cwd()) {
|
|
246
|
+
const { prepareEvidenceAttachment } = await import('./project.js');
|
|
247
|
+
const prepared = new Map();
|
|
248
|
+
const attached = [];
|
|
249
|
+
for (const record of records) {
|
|
250
|
+
const own = files.filter((f) => f.store === record.browser && f.locale === record.locale);
|
|
251
|
+
if (own.length > EVIDENCE_ATTACHMENTS_MAX)
|
|
252
|
+
throw new InvalidInputError(`${record.browser}/${record.locale} has ${own.length} screenshots; an evidence record carries at most ${EVIDENCE_ATTACHMENTS_MAX}.`);
|
|
253
|
+
const attach = [];
|
|
254
|
+
for (const file of own) {
|
|
255
|
+
let ready = prepared.get(file.path);
|
|
256
|
+
if (!ready) {
|
|
257
|
+
ready = await prepareEvidenceAttachment(file.path);
|
|
258
|
+
if (ready.sha256 !== file.sha256)
|
|
259
|
+
throw new InvalidInputError(`${file.path} changed after it was shot; rerun extenshi screenshots.`);
|
|
260
|
+
prepared.set(file.path, ready);
|
|
261
|
+
}
|
|
262
|
+
attach.push(ready);
|
|
263
|
+
}
|
|
264
|
+
attached.push(attach.length ? { ...record, attach } : record);
|
|
265
|
+
}
|
|
266
|
+
for (const locale of [...new Set(attached.map((r) => r.locale))])
|
|
267
|
+
await recordAutoEvidence(attached.filter((r) => r.locale === locale), cwd);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Record the batch for the bound project and say so on stderr (stdout stays the
|
|
271
|
+
* command's own output, e.g. --json). A queued (offline) record sets exit code 1
|
|
272
|
+
* like `evidence push`; any other failure throws — the caller asked for evidence.
|
|
273
|
+
*/
|
|
274
|
+
export async function recordAutoEvidence(records, cwd = process.cwd()) {
|
|
275
|
+
if (!records.length)
|
|
276
|
+
return;
|
|
277
|
+
const { recordAgentEvidence } = await import('./project.js');
|
|
278
|
+
const result = await recordAgentEvidence(cwd, records);
|
|
279
|
+
const summary = records
|
|
280
|
+
.map((r) => {
|
|
281
|
+
const advisories = r.summary ? r.summary.findingCount - r.summary.blockingCount : 0;
|
|
282
|
+
const note = advisories ? ` (${advisories} advisory: ${r.summary?.findingIds.join(' ')})` : '';
|
|
283
|
+
const files = r.attach?.length ? ` +${r.attach.length} file(s)` : '';
|
|
284
|
+
return `${r.kind}${r.locale ? `:${r.locale}` : ''}/${r.browser}=${r.status}${note}${files}`;
|
|
285
|
+
})
|
|
286
|
+
.join(', ');
|
|
287
|
+
if (!result.summaries && records.some((r) => r.summary))
|
|
288
|
+
process.stderr.write('note: this server does not store evidence summaries yet — the advisory findings above are shown here only\n');
|
|
289
|
+
if (result.status === 'pending-sync') {
|
|
290
|
+
process.stderr.write(`evidence queued (offline) for project ${result.projectId}: ${summary}. Run extenshi project sync.\n`);
|
|
291
|
+
process.exitCode = 1;
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
process.stderr.write(`evidence recorded for project ${result.projectId}: ${summary}\n`);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
//# sourceMappingURL=auto-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-evidence.js","sourceRoot":"","sources":["../src/auto-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CA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AAC,OAAO,CAAC;QACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,6GAA6G,CAC7G,CAAA;IACF,IAAI,MAAM,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;QACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CACnB,yCAAyC,MAAM,CAAC,SAAS,KAAK,OAAO,gCAAgC,CACrG,CAAA;QACD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;IACrB,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,MAAM,CAAC,SAAS,KAAK,OAAO,IAAI,CAAC,CAAA;IACxF,CAAC;AACF,CAAC"}
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|