Skip to content

Commit b6b888a

Browse files
authored
chore(tls): drop the CA distrust step from the Bun services now that Bun ships the blocklist (#9413)
1 parent 9aba3d0 commit b6b888a

3 files changed

Lines changed: 5 additions & 21 deletions

File tree

‎apps/realtime/src/bootstrap.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
* loading the Socket.IO server, whose modules (`@/env`, DB preflight) read env
44
* at import time. See `@sim/runtime-secrets`.
55
*/
6-
import { createLogger } from '@sim/logger'
76
import { loadRuntimeSecrets } from '@sim/runtime-secrets'
8-
import { distrustCompromisedRoots } from '@sim/security/tls-trust'
97

10-
const tlsTrust = distrustCompromisedRoots()
118
await loadRuntimeSecrets()
12-
const logger = createLogger('Bootstrap')
13-
if (tlsTrust.unsupported || tlsTrust.error) {
14-
logger.error('Could not distrust compromised CA roots', tlsTrust)
15-
} else if (tlsTrust.removed.length > 0) {
16-
logger.info('Distrusted compromised CA roots', { removed: tlsTrust.removed })
17-
}
189
/**
1910
* Pin this process to the `realtime` DB role — covering both the realtime
2011
* `socketDb` pool and the shared `@sim/db` client used by handlers, preflight,

‎apps/sim/bootstrap.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
* loading the Next.js standalone server, so application modules that read env at
44
* import time see the full configuration. See `@sim/runtime-secrets`.
55
*/
6-
import { createLogger } from '@sim/logger'
76
import { loadRuntimeSecrets } from '@sim/runtime-secrets'
8-
import { distrustCompromisedRoots } from '@sim/security/tls-trust'
97

10-
const tlsTrust = distrustCompromisedRoots()
118
await loadRuntimeSecrets()
12-
const logger = createLogger('Bootstrap')
13-
if (tlsTrust.unsupported || tlsTrust.error) {
14-
logger.error('Could not distrust compromised CA roots', tlsTrust)
15-
} else if (tlsTrust.removed.length > 0) {
16-
logger.info('Distrusted compromised CA roots', { removed: tlsTrust.removed })
17-
}
189
// `server.js` is the Next standalone build artifact, a sibling of this file in
1910
// the image; it does not exist at type-check time, so the specifier is held in a
2011
// variable to keep it out of static module resolution.

‎packages/security/src/tls-trust.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import tls from 'node:tls'
66
* eMudhra intermediates whose private keys were reported compromised in October
77
* 2026 (https://emudhra.we-have-a-problem.com/roots.json). Mozilla's root store
88
* already excludes all four, so dropping them leaves the process trusting what
9-
* Firefox trusts. Upstream runtimes are fixing this with their own blocklists
10-
* (Node.js #66871, Bun #46159); once a deployed runtime ships one, these roots
11-
* are absent from its store and {@link distrustCompromisedRoots} changes nothing.
9+
* Firefox trusts. Upstream runtimes ship their own blocklists (Node.js #66871,
10+
* Bun #46159); once a deployed runtime has one, these roots are absent from its
11+
* store and {@link distrustCompromisedRoots} changes nothing. The Bun services
12+
* run a Bun that has it, so only the Trigger.dev task runtime, whose Node build
13+
* the platform chooses, still calls this.
1214
*/
1315
const COMPROMISED_ROOT_SPKI_SHA256 = new Set([
1416
'8d417db2dd8bf5e3084d1e3f196d583849d81bdd4c00c70b9d39369e96b8c782', // emSign ECC Root CA - G3

0 commit comments

Comments
 (0)