@allanoricil/nrg-sentinel 1.0.5 → 1.0.6

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/README.md CHANGED
@@ -18,43 +18,44 @@ The table below is updated automatically after each CI run on `main`.
18
18
  <!-- DEMO-TEST-RESULTS:START -->
19
19
  | # | Demo | Result | Node-RED |
20
20
  |---|------|:------:|:--------:|
21
- | 01 | Monkey Patching | ✅ | `4.1.7` |
22
- | 02 | Hook Injection | ✅ | `4.1.7` |
23
- | 03 | Credential Theft | ✅ | `4.1.7` |
24
- | 04 | Wire Manipulation | ✅ | `4.1.7` |
25
- | 05 | Direct Receive Injection | ✅ | `4.1.7` |
26
- | 06 | Express Middleware | ✅ | `4.1.7` |
27
- | 07 | EventEmitter Hijack | ✅ | `4.1.7` |
28
- | 08 | Node Enumeration | ✅ | `4.1.7` |
29
- | 09 | Prototype Pollution | ✅ | `4.1.7` |
30
- | 10 | Flow File Tampering | ✅ | `4.1.7` |
31
- | 11 | Message Provenance | ✅ | `4.1.7` |
32
- | 12 | Settings.js Tampering | ✅ | `4.1.7` |
33
- | 13 | Sentinel Source Tampering | ✅ | `4.1.7` |
34
- | 14 | Express Route Backdoor | ✅ | `4.1.7` |
35
- | 15 | Config Node Z-Forgery | ✅ | `4.1.7` |
36
- | 16 | Symbol Property Bypass | ✅ | `4.1.7` |
37
- | 17 | EventEmitter Enumeration | ✅ | `4.1.7` |
38
- | 18 | Deep Stack Bypass | ✅ | `4.1.7` |
39
- | 19 | HTTP Route Deletion | ✅ | `4.1.7` |
40
- | 20 | Child Process Exec | ✅ | `4.1.7` |
21
+ | 01 | Monkey Patching | ✅ | `4.1.8` |
22
+ | 02 | Hook Injection | ✅ | `4.1.8` |
23
+ | 03 | Credential Theft | ✅ | `4.1.8` |
24
+ | 04 | Wire Manipulation | ✅ | `4.1.8` |
25
+ | 05 | Direct Receive Injection | ✅ | `4.1.8` |
26
+ | 06 | Express Middleware | ✅ | `4.1.8` |
27
+ | 07 | EventEmitter Hijack | ✅ | `4.1.8` |
28
+ | 08 | Node Enumeration | ✅ | `4.1.8` |
29
+ | 09 | Prototype Pollution | ✅ | `4.1.8` |
30
+ | 10 | Flow File Tampering | ✅ | `4.1.8` |
31
+ | 11 | Message Provenance | ✅ | `4.1.8` |
32
+ | 12 | Settings.js Tampering | ✅ | `4.1.8` |
33
+ | 13 | Sentinel Source Tampering | ✅ | `4.1.8` |
34
+ | 14 | Express Route Backdoor | ✅ | `4.1.8` |
35
+ | 15 | Config Node Z-Forgery | ✅ | `4.1.8` |
36
+ | 16 | Symbol Property Bypass | ✅ | `4.1.8` |
37
+ | 17 | EventEmitter Enumeration | ✅ | `4.1.8` |
38
+ | 18 | Deep Stack Bypass | ✅ | `4.1.8` |
39
+ | 19 | HTTP Route Deletion | ✅ | `4.1.8` |
40
+ | 20 | Child Process Exec | ✅ | `4.1.8` |
41
41
  | 21 | SW Fetch Interception | — | — | browser-only — verify via `start-interactive.sh` |
