mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-01-07 06:33:58 -06:00
SDA-4611 Disable EnableNodeCliInspectArguments electron fuse (#2196)
* SDA-4611 Disable EnableNodeCliInspectArguments electron fuse * Semgrep update
This commit is contained in:
parent
9b77dabbfb
commit
de0eb57dea
@ -1,2 +1,3 @@
|
|||||||
spec/
|
spec/
|
||||||
Dockerfile
|
Dockerfile
|
||||||
|
scripts/afterPackHoock.js
|
@ -41,6 +41,7 @@
|
|||||||
"artifactName": "${productName}-${version}-${os}.${ext}",
|
"artifactName": "${productName}-${version}-${os}.${ext}",
|
||||||
"asar": true,
|
"asar": true,
|
||||||
"asarUnpack": "**/*.node",
|
"asarUnpack": "**/*.node",
|
||||||
|
"afterPack": "scripts/afterPackHoock.js",
|
||||||
"nsis": {
|
"nsis": {
|
||||||
"perMachine": false,
|
"perMachine": false,
|
||||||
"oneClick": true,
|
"oneClick": true,
|
||||||
@ -167,6 +168,7 @@
|
|||||||
"url": "https://support.symphony.com"
|
"url": "https://support.symphony.com"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@electron/fuses": "^1.8.0",
|
||||||
"@types/cheerio": "^0.22.22",
|
"@types/cheerio": "^0.22.22",
|
||||||
"@types/enzyme": "^3.10.7",
|
"@types/enzyme": "^3.10.7",
|
||||||
"@types/fs-extra": "^9.0.0",
|
"@types/fs-extra": "^9.0.0",
|
||||||
|
21
scripts/afterPackHoock.js
Normal file
21
scripts/afterPackHoock.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
const path = require('path');
|
||||||
|
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses');
|
||||||
|
|
||||||
|
module.exports = async function afterPack(context) {
|
||||||
|
const {
|
||||||
|
appOutDir,
|
||||||
|
packager: { appInfo, platform },
|
||||||
|
} = context;
|
||||||
|
const ext = {
|
||||||
|
darwin: '.app',
|
||||||
|
win32: '.exe',
|
||||||
|
}[context.electronPlatformName];
|
||||||
|
const electronBinaryPath = path.join(
|
||||||
|
appOutDir,
|
||||||
|
`${appInfo.productFilename}${ext}`,
|
||||||
|
);
|
||||||
|
await flipFuses(electronBinaryPath, {
|
||||||
|
version: FuseVersion.V1,
|
||||||
|
[FuseV1Options.EnableNodeCliInspectArguments]: false,
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user