File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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'
76import { loadRuntimeSecrets } from '@sim/runtime-secrets'
8- import { distrustCompromisedRoots } from '@sim/security/tls-trust'
97
10- const tlsTrust = distrustCompromisedRoots ( )
118await 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,
Original file line number Diff line number Diff line change 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'
76import { loadRuntimeSecrets } from '@sim/runtime-secrets'
8- import { distrustCompromisedRoots } from '@sim/security/tls-trust'
97
10- const tlsTrust = distrustCompromisedRoots ( )
118await 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.
Original file line number Diff line number Diff 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 */
1315const COMPROMISED_ROOT_SPKI_SHA256 = new Set ( [
1416 '8d417db2dd8bf5e3084d1e3f196d583849d81bdd4c00c70b9d39369e96b8c782' , // emSign ECC Root CA - G3
You can’t perform that action at this time.
0 commit comments