42
- | 22 | FS Read | ✅ | `4.1.7` |
43
- | 23 | Process Env Exfiltration | ✅ | `4.1.7` |
44
- | 24 | Process Exit DoS | ✅ | `4.1.7` |
45
- | 25 | VM Sandbox Escape | ✅ | `4.1.7` |
46
- | 26 | Worker Thread Escape | ✅ | `4.1.7` |
47
- | 27 | Network Socket Exfiltration | ✅ | `4.1.7` |
48
- | 28 | Registry Type Hijack | ✅ | `4.1.7` |
49
- | 29 | Settings Mutation | ✅ | `4.1.7` |
50
- | 30 | Comms Publish Spoofing | ✅ | `4.1.7` |
51
- | 31 | Context Permissions | ✅ | `4.1.7` |
52
- | 32 | Flows Inject | ✅ | `4.1.7` |
53
- | 33 | Node Event Hijack | ✅ | `4.1.7` |
54
- | 34 | Config Node Credentials | ✅ | `4.1.7` |
55
- | 35 | Process Binding Bypass | ✅ | `4.1.7` |
56
- | 36 | ChildProcess Proto Bypass | ✅ | `4.1.7` |
57
- _Last updated: 2026-03-23T07:25:21Z_
42
+ | 22 | FS Read | ✅ | `4.1.8` |
43
+ | 23 | Process Env Exfiltration | ✅ | `4.1.8` |
44
+ | 24 | Process Exit DoS | ✅ | `4.1.8` |
45
+ | 25 | VM Sandbox Escape | ✅ | `4.1.8` |
46
+ | 26 | Worker Thread Escape | ✅ | `4.1.8` |
47
+ | 27 | Network Socket Exfiltration | ✅ | `4.1.8` |
48
+ | 28 | Registry Type Hijack | ✅ | `4.1.8` |
49
+ | 29 | Settings Mutation | ✅ | `4.1.8` |
50
+ | 30 | Comms Publish Spoofing | ✅ | `4.1.8` |
51
+ | 31 | Context Permissions | ✅ | `4.1.8` |
52
+ | 32 | Flows Inject | ✅ | `4.1.8` |
53
+ | 33 | Node Event Hijack | ✅ | `4.1.8` |
54
+ | 34 | Config Node Credentials | ✅ | `4.1.8` |
55
+ | 35 | Process Binding Bypass | ✅ | `4.1.8` |
56
+ | 36 | ChildProcess Proto Bypass | ✅ | `4.1.8` |
57
+ | 37 | UserDir Bypass | ✅ | `4.1.8` |
58
+ _Last updated: 2026-03-25T02:55:29Z_
58
59
  <!-- DEMO-TEST-RESULTS:END -->
59
60
 
60
61
  ## Demos
@@ -99,6 +100,7 @@ Each demo is a self-contained scenario that shows an attack against Node-RED and
99
100
  | 34 | Config Node Credentials | Interactive: explores open / restricted / locked config-node credential access |
100
101
  | 35 | Process Binding Bypass | Uses `process.binding('spawn_sync')` to spawn processes, bypassing JS-level guards |
101
102
  | 36 | ChildProcess Proto Bypass | Calls `ChildProcess.prototype.spawn()` directly, bypassing module-export guards |
103
+ | 37 | UserDir Bypass | Launches Node-RED with `-u <path>` instead of env vars, so Sentinel defaults to `~/.node-red` and misidentifies all attacker frames as internal |
102
104
 
103
105
  ## Capability grants
104
106
 
package/bin/node-red.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @nrg/sentinel v1.0.5
3
+ * @nrg/sentinel v1.0.6
4
4
  * Copyright (c) 2026 NRG. All rights reserved.
5
5
  * Licensed under AGPL-3.0-or-later. Commercial license required for use beyond 14-day trial.
6
6
  * https://allanoricil.github.io/nrg-sentinel-public/
7
7
  */
