@allanoricil/nrg-sentinel 1.0.4 → 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,41 +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
- _Last updated: 2026-03-18T03:37:28Z_
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_
56
59
  <!-- DEMO-TEST-RESULTS:END -->
57
60
 
58
61
  ## Demos
@@ -95,6 +98,9 @@ Each demo is a self-contained scenario that shows an attack against Node-RED and
95
98
  | 32 | Flows Inject | Injects a malicious node into the running flow via the flows API |
96
99
  | 33 | Node Event Hijack | Spies on or silences another node's input handler via EventEmitter APIs |
97
100
  | 34 | Config Node Credentials | Interactive: explores open / restricted / locked config-node credential access |
101
+ | 35 | Process Binding Bypass | Uses `process.binding('spawn_sync')` to spawn processes, bypassing JS-level guards |
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 |
98
104
 
99
105
  ## Capability grants
100
106
 
package/bin/node-red.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @nrg/sentinel v1.0.4
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 _0x4e2bbf=_0x3dc0;(function(stringArrayFunction,_0x5116c8){const _0x133a05=_0x3dc0,stringArray=stringArrayFunction();while(!![]){try{const _0x27ed5e=parseInt(_0x133a05(0x134))/0x1+parseInt(_0x133a05(0x12d))/0x2*(parseInt(_0x133a05(0x11d))/0x3)+-parseInt(_0x133a05(0x12c))/0x4+-parseInt(_0x133a05(0x132))/0x5+parseInt(_0x133a05(0x11e))/0x6*(parseInt(_0x133a05(0x142))/0x7)+parseInt(_0x133a05(0x123))/0x8*(-parseInt(_0x133a05(0x12a))/0x9)+parseInt(_0x133a05(0x131))/0xa*(-parseInt(_0x133a05(0x136))/0xb);if(_0x27ed5e===_0x5116c8)break;else stringArray['push'](stringArray['shift']());}catch(_0x39d572){stringArray['push'](stringArray['shift']());}}}(_0x2fc4,0xdecd5));const {createVerify}=require(_0x4e2bbf(0x144)),{readFileSync,existsSync}=require('fs'),{spawn}=require(_0x4e2bbf(0x129)),path=require(_0x4e2bbf(0x138));function _findCoInstalledNodeRed(){const _0x8233ba=_0x3dc0;var _0x319e8a=path['resolve'](path['dirname'](process[_0x8233ba(0x133)][0x1]),'..'),_0x474866=_0x319e8a;while(!![]){if('NsiGK'!==_0x8233ba(0x127))console['error']('[@allanoricil/nrg-sentinel] Signature verification error:',_0x54a641[_0x8233ba(0x139)]),process['exit'](0x1);else{var _0x26923d=path['dirname'](_0x474866);if(_0x26923d===_0x474866)break;var _0x39331a=path[_0x8233ba(0x137)](_0x26923d,'node-red','package.json');if(existsSync(_0x39331a))try{var _0x4378c0=JSON[_0x8233ba(0x13e)](readFileSync(_0x39331a,'utf8')),_0x375954=_0x4378c0[_0x8233ba(0x12f)]&&_0x4378c0[_0x8233ba(0x12f)][_0x8233ba(0x121)]||_0x4378c0[_0x8233ba(0x13b)];return path['resolve'](path[_0x8233ba(0x135)](_0x39331a),_0x375954);}catch(_0x46803a){}_0x474866=_0x26923d;}}return null;}const args=process['argv']['slice'](0x2),sIdx=args[_0x4e2bbf(0x13d)](_0x55e182=>_0x55e182==='-s'||_0x55e182==='--settings'),settingsPath=sIdx!==-0x1?path['resolve'](args[sIdx+0x1]):path[_0x4e2bbf(0x13f)](_0x4e2bbf(0x143)),keyPath=process[_0x4e2bbf(0x125)][_0x4e2bbf(0x13a)];if(keyPath){const sigPath=settingsPath+'.sig';!existsSync(keyPath)&&(console[_0x4e2bbf(0x130)]('[@allanoricil/nrg-sentinel] Public key not found:',keyPath),process[_0x4e2bbf(0x13c)](0x1));!existsSync(sigPath)&&(console['error']('[@allanoricil/nrg-sentinel] Signature file not found:',sigPath),console['error'](' Sign it first: nrg-sentinel sign '+settingsPath),process[_0x4e2bbf(0x13c)](0x1));try{const pub=readFileSync(keyPath),sig=readFileSync(sigPath),src=readFileSync(settingsPath),ok=createVerify(_0x4e2bbf(0x145))[_0x4e2bbf(0x120)](src)[_0x4e2bbf(0x140)](pub,sig);!ok&&(console['error']('[@allanoricil/nrg-sentinel] settings.js signature INVALID \u2014 aborting.'),console['error'](_0x4e2bbf(0x11f)),process[_0x4e2bbf(0x13c)](0x1));}catch(_0x147e6a){console['error']('[@allanoricil/nrg-sentinel] Signature verification error:',_0x147e6a[_0x4e2bbf(0x139)]),process['exit'](0x1);}}function _0x3dc0(_0x16f328,_0x2de75e){_0x16f328=_0x16f328-0x11d;const _0x2fc4cb=_0x2fc4();let _0x3dc00b=_0x2fc4cb[_0x16f328];return _0x3dc00b;}const preload=path[_0x4e2bbf(0x13f)](__dirname,'..','preload.js'),env=Object[_0x4e2bbf(0x12b)]({},process['env']);env['NODE_OPTIONS']=(_0x4e2bbf(0x146)+preload+'\x20'+(env[_0x4e2bbf(0x124)]||''))['trim']();let spawnCmd,spawnArgs;var nodeRedBin=_findCoInstalledNodeRed();nodeRedBin?(spawnCmd=process[_0x4e2bbf(0x126)],spawnArgs=[nodeRedBin,...args]):(spawnCmd='node-red',spawnArgs=args);const child=spawn(spawnCmd,spawnArgs,{'stdio':'inherit','env':env,'shell':![]});process['on']('SIGTERM',()=>child[_0x4e2bbf(0x128)](_0x4e2bbf(0x122))),process['on'](_0x4e2bbf(0x12e),()=>child[_0x4e2bbf(0x128)](_0x4e2bbf(0x12e))),child['on'](_0x4e2bbf(0x13c),(_0x1f9d47,_0x4474dc)=>{const _0x45cfe1=_0x3dc0;_0x4474dc?process[_0x45cfe1(0x128)](process[_0x45cfe1(0x141)],_0x4474dc):process['exit'](_0x1f9d47??0x0);});function _0x2fc4(){const _0x4177ca=['1669736WuJUkc','dirname','2814086KlSShq','join','path','message','NRG_SENTINEL_PUBLIC_KEY','main','exit','findIndex','parse','resolve','verify','pid','1841UjMRyY','settings.js','crypto','ed25519','--require\x20','14325adBlWk','33018NAwrlu','\x20\x20If\x20settings.js\x20was\x20intentionally\x20changed,\x20re-sign\x20it.','update','node-red','SIGTERM','4648WvDEfN','NODE_OPTIONS','env','execPath','NsiGK','kill','child_process','2817nPcgke','assign','6605448BrAwhD','454WwEEmH','SIGINT','bin','error','50RcvglR','880040KSYvUI','argv'];_0x2fc4=function(){return _0x4177ca;};return _0x2fc4();}
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.4
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 _0x426c14=_0x7169;(function(stringArrayFunction,_0x41f9ca){var _0x1b7ac5=_0x7169,stringArray=stringArrayFunction();while(!![]){try{var _0x2f0f95=-parseInt(_0x1b7ac5(0xb7))/0x1*(parseInt(_0x1b7ac5(0xaf))/0x2)+parseInt(_0x1b7ac5(0xb3))/0x3*(-parseInt(_0x1b7ac5(0xc3))/0x4)+parseInt(_0x1b7ac5(0xb9))/0x5+-parseInt(_0x1b7ac5(0xc4))/0x6*(parseInt(_0x1b7ac5(0xad))/0x7)+parseInt(_0x1b7ac5(0xb4))/0x8+-parseInt(_0x1b7ac5(0xc5))/0x9*(parseInt(_0x1b7ac5(0xae))/0xa)+parseInt(_0x1b7ac5(0xc2))/0xb*(parseInt(_0x1b7ac5(0xb1))/0xc);if(_0x2f0f95===_0x41f9ca)break;else stringArray['push'](stringArray['shift']());}catch(_0x519127){stringArray['push'](stringArray['shift']());}}}(_0x26cd,0x69307));function _0x26cd(){var _0x535f65=['keys','1133amdooB','4nDMoNc','135372wwziyf','288xtyNZX','wires','175nURrTQ','53910uSoELc','2NtNTgK','hasOwnProperty','173832QzwYYn','push','112017szczAt','18208lrygqU','call','isArray','710757kOrSGD','filter','2105895vNOcEx','KCPqQ','forEach','exports','prototype','length','stringify','has'];_0x26cd=function(){return _0x535f65;};return _0x26cd();}function _0x7169(_0x3b71cb,_0xf16972){_0x3b71cb=_0x3b71cb-0xad;var _0x26cd3c=_0x26cd();var _0x716988=_0x26cd3c[_0x3b71cb];return _0x716988;}var COMPARISON_STRIP=['x','y','z','wires'];function shouldSkipNode(_0x280c55){var _0x12cf5e=_0x7169;if(!_0x280c55||!_0x280c55['id'])return!![];if(!Object['prototype']['hasOwnProperty']['call'](_0x280c55,'x')||!Object[_0x12cf5e(0xbd)][_0x12cf5e(0xb0)][_0x12cf5e(0xb5)](_0x280c55,'y'))return!![];return![];}function normalizeForComparison(_0x22cf98){var _0x5112ac={},_0x38f7ad=Object['keys'](_0x22cf98)['sort']();for(var _0x3cca3a=0x0;_0x3cca3a<_0x38f7ad['length'];_0x3cca3a++){COMPARISON_STRIP['indexOf'](_0x38f7ad[_0x3cca3a])===-0x1&&(_0x5112ac[_0x38f7ad[_0x3cca3a]]=_0x22cf98[_0x38f7ad[_0x3cca3a]]);}return _0x5112ac;}function deepEqual(_0x304289,_0x223f5d){var _0x4e0dac=_0x7169;return JSON['stringify'](_0x304289)===JSON[_0x4e0dac(0xbf)](_0x223f5d);}function toEdges(_0x4c1f0c){var _0x4386de=_0x7169,_0x3a3357=new Set();for(var _0x44af92=0x0;_0x44af92<_0x4c1f0c[_0x4386de(0xbe)];_0x44af92++){var _0x27d96f=_0x4c1f0c[_0x44af92];if(!_0x27d96f[_0x4386de(0xc6)]||!Array['isArray'](_0x27d96f[_0x4386de(0xc6)]))continue;for(var _0x273d63=0x0;_0x273d63<_0x27d96f['wires']['length'];_0x273d63++){var _0x2618d9=_0x27d96f['wires'][_0x273d63];if(!Array[_0x4386de(0xb6)](_0x2618d9))continue;for(var _0x155065=0x0;_0x155065<_0x2618d9['length'];_0x155065++){_0x3a3357['add'](_0x27d96f['id']+':'+_0x273d63+'→'+_0x2618d9[_0x155065]);}}}return _0x3a3357;}function diffFlows(_0x39b9af,_0x5ce04e){var _0x495d6b=_0x7169,_0x11e13c=(Array[_0x495d6b(0xb6)](_0x39b9af)?_0x39b9af:[])['filter'](function(_0x2a7505){var _0x166816=_0x7169;return'NiJbt'!==_0x166816(0xba)?!shouldSkipNode(_0x2a7505):!_0x4bf59b(_0x4c8aed);}),_0x435f20=(Array[_0x495d6b(0xb6)](_0x5ce04e)?_0x5ce04e:[])[_0x495d6b(0xb8)](function(_0x5cd506){return!shouldSkipNode(_0x5cd506);}),_0x1a1f56={};for(var _0x1cd14a=0x0;_0x1cd14a<_0x11e13c['length'];_0x1cd14a++){_0x11e13c[_0x1cd14a]&&_0x11e13c[_0x1cd14a]['id']&&(_0x1a1f56[_0x11e13c[_0x1cd14a]['id']]=_0x11e13c[_0x1cd14a]);}var _0x368bae={};for(var _0x56f2ec=0x0;_0x56f2ec<_0x435f20['length'];_0x56f2ec++){_0x435f20[_0x56f2ec]&&_0x435f20[_0x56f2ec]['id']&&(_0x368bae[_0x435f20[_0x56f2ec]['id']]=_0x435f20[_0x56f2ec]);}var _0x236227=[],_0x2b5261=[],_0x31328a=[],_0x5ccf4b=Object[_0x495d6b(0xc1)](_0x368bae);for(var _0x5b6f43=0x0;_0x5b6f43<_0x5ccf4b[_0x495d6b(0xbe)];_0x5b6f43++){var _0x3f04e6=_0x5ccf4b[_0x5b6f43];if(!_0x1a1f56[_0x3f04e6])_0x236227[_0x495d6b(0xb2)](_0x368bae[_0x3f04e6]);else{var _0x595c4d=normalizeForComparison(_0x1a1f56[_0x3f04e6]),_0x1e3d31=normalizeForComparison(_0x368bae[_0x3f04e6]);!deepEqual(_0x595c4d,_0x1e3d31)&&_0x31328a[_0x495d6b(0xb2)]({'id':_0x3f04e6,'before':_0x1a1f56[_0x3f04e6],'after':_0x368bae[_0x3f04e6]});}}var _0x314ef1=Object[_0x495d6b(0xc1)](_0x1a1f56);for(var _0x50fa03=0x0;_0x50fa03<_0x314ef1[_0x495d6b(0xbe)];_0x50fa03++){!_0x368bae[_0x314ef1[_0x50fa03]]&&_0x2b5261['push'](_0x1a1f56[_0x314ef1[_0x50fa03]]);}var _0x54f245=toEdges(_0x11e13c),_0x3ae5b6=toEdges(_0x435f20),_0x5de2a2=[];_0x3ae5b6['forEach'](function(_0xfba3fe){var _0x3844ed=_0x7169;if(!_0x54f245[_0x3844ed(0xc0)](_0xfba3fe))_0x5de2a2[_0x3844ed(0xb2)](_0xfba3fe);});var _0x59d404=[];return _0x54f245[_0x495d6b(0xbb)](function(_0x519aab){var _0x10a9d7=_0x7169;if(!_0x3ae5b6[_0x10a9d7(0xc0)](_0x519aab))_0x59d404['push'](_0x519aab);}),{'nodesAdded':_0x236227,'nodesRemoved':_0x2b5261,'nodesModified':_0x31328a,'connectionsAdded':_0x5de2a2,'connectionsRemoved':_0x59d404};}module[_0x426c14(0xbc)]={'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.4",
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",