Skip to content

Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.

Review Electron notices per release target

Giorgio Ughini60e345ba903a
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
index 45ddb6b..aa631ea 100644
--- a/THIRD-PARTY-NOTICES.md
+++ b/THIRD-PARTY-NOTICES.md
@@ -49,7 +49,8 @@ Those components remain under their own terms; the generated
codec library whose bundled notice identifies FFmpeg as **LGPL-2.1-or-later**.
GPL portions require an explicit non-default FFmpeg build configuration.
- Electron's `LICENSE.electron.txt` and `LICENSES.chromium.html` are retained in
- every packaged application.
+ every packaged application. Chromium's notice file differs per platform, so it
+ is reviewed separately for each release target.
- The currently pinned source is Electron
[`v43.1.1`](https://github.com/electron/electron/tree/v43.1.1), Chromium
[`150.0.7871.114`](https://chromium.googlesource.com/chromium/src/+/150.0.7871.114),
diff --git a/scripts/compliance.mjs b/scripts/compliance.mjs
index dc11769..f550711 100644
--- a/scripts/compliance.mjs
+++ b/scripts/compliance.mjs
@@ -757,8 +757,16 @@ export async function verifyComplianceDirectory(
}
for (const notice of electron.notices ?? []) {
const noticeName = path.posix.basename(notice.file);
- if (notice.sha256 !== policy.electron?.notices?.[noticeName]) {
- throw new Error(`Electron notice ${noticeName} does not match its reviewed SHA-256.`);
+ const reviewed = reviewedMaterialHash(
+ noticeName,
+ policy.electron?.notices?.[distributionKey],
+ `Electron ${distributionKey} notice`,
+ );
+ if (notice.sha256 !== reviewed) {
+ throw new Error(
+ `Electron notice ${noticeName} does not match its reviewed SHA-256 for ` +
+ `${distributionKey}.`,
+ );
}
await verifyManifestFile(directory, notice);
}
@@ -1463,6 +1471,13 @@ async function prepareElectronNotices({ outputDir, rootDir, policy, fetchImpl })
);
const archive = new AdmZip(cache);
+ const reviewedNotices = policy.electron.notices?.[distributionKey];
+ if (!reviewedNotices) {
+ throw new Error(
+ `Electron notices for ${distributionKey} have not been reviewed. Chromium's notice file ` +
+ "differs per platform, so add the entry to third_party/compliance-policy.json.",
+ );
+ }
const noticeDirectory = path.join(outputDir, "electron");
await mkdir(noticeDirectory, { recursive: true });
const notices = [];
@@ -1481,10 +1496,15 @@ async function prepareElectronNotices({ outputDir, rootDir, policy, fetchImpl })
const target = path.join(noticeDirectory, targetName);
await writeFile(target, content);
const sha256 = await sha256File(target);
- if (sha256 !== policy.electron.notices?.[targetName]) {
+ const reviewed = reviewedMaterialHash(
+ targetName,
+ reviewedNotices,
+ `Electron ${distributionKey} notice`,
+ );
+ if (sha256 !== reviewed) {
throw new Error(
`Electron distribution notice ${targetName} has SHA-256 ${sha256}, ` +
- `expected ${policy.electron.notices?.[targetName] ?? "(unreviewed)"}.`,
+ `expected ${reviewed} for ${distributionKey}.`,
);
}
notices.push({
diff --git a/scripts/compliance.test.mjs b/scripts/compliance.test.mjs
index c10f9cc..10d199a 100644
--- a/scripts/compliance.test.mjs
+++ b/scripts/compliance.test.mjs
@@ -489,7 +489,8 @@ test("exactly one architecture-matched native payload is packaged", async () =>
assert.equal(detectLinuxLibc({ getReport: () => ({ header: { glibcVersionRuntime: "2.39" } }) }), "glibc");
assert.equal(detectLinuxLibc({ getReport: () => ({ header: {} }) }), "musl");
- assert.equal(detectLinuxLibc(undefined), "musl");
+ assert.equal(detectLinuxLibc({ getReport: () => ({}) }), "musl");
+ assert.ok(["glibc", "musl"].includes(detectLinuxLibc()));
assert.deepEqual(Object.keys(nativePayloadCandidates).sort(), [
"darwin-arm64",
@@ -531,6 +532,25 @@ test("the lockfile resolves every dependency npm ci needs on other platforms", a
assert.throws(() => assertLockfileClosure({}), /must declare a packages map/);
});
+test("Electron notices are reviewed per release target", async () => {
+ const policy = JSON.parse(
+ await readFile(path.join(repoRoot, "third_party", "compliance-policy.json"), "utf8"),
+ );
+ // Chromium's notice file differs per platform, so a single reviewed hash would either
+ // fail macOS or wave through an unreviewed Windows notice.
+ assert.deepEqual(Object.keys(policy.electron.notices).sort(), [...releaseTargets].sort());
+ const chromium = new Set(
+ releaseTargets.map((target) => policy.electron.notices[target]["LICENSES.chromium.html"]),
+ );
+ assert.equal(chromium.size, 2, "Windows and macOS ship different Chromium notices");
+ for (const target of releaseTargets) {
+ assert.ok(policy.electron.distributions[target], `${target} needs a reviewed distribution`);
+ for (const notice of ["LICENSE.electron.txt", "LICENSES.chromium.html"]) {
+ assert.match(policy.electron.notices[target][notice], /^[a-f0-9]{64}$/);
+ }
+ }
+});
+
test("the WASM payload is excluded from every Electron artifact", () => {
assert.deepEqual(excludedWasmPackages, [
"@img/sharp-wasm32",
diff --git a/third_party/compliance-policy.json b/third_party/compliance-policy.json
index fbe72eb..f9798a7 100644
--- a/third_party/compliance-policy.json
+++ b/third_party/compliance-policy.json
@@ -14,8 +14,18 @@
"win32-x64": "b4e9995cd3f65785eb8818276aa9020f3165ab11da41b3c762616d4a0ad8c7ad"
},
"notices": {
- "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",
- "LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"
+ "win32-x64": {
+ "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",
+ "LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"
+ },
+ "win32-arm64": {
+ "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",
+ "LICENSES.chromium.html": "b911161e6594ec76b872498b423c54406168f2974e0d407a847f7de1e5ff94dd"
+ },
+ "darwin-arm64": {
+ "LICENSE.electron.txt": "5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d",
+ "LICENSES.chromium.html": "4fc0507a046b9ecd0738b2dd64119b5ec8bc29ac0221b63edb693fd5fd497c87"
+ }
}
},
"sharp": "0.35.3",