8
- 'use strict';const _0x1eb6c7=_0x5347;(function(stringArrayFunction,_0x41ca1f){const _0x3b9d=_0x5347,stringArray=stringArrayFunction();while(!![]){try{const _0x513a72=-parseInt(_0x3b9d(0xe6))/0x1*(parseInt(_0x3b9d(0xd7))/0x2)+-parseInt(_0x3b9d(0xdf))/0x3+-parseInt(_0x3b9d(0xf2))/0x4*(-parseInt(_0x3b9d(0xe5))/0x5)+parseInt(_0x3b9d(0xf8))/0x6+parseInt(_0x3b9d(0xee))/0x7+parseInt(_0x3b9d(0xf0))/0x8*(-parseInt(_0x3b9d(0xf7))/0x9)+parseInt(_0x3b9d(0xdb))/0xa*(parseInt(_0x3b9d(0xe0))/0xb);if(_0x513a72===_0x41ca1f)break;else stringArray['push'](stringArray['shift']());}catch(_0xb44558){stringArray['push'](stringArray['shift']());}}}(_0x29d9,0x7e101));function _0x29d9(){const _0x500e05=['11920XBsVHB','resolve','crypto','ed25519','2578290mANlEG','4664bZncbW','settings.js','node-red','NODE_OPTIONS','env','385aCghEU','1CBiJry','assign','findIndex','join','kill','trim','path','dirname','3911859GbToOk','argv','8NuRVKI','exit','28412IUpOmD','inherit','child_process','error','--require\x20','5429889lzRelw','3254994SsZUQA','349142suesIN','SIGINT','bin','SIGTERM'];_0x29d9=function(){return _0x500e05;};return _0x29d9();}function _0x5347(_0x2f00e0,_0x16e9a8){_0x2f00e0=_0x2f00e0-0xd7;const _0x29d935=_0x29d9();let _0x534711=_0x29d935[_0x2f00e0];return _0x534711;}const {createVerify}=require(_0x1eb6c7(0xdd)),{readFileSync,existsSync}=require('fs'),{spawn}=require(_0x1eb6c7(0xf4)),path=require(_0x1eb6c7(0xec));function _findCoInstalledNodeRed(){const _0x41c2b8=_0x5347;var _0x153754=path[_0x41c2b8(0xdc)](path[_0x41c2b8(0xed)](process[_0x41c2b8(0xef)][0x1]),'..'),_0x3bfa8a=_0x153754;while(!![]){var _0x437f29=path['dirname'](_0x3bfa8a);if(_0x437f29===_0x3bfa8a)break;var _0x3d1eaa=path[_0x41c2b8(0xe9)](_0x437f29,'node-red','package.json');if(existsSync(_0x3d1eaa))try{var _0x3f153f=JSON['parse'](readFileSync(_0x3d1eaa,'utf8')),_0x1b6701=_0x3f153f[_0x41c2b8(0xd9)]&&_0x3f153f['bin'][_0x41c2b8(0xe2)]||_0x3f153f['main'];return path[_0x41c2b8(0xdc)](path[_0x41c2b8(0xed)](_0x3d1eaa),_0x1b6701);}catch(_0x580386){}_0x3bfa8a=_0x437f29;}return null;}const args=process['argv']['slice'](0x2),sIdx=args[_0x1eb6c7(0xe8)](_0x1452c7=>_0x1452c7==='-s'||_0x1452c7==='--settings'),settingsPath=sIdx!==-0x1?path[_0x1eb6c7(0xdc)](args[sIdx+0x1]):path[_0x1eb6c7(0xdc)](_0x1eb6c7(0xe1)),keyPath=process[_0x1eb6c7(0xe4)]['NRG_SENTINEL_PUBLIC_KEY'];if(keyPath){const sigPath=settingsPath+'.sig';!existsSync(keyPath)&&(console['error']('[@allanoricil/nrg-sentinel] Public key not found:',keyPath),process[_0x1eb6c7(0xf1)](0x1));!existsSync(sigPath)&&(console[_0x1eb6c7(0xf5)]('[@allanoricil/nrg-sentinel] Signature file not found:',sigPath),console['error'](' Sign it first: nrg-sentinel sign '+settingsPath),process['exit'](0x1));try{const pub=readFileSync(keyPath),sig=readFileSync(sigPath),src=readFileSync(settingsPath),ok=createVerify(_0x1eb6c7(0xde))['update'](src)['verify'](pub,sig);!ok&&(console['error']('[@allanoricil/nrg-sentinel] settings.js signature INVALID \u2014 aborting.'),console['error']('\x20\x20If\x20settings.js\x20was\x20intentionally\x20changed,\x20re-sign\x20it.'),process['exit'](0x1));}catch(_0x5e968c){console['error']('[@allanoricil/nrg-sentinel] Signature verification error:',_0x5e968c['message']),process['exit'](0x1);}}const preload=path[_0x1eb6c7(0xdc)](__dirname,'..','preload.js'),env=Object[_0x1eb6c7(0xe7)]({},process['env']);env['NODE_OPTIONS']=(_0x1eb6c7(0xf6)+preload+'\x20'+(env[_0x1eb6c7(0xe3)]||''))[_0x1eb6c7(0xeb)]();let spawnCmd,spawnArgs;var nodeRedBin=_findCoInstalledNodeRed();nodeRedBin?(spawnCmd=process['execPath'],spawnArgs=[nodeRedBin,...args]):(spawnCmd=_0x1eb6c7(0xe2),spawnArgs=args);const child=spawn(spawnCmd,spawnArgs,{'stdio':_0x1eb6c7(0xf3),'env':env,'shell':![]});process['on'](_0x1eb6c7(0xda),()=>child['kill'](_0x1eb6c7(0xda))),process['on'](_0x1eb6c7(0xd8),()=>child[_0x1eb6c7(0xea)](_0x1eb6c7(0xd8))),child['on'](_0x1eb6c7(0xf1),(_0x2e1cc4,_0x19f087)=>{_0x19f087?process['kill'](process['pid'],_0x19f087):'jGXaL'!=='jGXaL'?(_0x391a35=process['execPath'],_0x1d8e54=[_0x5d694b,..._0x48cf28]):process['exit'](_0x2e1cc4??0x0);});
8
+ 'use strict';const _0x37a674=_0x4633;(function(stringArrayFunction,_0x2b082d){const _0x4da018=_0x4633,stringArray=stringArrayFunction();while(!![]){try{const _0x4b07ad=parseInt(_0x4da018(0xa5))/0x1*(parseInt(_0x4da018(0xa6))/0x2)+parseInt(_0x4da018(0x94))/0x3*(parseInt(_0x4da018(0xa1))/0x4)+-parseInt(_0x4da018(0x9a))/0x5*(-parseInt(_0x4da018(0xaa))/0x6)+parseInt(_0x4da018(0xb5))/0x7+-parseInt(_0x4da018(0x97))/0x8*(-parseInt(_0x4da018(0x91))/0x9)+parseInt(_0x4da018(0xab))/0xa*(parseInt(_0x4da018(0xaf))/0xb)+parseInt(_0x4da018(0xb1))/0xc*(-parseInt(_0x4da018(0xa9))/0xd);if(_0x4b07ad===_0x2b082d)break;else stringArray['push'](stringArray['shift']());}catch(_0x4d4606){stringArray['push'](stringArray['shift']());}}}(_0x3e38,0x3a9df));const {createVerify}=require('crypto'),{readFileSync,existsSync}=require('fs'),{spawn}=require('child_process'),path=require('path');function _findCoInstalledNodeRed(){const _0x571477=_0x4633;var _0x57d1f7=path['resolve'](path[_0x571477(0xa8)](process['argv'][0x1]),'..'),_0x232908=_0x57d1f7;while(!![]){var _0x4853ec=path['dirname'](_0x232908);if(_0x4853ec===_0x232908)break;var _0x128b2e=path[_0x571477(0x92)](_0x4853ec,_0x571477(0xa2),'package.json');if(existsSync(_0x128b2e))try{var _0x2414a5=JSON[_0x571477(0x9e)](readFileSync(_0x128b2e,'utf8')),_0x4af844=_0x2414a5['bin']&&_0x2414a5['bin']['node-red']||_0x2414a5[_0x571477(0x93)];return path[_0x571477(0xb3)](path['dirname'](_0x128b2e),_0x4af844);}catch(_0x28667a){}_0x232908=_0x4853ec;}return null;}function _0x4633(_0x5668c3,_0x120c92){_0x5668c3=_0x5668c3-0x91;const _0x3e38b0=_0x3e38();let _0x463325=_0x3e38b0[_0x5668c3];return _0x463325;}const args=process[_0x37a674(0xad)][_0x37a674(0x96)](0x2),sIdx=args[_0x37a674(0xac)](_0x326bfb=>_0x326bfb==='-s'||_0x326bfb==='--settings'),settingsPath=sIdx!==-0x1?path['resolve'](args[sIdx+0x1]):path[_0x37a674(0xb3)]('settings.js'),keyPath=process['env']['NRG_SENTINEL_PUBLIC_KEY'];if(keyPath){const sigPath=settingsPath+_0x37a674(0x98);!existsSync(keyPath)&&(console['error']('[@allanoricil/nrg-sentinel] Public key not found:',keyPath),process['exit'](0x1));!existsSync(sigPath)&&(console['error']('[@allanoricil/nrg-sentinel] Signature file not found:',sigPath),console['error'](' Sign it first: nrg-sentinel sign '+settingsPath),process[_0x37a674(0x9f)](0x1));try{const pub=readFileSync(keyPath),sig=readFileSync(sigPath),src=readFileSync(settingsPath),ok=createVerify(_0x37a674(0xb4))[_0x37a674(0x9c)](src)['verify'](pub,sig);!ok&&(console[_0x37a674(0x99)]('[@allanoricil/nrg-sentinel] settings.js signature INVALID \u2014 aborting.'),console['error'](_0x37a674(0x95)),process['exit'](0x1));}catch(_0x232ab5){console['error']('[@allanoricil/nrg-sentinel] Signature verification error:',_0x232ab5[_0x37a674(0xae)]),process[_0x37a674(0x9f)](0x1);}}const preload=path['resolve'](__dirname,'..','preload.js'),env=Object[_0x37a674(0x9b)]({},process[_0x37a674(0xa3)]);env['NODE_OPTIONS']=(_0x37a674(0xa4)+preload+'\x20'+(env[_0x37a674(0xb0)]||''))[_0x37a674(0xa0)]();let spawnCmd,spawnArgs;var nodeRedBin=_findCoInstalledNodeRed();function _0x3e38(){const _0x3b4254=['inherit','resolve','ed25519','287959PEtbQO','445491ZOwTcI','join','main','21oNGzaK','\x20\x20If\x20settings.js\x20was\x20intentionally\x20changed,\x20re-sign\x20it.','slice','8MAtBtx','.sig','error','1698815RspLDg','assign','update','SIGTERM','parse','exit','trim','74440jJyKCB','node-red','env','--require\x20','112TLwrYP','5780yQOAKm','pid','dirname','13GRcPYY','6cdRVeE','10aHOFrt','findIndex','argv','message','599665KtdBsy','NODE_OPTIONS','8385228wkdZKF'];_0x3e38=function(){return _0x3b4254;};return _0x3e38();}nodeRedBin?(spawnCmd=process['execPath'],spawnArgs=[nodeRedBin,...args]):(spawnCmd=_0x37a674(0xa2),spawnArgs=args);const child=spawn(spawnCmd,spawnArgs,{'stdio':_0x37a674(0xb2),'env':env,'shell':![]});process['on']('SIGTERM',()=>child['kill'](_0x37a674(0x9d))),process['on']('SIGINT',()=>child['kill']('SIGINT')),child['on'](_0x37a674(0x9f),(_0x11b6e7,_0x4e70fb)=>{const _0x38793c=_0x4633;_0x4e70fb?process['kill'](process[_0x38793c(0xa7)],_0x4e70fb):process[_0x38793c(0x9f)](_0x11b6e7??0x0);});
package/flow-diff.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @nrg/sentinel v1.0.5
2
+ * @nrg/sentinel v1.0.6
3
3
  * Copyright (c) 2026 NRG. All rights reserved.
