Disable RunAsNode and other unneeded Electron fuses

Harden packaged builds by flipping Electron fuses at build time via
electron-builder's electronFuses option:

- runAsNode: prevents ELECTRON_RUN_AS_NODE=1 from turning the signed
  app binary into a plain Node.js interpreter (CWE-269 class issue
  reported against many Electron apps)
- enableNodeOptionsEnvironmentVariable / enableNodeCliInspectArguments:
  ignore NODE_OPTIONS and --inspect in production
- enableEmbeddedAsarIntegrityValidation + onlyLoadAppFromAsar: only run
  app code from the validated app.asar

The app does not use process.fork or spawn its own binary as Node, so
disabling runAsNode has no functional impact. Fuses only apply to
packaged builds; yarn dev is unaffected.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfreRgcsYVq144Sx5syDnr
claude/sharp-mayer-cn90bg
Claude 1 week ago
parent aa498c38ec
commit 6f52e24593
No known key found for this signature in database

@ -174,6 +174,13 @@
"asar": {
"smartUnpack": false
},
"electronFuses": {
"runAsNode": false,
"enableNodeOptionsEnvironmentVariable": false,
"enableNodeCliInspectArguments": false,
"enableEmbeddedAsarIntegrityValidation": true,
"onlyLoadAppFromAsar": true
},
"appId": "no.mifi.losslesscut",
"artifactName": "${productName}-${os}-${arch}.${ext}",
"extraResources": [

Loading…
Cancel
Save