@rightkit/release 0.2.55 → 0.2.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/release",
3
- "version": "0.2.55",
3
+ "version": "0.2.56",
4
4
  "description": "Portable Right Suite release CLI/SDK: signed installers, updater artifacts, patch/update routing, hardening, R2 publish, and RightApps registration.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,6 +4,7 @@ import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { spawnSync } from "node:child_process";
6
6
  import { fileURLToPath } from "node:url";
7
+ import vm from "node:vm";
7
8
  import test from "node:test";
8
9
 
9
10
  const root = path.dirname(fileURLToPath(import.meta.url));
@@ -70,6 +71,36 @@ test("Windows upload trust verification uses signtool instead of PowerShell modu
70
71
  assert.match(signingSource, /\["verify", "\/pa", "\/v", file\]/);
71
72
  });
72
73
 
74
+ test("Windows signer verification accepts CRLF subjects and retains identity checks", () => {
75
+ const source = readFileSync(signWindows, "utf8");
76
+ const functionSource = source.slice(source.indexOf("function assertVerification"), source.indexOf("\nfunction fileEvidence"));
77
+ const assertVerification = vm.runInNewContext(`(${functionSource})`, {
78
+ fail(message) { throw new Error(message); },
79
+ });
80
+ const valid = "Successfully verified\r\n\tIssued to: Damned Ventures LLC \r\nTimestamp: present\r\n";
81
+ assert.equal(JSON.stringify(assertVerification("fixture.exe", valid)), JSON.stringify({
82
+ authenticode: "Valid",
83
+ subject: "CN=Damned Ventures LLC",
84
+ timestampPresent: true,
85
+ }));
86
+ assert.throws(
87
+ () => assertVerification("fixture.exe", valid.replace("Damned Ventures LLC", "Other Company")),
88
+ /subject must be Damned Ventures LLC/,
89
+ );
90
+ assert.throws(
91
+ () => assertVerification("fixture.exe", valid.replace("Damned Ventures LLC", "damned ventures llc")),
92
+ /subject must be Damned Ventures LLC/,
93
+ );
94
+ assert.throws(
95
+ () => assertVerification("fixture.exe", valid.replace("Timestamp: present", "")),
96
+ /timestamp is missing/,
97
+ );
98
+ assert.throws(
99
+ () => assertVerification("fixture.exe", valid.replace("Successfully verified", "Verification failed")),
100
+ /did not report Valid/,
101
+ );
102
+ });
103
+
73
104
  test("upload uses only the pinned pnpm runner", () => {
74
105
  const source = readFileSync(upload, "utf8");
75
106
  assert.match(source, /spawnSync\("pnpm", \["dlx", "wrangler@4"/);
@@ -464,11 +464,11 @@ test("RightKit exposes one current version manifest", () => {
464
464
  "@rightkit/legal": "0.3.0",
465
465
  "@rightkit/legal-ui": "0.1.1",
466
466
  "@rightkit/license": "0.1.6",
467
- "@rightkit/release": "0.2.55",
467
+ "@rightkit/release": "0.2.56",
468
468
  });
469
469
  assert.deepEqual(versions.legacyNpm, {
470
470
  "@rightkit/legal-ui": ["0.1.0"],
471
- "@rightkit/release": ["0.2.22", "0.2.29", "0.2.30", "0.2.31", "0.2.41", "0.2.42", "0.2.43", "0.2.44", "0.2.45", "0.2.46", "0.2.49", "0.2.50", "0.2.51", "0.2.53", "0.2.54"],
471
+ "@rightkit/release": ["0.2.22", "0.2.29", "0.2.30", "0.2.31", "0.2.41", "0.2.42", "0.2.43", "0.2.44", "0.2.45", "0.2.46", "0.2.49", "0.2.50", "0.2.51", "0.2.53", "0.2.54", "0.2.55"],
472
472
  });
473
473
  assert.ok(
474
474
  new Set([versions.npm["@rightkit/release"], ...versions.legacyNpm["@rightkit/release"]]).has("0.2.42"),
@@ -18,11 +18,11 @@
18
18
  "@rightkit/legal": "0.3.0",
19
19
  "@rightkit/legal-ui": "0.1.1",
20
20
  "@rightkit/license": "0.1.6",
21
- "@rightkit/release": "0.2.55"
21
+ "@rightkit/release": "0.2.56"
22
22
  },
23
23
  "legacyNpm": {
24
24
  "@rightkit/legal-ui": ["0.1.0"],
25
- "@rightkit/release": ["0.2.22", "0.2.29", "0.2.30", "0.2.31", "0.2.41", "0.2.42", "0.2.43", "0.2.44", "0.2.45", "0.2.46", "0.2.49", "0.2.50", "0.2.51", "0.2.53", "0.2.54"]
25
+ "@rightkit/release": ["0.2.22", "0.2.29", "0.2.30", "0.2.31", "0.2.41", "0.2.42", "0.2.43", "0.2.44", "0.2.45", "0.2.46", "0.2.49", "0.2.50", "0.2.51", "0.2.53", "0.2.54", "0.2.55"]
26
26
  },
27
27
  "cargo": {
28
28
  "rightkit-license": "0.1.2",
package/sign-windows.mjs CHANGED
@@ -151,7 +151,7 @@ function run(cmd, runArgs) {
151
151
 
152
152
  function assertVerification(file, output) {
153
153
  if (!/successfully verified/i.test(output)) fail(`Authenticode verification did not report Valid for ${file}`);
154
- if (!/^Issued to:\s*Damned Ventures LLC\s*$/im.test(output)) fail(`Authenticode subject must be Damned Ventures LLC for ${file}`);
154
+ if (!/^[ \t]*Issued to:[ \t]*Damned Ventures LLC[ \t]*$/m.test(output)) fail(`Authenticode subject must be Damned Ventures LLC for ${file}`);
155
155
  if (!/(?:timestamp|time stamped|timestamped)/i.test(output)) fail(`Authenticode timestamp is missing for ${file}`);
156
156
  return { authenticode: "Valid", subject: "CN=Damned Ventures LLC", timestampPresent: true };
157
157
  }