4
4
  * Licensed under AGPL-3.0-or-later. Commercial license required for use beyond 14-day trial.
5
5
  * https://allanoricil.github.io/nrg-sentinel-public/
6
6
  */
7
- 'use strict';var _0x2e7feb=_0x28f8;(function(stringArrayFunction,_0x3e5b99){var _0x954ae=_0x28f8,stringArray=stringArrayFunction();while(!![]){try{var _0x1cb612=parseInt(_0x954ae(0xfb))/0x1+parseInt(_0x954ae(0xf4))/0x2*(parseInt(_0x954ae(0xe3))/0x3)+-parseInt(_0x954ae(0xec))/0x4+parseInt(_0x954ae(0xf8))/0x5+-parseInt(_0x954ae(0xe1))/0x6+-parseInt(_0x954ae(0xf9))/0x7*(parseInt(_0x954ae(0xf3))/0x8)+-parseInt(_0x954ae(0xfa))/0x9;if(_0x1cb612===_0x3e5b99)break;else stringArray['push'](stringArray['shift']());}catch(_0xe358d4){stringArray['push'](stringArray['shift']());}}}(_0x7cea,0x2d0d8));function _0x7cea(){var _0x262c6c=['1611288kNQcIw','283456ITpqNb','hasOwnProperty','200448INpOon','length','6ShIUMO','keys','VQLki','TdxJH','sort','stringify','has','push','exports','1083820YFNzpx','UcMWZ','prototype','jaJyY','forEach','vWMLx','wires','8136nxvrYH','255972ozuynx','isArray','call','filter','1481540gbBwaV','1155IftNUH'];_0x7cea=function(){return _0x262c6c;};return _0x7cea();}var COMPARISON_STRIP=['x','y','z',_0x2e7feb(0xf2)];function shouldSkipNode(_0x340db0){var _0x55103b=_0x28f8;if(!_0x340db0||!_0x340db0['id'])return!![];if(!Object['prototype']['hasOwnProperty'][_0x55103b(0xf6)](_0x340db0,'x')||!Object['prototype']['hasOwnProperty'][_0x55103b(0xf6)](_0x340db0,'y'))return!![];return![];}function normalizeForComparison(_0x6115da){var _0x144243=_0x28f8,_0x48bbb2={},_0x42eef3=Object[_0x144243(0xe4)](_0x6115da)['sort']();for(var _0x559ee3=0x0;_0x559ee3<_0x42eef3[_0x144243(0xe2)];_0x559ee3++){COMPARISON_STRIP['indexOf'](_0x42eef3[_0x559ee3])===-0x1&&(_0x48bbb2[_0x42eef3[_0x559ee3]]=_0x6115da[_0x42eef3[_0x559ee3]]);}return _0x48bbb2;}function deepEqual(_0x1ab5e0,_0x4b2e03){var _0xb10595=_0x28f8;return JSON[_0xb10595(0xe8)](_0x1ab5e0)===JSON[_0xb10595(0xe8)](_0x4b2e03);}function _0x28f8(_0x5511ad,_0x33517b){_0x5511ad=_0x5511ad-0xe0;var _0x7cea58=_0x7cea();var _0x28f8ec=_0x7cea58[_0x5511ad];return _0x28f8ec;}function toEdges(_0x2e1b88){var _0x3bab24=_0x28f8,_0x36edd5=new Set();for(var _0x9ecb9e=0x0;_0x9ecb9e<_0x2e1b88['length'];_0x9ecb9e++){var _0x282869=_0x2e1b88[_0x9ecb9e];if(!_0x282869[_0x3bab24(0xf2)]||!Array[_0x3bab24(0xf5)](_0x282869['wires']))continue;for(var _0x816234=0x0;_0x816234<_0x282869[_0x3bab24(0xf2)][_0x3bab24(0xe2)];_0x816234++){if(_0x3bab24(0xed)!=='UcMWZ')_0x4a8058[_0x286fce[_0x2ff0fe]['id']]=_0x283b2[_0x1b8532];else{var _0x5491d8=_0x282869['wires'][_0x816234];if(!Array[_0x3bab24(0xf5)](_0x5491d8))continue;for(var _0xdad3de=0x0;_0xdad3de<_0x5491d8[_0x3bab24(0xe2)];_0xdad3de++){_0x36edd5['add'](_0x282869['id']+':'+_0x816234+'→'+_0x5491d8[_0xdad3de]);}}}}return _0x36edd5;}function diffFlows(_0x58bea3,_0x18414b){var _0x267697=_0x28f8,_0xa92cda=(Array[_0x267697(0xf5)](_0x58bea3)?_0x58bea3:[])['filter'](function(_0x41448a){return!shouldSkipNode(_0x41448a);}),_0x5a23d0=(Array['isArray'](_0x18414b)?_0x18414b:[])[_0x267697(0xf7)](function(_0x16e409){var _0x508128=_0x28f8;if(_0x508128(0xe6)!==_0x508128(0xe5))return!shouldSkipNode(_0x16e409);else _0x5dc22b[_0x508128(0xea)](_0x360a3e[_0x5a924f[_0x1aad82]]);}),_0x4c43b7={};for(var _0x5794df=0x0;_0x5794df<_0xa92cda[_0x267697(0xe2)];_0x5794df++){_0xa92cda[_0x5794df]&&_0xa92cda[_0x5794df]['id']&&(_0x4c43b7[_0xa92cda[_0x5794df]['id']]=_0xa92cda[_0x5794df]);}var _0x257734={};for(var _0x3dc929=0x0;_0x3dc929<_0x5a23d0[_0x267697(0xe2)];_0x3dc929++){if('sFnBf'==='sFnBf')_0x5a23d0[_0x3dc929]&&_0x5a23d0[_0x3dc929]['id']&&(_0x257734[_0x5a23d0[_0x3dc929]['id']]=_0x5a23d0[_0x3dc929]);else{var _0x4e40db={},_0x31fc8b=Object['keys'](_0x3edf6a)[_0x267697(0xe7)]();for(var _0x2f9cfe=0x0;_0x2f9cfe<_0x31fc8b['length'];_0x2f9cfe++){_0x5d03a3['indexOf'](_0x31fc8b[_0x2f9cfe])===-0x1&&(_0x4e40db[_0x31fc8b[_0x2f9cfe]]=_0x5abd63[_0x31fc8b[_0x2f9cfe]]);}return _0x4e40db;}}var _0x2985d8=[],_0x509f74=[],_0x542508=[],_0x3f047d=Object[_0x267697(0xe4)](_0x257734);for(var _0x387e40=0x0;_0x387e40<_0x3f047d['length'];_0x387e40++){if('vWMLx'===_0x267697(0xf1)){var _0x3398f4=_0x3f047d[_0x387e40];if(!_0x4c43b7[_0x3398f4])_0x2985d8['push'](_0x257734[_0x3398f4]);else{var _0x16bf6b=normalizeForComparison(_0x4c43b7[_0x3398f4]),_0x232a4a=normalizeForComparison(_0x257734[_0x3398f4]);!deepEqual(_0x16bf6b,_0x232a4a)&&_0x542508[_0x267697(0xea)]({'id':_0x3398f4,'before':_0x4c43b7[_0x3398f4],'after':_0x257734[_0x3398f4]});}}else _0x55117c[_0x267697(0xea)](_0x339456[_0x4c1b5a]);}var _0xa550db=Object[_0x267697(0xe4)](_0x4c43b7);for(var _0x4e7b5b=0x0;_0x4e7b5b<_0xa550db['length'];_0x4e7b5b++){if(!_0x257734[_0xa550db[_0x4e7b5b]]){if('jaJyY'===_0x267697(0xef))_0x509f74['push'](_0x4c43b7[_0xa550db[_0x4e7b5b]]);else{var _0x4c47e5=_0x45af26[_0xadee65];if(!_0xfd08ba[_0x4c47e5])_0x4fc289[_0x267697(0xea)](_0x981dfb[_0x4c47e5]);else{var _0x3ac26e=_0x5cef55(_0x4223c5[_0x4c47e5]),_0x3fa2df=_0x2b7bc4(_0x4b56f0[_0x4c47e5]);!_0x52f771(_0x3ac26e,_0x3fa2df)&&_0x23f058['push']({'id':_0x4c47e5,'before':_0x3aaaa9[_0x4c47e5],'after':_0x1eab5c[_0x4c47e5]});}}}}var _0x337f4b=toEdges(_0xa92cda),_0x20b4b5=toEdges(_0x5a23d0),_0x47d210=[];_0x20b4b5[_0x267697(0xf0)](function(_0x49dd8a){var _0x4f7a53=_0x28f8;if('JjDCq'==='JjDCq'){if(!_0x337f4b[_0x4f7a53(0xe9)](_0x49dd8a))_0x47d210['push'](_0x49dd8a);}else{if(!_0x3769a3||!_0xc65f25['id'])return!![];if(!Object[_0x4f7a53(0xee)][_0x4f7a53(0xe0)][_0x4f7a53(0xf6)](_0x1846d9,'x')||!Object['prototype']['hasOwnProperty']['call'](_0x59954f,'y'))return!![];return![];}});var _0x1bb719=[];return _0x337f4b[_0x267697(0xf0)](function(_0x2257ec){var _0x5acbcc=_0x28f8;if(!_0x20b4b5['has'](_0x2257ec))_0x1bb719[_0x5acbcc(0xea)](_0x2257ec);}),{'nodesAdded':_0x2985d8,'nodesRemoved':_0x509f74,'nodesModified':_0x542508,'connectionsAdded':_0x47d210,'connectionsRemoved':_0x1bb719};}module[_0x2e7feb(0xeb)]={'diffFlows':diffFlows};
7
+ 'use strict';var _0x37e203=_0x2c6e;function _0x2c6e(_0x24b33f,_0xe49255){_0x24b33f=_0x24b33f-0x1c3;var _0x31e742=_0x31e7();var _0x2c6e20=_0x31e742[_0x24b33f];return _0x2c6e20;}(function(stringArrayFunction,_0x543434){var _0x44f6e7=_0x2c6e,stringArray=stringArrayFunction();while(!![]){try{var _0x19a9c3=-parseInt(_0x44f6e7(0x1d7))/0x1+-parseInt(_0x44f6e7(0x1cc))/0x2+-parseInt(_0x44f6e7(0x1cb))/0x3+parseInt(_0x44f6e7(0x1d6))/0x4+-parseInt(_0x44f6e7(0x1ca))/0x5*(-parseInt(_0x44f6e7(0x1de))/0x6)+-parseInt(_0x44f6e7(0x1cd))/0x7+parseInt(_0x44f6e7(0x1c6))/0x8*(parseInt(_0x44f6e7(0x1d8))/0x9);if(_0x19a9c3===_0x543434)break;else stringArray['push'](stringArray['shift']());}catch(_0xfd91d2){stringArray['push'](stringArray['shift']());}}}(_0x31e7,0x2a84d));var COMPARISON_STRIP=['x','y','z','wires'];function shouldSkipNode(_0x2a6f5b){var _0x2f3202=_0x2c6e;if(!_0x2a6f5b||!_0x2a6f5b['id'])return!![];if(!Object[_0x2f3202(0x1d3)][_0x2f3202(0x1d2)][_0x2f3202(0x1da)](_0x2a6f5b,'x')||!Object['prototype']['hasOwnProperty']['call'](_0x2a6f5b,'y'))return!![];return![];}function normalizeForComparison(_0x700356){var _0x38a264=_0x2c6e,_0x4ced2a={},_0x1662fc=Object['keys'](_0x700356)[_0x38a264(0x1d5)]();for(var _0x1bde32=0x0;_0x1bde32<_0x1662fc[_0x38a264(0x1cf)];_0x1bde32++){COMPARISON_STRIP[_0x38a264(0x1db)](_0x1662fc[_0x1bde32])===-0x1&&(_0x4ced2a[_0x1662fc[_0x1bde32]]=_0x700356[_0x1662fc[_0x1bde32]]);}return _0x4ced2a;}function deepEqual(_0x259709,_0x490156){var _0x24d384=_0x2c6e;return JSON['stringify'](_0x259709)===JSON[_0x24d384(0x1d4)](_0x490156);}function toEdges(_0x18d9b1){var _0x543c0f=_0x2c6e,_0x586443=new Set();for(var _0x25c022=0x0;_0x25c022<_0x18d9b1[_0x543c0f(0x1cf)];_0x25c022++){var _0x2243a0=_0x18d9b1[_0x25c022];if(!_0x2243a0[_0x543c0f(0x1d0)]||!Array['isArray'](_0x2243a0['wires']))continue;for(var _0x559a02=0x0;_0x559a02<_0x2243a0[_0x543c0f(0x1d0)]['length'];_0x559a02++){var _0x38f3a1=_0x2243a0[_0x543c0f(0x1d0)][_0x559a02];if(!Array['isArray'](_0x38f3a1))continue;for(var _0x16ad71=0x0;_0x16ad71<_0x38f3a1['length'];_0x16ad71++){_0x586443[_0x543c0f(0x1dd)](_0x2243a0['id']+':'+_0x559a02+'→'+_0x38f3a1[_0x16ad71]);}}}return _0x586443;}function diffFlows(_0x36b667,_0x29e1ec){var _0x200d46=_0x2c6e,_0x5893f9=(Array['isArray'](_0x36b667)?_0x36b667:[])['filter'](function(_0xeb45a2){return!shouldSkipNode(_0xeb45a2);}),_0x1f6f4a=(Array[_0x200d46(0x1d9)](_0x29e1ec)?_0x29e1ec:[])['filter'](function(_0x4a2093){var _0x3e3eb6=_0x2c6e;if(_0x3e3eb6(0x1ce)===_0x3e3eb6(0x1c7))_0xdcd5f[_0x38186e[_0x49cee6]['id']]=_0x1272df[_0x44aa94];else return!shouldSkipNode(_0x4a2093);}),_0x23dadf={};for(var _0x458e4a=0x0;_0x458e4a<_0x5893f9[_0x200d46(0x1cf)];_0x458e4a++){_0x5893f9[_0x458e4a]&&_0x5893f9[_0x458e4a]['id']&&(_0x23dadf[_0x5893f9[_0x458e4a]['id']]=_0x5893f9[_0x458e4a]);}var _0x141f41={};for(var _0x1200ff=0x0;_0x1200ff<_0x1f6f4a['length'];_0x1200ff++){_0x1f6f4a[_0x1200ff]&&_0x1f6f4a[_0x1200ff]['id']&&(_0x141f41[_0x1f6f4a[_0x1200ff]['id']]=_0x1f6f4a[_0x1200ff]);}var _0x3ff688=[],_0x677b4c=[],_0x5ab03e=[],_0x274cd9=Object['keys'](_0x141f41);for(var _0x129861=0x0;_0x129861<_0x274cd9['length'];_0x129861++){var _0x3b9639=_0x274cd9[_0x129861];if(!_0x23dadf[_0x3b9639])_0x3ff688['push'](_0x141f41[_0x3b9639]);else{if(_0x200d46(0x1c5)===_0x200d46(0x1c8))_0x167f7c['push'](_0x3de20c[_0x575c2a]);else{var _0x449e02=normalizeForComparison(_0x23dadf[_0x3b9639]),_0xc464f4=normalizeForComparison(_0x141f41[_0x3b9639]);!deepEqual(_0x449e02,_0xc464f4)&&_0x5ab03e[_0x200d46(0x1d1)]({'id':_0x3b9639,'before':_0x23dadf[_0x3b9639],'after':_0x141f41[_0x3b9639]});}}}var _0x39b46c=Object[_0x200d46(0x1dc)](_0x23dadf);for(var _0x382c5f=0x0;_0x382c5f<_0x39b46c['length'];_0x382c5f++){!_0x141f41[_0x39b46c[_0x382c5f]]&&_0x677b4c['push'](_0x23dadf[_0x39b46c[_0x382c5f]]);}var _0xdd6f06=toEdges(_0x5893f9),_0xdf5fcb=toEdges(_0x1f6f4a),_0x4f86d3=[];_0xdf5fcb[_0x200d46(0x1c9)](function(_0x390e81){var _0x254a98=_0x2c6e;if(!_0xdd6f06[_0x254a98(0x1c3)](_0x390e81))_0x4f86d3['push'](_0x390e81);});var _0x3d5ed1=[];return _0xdd6f06[_0x200d46(0x1c9)](function(_0x504134){var _0x4abe58=_0x2c6e;if(!_0xdf5fcb['has'](_0x504134))_0x3d5ed1[_0x4abe58(0x1d1)](_0x504134);}),{'nodesAdded':_0x3ff688,'nodesRemoved':_0x677b4c,'nodesModified':_0x5ab03e,'connectionsAdded':_0x4f86d3,'connectionsRemoved':_0x3d5ed1};}function _0x31e7(){var _0x50e6da=['xiijB','cJbUD','forEach','10rgxMpL','402603RNNEBA','429188dZCmTJ','411166KPvHkE','UOdVJ','length','wires','push','hasOwnProperty','prototype','stringify','sort','208544mIFkjR','276542JYUAkA','1945602MLLdLg','isArray','call','indexOf','keys','add','472686BXqQFQ','has','exports','QIQuZ','24gHOQJG'];_0x31e7=function(){return _0x50e6da;};return _0x31e7();}module[_0x37e203(0x1c4)]={'diffFlows':diffFlows};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allanoricil/nrg-sentinel",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Node-RED Runtime Security Hardening",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "AllanOricil",