@sparrowai/sparrow-mcp 1.1.11 → 1.1.13
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/dist/.tsbuildinfo +1 -1
- package/dist/scripts/mcp-test/mcp-client.js +1 -1
- package/dist/scripts/test-runner/check-failed-tests.js +1 -1
- package/dist/scripts/test-runner/compare-responses.js +1 -1
- package/dist/scripts/test-runner/standalone-test-fixed-header.js +1 -1
- package/dist/scripts/test-runner/standalone-test.js +1 -1
- package/dist/src/config/appConfig.js +1 -1
- package/dist/src/config/constants.js +1 -1
- package/dist/src/controllers/__tests__/analysis.controller.test.js +1 -1
- package/dist/src/controllers/__tests__/sast.controller.test.js +1 -1
- package/dist/src/controllers/__tests__/sca.controller.test.js +1 -1
- package/dist/src/controllers/__tests__/security.controller.test.js +1 -1
- package/dist/src/controllers/__tests__/system.controller.test.js +1 -1
- package/dist/src/controllers/analysis.controller.js +1 -1
- package/dist/src/controllers/sast.controller.js +1 -1
- package/dist/src/controllers/sca.controller.js +1 -1
- package/dist/src/controllers/security.controller.js +1 -1
- package/dist/src/controllers/system.controller.js +1 -1
- package/dist/src/schemas/tool.schemas.js +1 -1
- package/dist/src/server.js +1 -1
- package/dist/src/services/__tests__/analysis.remediation.spec.d.ts +1 -0
- package/dist/src/services/__tests__/analysis.remediation.spec.js +1 -0
- package/dist/src/services/__tests__/analysis.remediation.test.js +1 -1
- package/dist/src/services/__tests__/analysis.service.sca.test.js +1 -1
- package/dist/src/services/__tests__/analysis.service.test.js +1 -1
- package/dist/src/services/__tests__/checker.service.test.js +1 -1
- package/dist/src/services/__tests__/llm.service.test.js +1 -1
- package/dist/src/services/__tests__/s3.service.test.js +1 -1
- package/dist/src/services/__tests__/sparrow.service.test.js +1 -1
- package/dist/src/services/analysis.service.js +1 -1
- package/dist/src/services/checker.service.js +1 -1
- package/dist/src/services/llm/AnthropicProvider.js +1 -1
- package/dist/src/services/llm/BedrockProvider.js +1 -1
- package/dist/src/services/llm/GeminiProvider.js +1 -1
- package/dist/src/services/llm/LLMFactory.js +1 -1
- package/dist/src/services/llm/LLMProvider.js +1 -1
- package/dist/src/services/llm/OllamaProvider.js +1 -1
- package/dist/src/services/llm/OpenAIProvider.js +1 -1
- package/dist/src/services/llm.service.js +1 -1
- package/dist/src/services/s3.service.js +1 -1
- package/dist/src/services/sparrow.service.js +1 -1
- package/dist/src/types/types.js +1 -1
- package/dist/src/utils/__tests__/crypto.util.test.js +1 -1
- package/dist/src/utils/__tests__/diff.util.test.js +1 -1
- package/dist/src/utils/__tests__/fileManager.test.js +1 -1
- package/dist/src/utils/__tests__/fileManagerSecure.test.js +1 -1
- package/dist/src/utils/__tests__/logger.test.js +1 -1
- package/dist/src/utils/crypto.util.js +1 -1
- package/dist/src/utils/diff.util.js +1 -1
- package/dist/src/utils/fileManager.js +1 -1
- package/dist/src/utils/fileManagerSecure.js +1 -1
- package/dist/src/utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function a9_0x1ba9(_0x555e94,_0x292112){_0x555e94=_0x555e94-0xf4;const _0x41a611=a9_0x5681();let _0x10a9f8=_0x41a611[_0x555e94];return _0x10a9f8;}const a9_0x5c65d2=a9_0x1ba9;(function(_0x5e54de,_0x11d6a7){const _0x441839=a9_0x1ba9,_0x5894ac=_0x5e54de();while(!![]){try{const _0x546d9d=-parseInt(_0x441839(0x138))/0x1+parseInt(_0x441839(0xfd))/0x2+parseInt(_0x441839(0x11c))/0x3+-parseInt(_0x441839(0x13f))/0x4*(-parseInt(_0x441839(0x15d))/0x5)+-parseInt(_0x441839(0xfc))/0x6+parseInt(_0x441839(0x10b))/0x7*(parseInt(_0x441839(0x131))/0x8)+parseInt(_0x441839(0xfe))/0x9*(-parseInt(_0x441839(0x147))/0xa);if(_0x546d9d===_0x11d6a7)break;else _0x5894ac['push'](_0x5894ac['shift']());}catch(_0x3b7649){_0x5894ac['push'](_0x5894ac['shift']());}}}(a9_0x5681,0xf000a));const a9_0x308f56=(function(){let _0x70bd8e=!![];return function(_0x25a358,_0x4236ab){const _0x23c429=_0x70bd8e?function(){const _0x210cab=a9_0x1ba9;if(_0x4236ab){const _0x22388b=_0x4236ab[_0x210cab(0x12c)](_0x25a358,arguments);return _0x4236ab=null,_0x22388b;}}:function(){};return _0x70bd8e=![],_0x23c429;};}()),a9_0x10a9f8=a9_0x308f56(this,function(){const _0x4d7704=a9_0x1ba9;return a9_0x10a9f8[_0x4d7704(0x10d)]()['search'](_0x4d7704(0x13a)+'+$')[_0x4d7704(0x10d)]()['constructo'+'r'](a9_0x10a9f8)[_0x4d7704(0x114)](_0x4d7704(0x13a)+'+$');});function a9_0x5681(){const _0x52348f=['s\x20failed:','Single\x20fil','ror','content','No\x20SBOM\x20fi','e\x20SCA\x20anal','analysisId','\x20SCA\x20analy','files','ed.','for\x20analys','ided','info','ully:\x0a','is\x20ID:\x20','th.','analysisTy','analyzeFil','is\x20request','ysis\x20reque','7270iVfwLe','\x20not\x20provi','File\x20paths','\x20requires\x20','trim','Unknown\x20er','map','\x20paths:\x20','CA\x20analysi','h\x20not\x20prov','RiSKD','yQdRr','No\x20files\x20t','join','structured','4889478uYbkSL','1012564NWqZjF','12114567AgyVaH','ZIP\x20file\x20p','analysisSe','Folder\x20pat','Folder\x20SCA','les\x20found\x20','at\x20least\x20o','\x20failed:\x20','status','\x20downloade','download\x20S','Multi-file','\x0aAnalysis\x20','334516OImMja','\x20The\x20fileP','toString','s\x20requeste','isError','text','length','Sca','sted:\x20','search','ID:\x20','Content','):\x20','LvDco','SBOM\x20files','aths\x20array','xpduf','3185907WPGhQh','Type:\x20','error','is\x20has\x20sta','Failed\x20to\x20','not\x20provid','folders\x20(','ovided.','mhgTm','ysis\x20faile','derSca','ZIP\x20file\x20S','failed:','BOM\x20files:','\x20file\x20path','rvice','apply','er:\x20','ders','message','skippedFol','296audeqT','analyzeFol','zipFilePat','er\x20of\x20file','ne\x20file\x20pa','rted.\x0aFile','requested:','1451545FCNhtx','d:\x20','(((.+)+)+)','analyzeZip','\x20analysis\x20','d\x20successf','\x0aStatus:\x20','3464kBgfYN','SCA\x20analys','type','sis\x20failed','o\x20analyze.','eSca','ided.','rted.\x0aNumb','10wwlIyF','folderPath'];a9_0x5681=function(){return _0x52348f;};return a9_0x5681();}a9_0x10a9f8();import{logger}from'../utils/logger.js';export class ScaController{[a9_0x5c65d2(0x100)+a9_0x5c65d2(0x12b)];constructor(_0x1fdc71){const _0x3c39b6=a9_0x5c65d2;this[_0x3c39b6(0x100)+_0x3c39b6(0x12b)]=_0x1fdc71;}async[a9_0x5c65d2(0x15a)+a9_0x5c65d2(0x144)]({filePath:_0x36e5d9,zipFileName:_0x1f0b76,memo:_0x323cd4,isSbom:_0x1a6731}){const _0x47eaf7=a9_0x5c65d2,_0x5dbc3d={};_0x5dbc3d[_0x47eaf7(0xf8)]=_0x47eaf7(0x110);const _0x129979=_0x5dbc3d;try{if(!_0x36e5d9||_0x36e5d9[_0x47eaf7(0x161)]()[_0x47eaf7(0x111)]===0x0){const _0x1d68a4={};_0x1d68a4[_0x47eaf7(0x141)]=_0x47eaf7(0x110),_0x1d68a4[_0x47eaf7(0x110)]='File\x20path\x20'+'not\x20provid'+_0x47eaf7(0x152);const _0x50bd1a={};_0x50bd1a[_0x47eaf7(0x11e)]='File\x20path\x20'+_0x47eaf7(0x121)+'ed';const _0xc4e3be={};return _0xc4e3be[_0x47eaf7(0x14c)]=[_0x1d68a4],_0xc4e3be[_0x47eaf7(0xfb)+_0x47eaf7(0x116)]=_0x50bd1a,_0xc4e3be;}logger[_0x47eaf7(0x155)]('Single\x20fil'+_0x47eaf7(0x14e)+_0x47eaf7(0x15c)+_0x47eaf7(0x113)+_0x36e5d9);const _0x47cfe5=await this[_0x47eaf7(0x100)+'rvice']['analyzeFil'+_0x47eaf7(0x144)](_0x36e5d9,_0x1f0b76,_0x323cd4,_0x1a6731),_0xf3735e=_0x47eaf7(0x140)+_0x47eaf7(0x11f)+_0x47eaf7(0x136)+':\x20'+_0x36e5d9+(_0x47eaf7(0x10a)+_0x47eaf7(0x115))+_0x47cfe5[_0x47eaf7(0x14f)]+_0x47eaf7(0x13e)+_0x47cfe5[_0x47eaf7(0x106)]+(_0x47eaf7(0x10a)+_0x47eaf7(0x11d))+_0x47cfe5[_0x47eaf7(0x159)+'pe'],_0x4d5df9={};_0x4d5df9[_0x47eaf7(0x141)]=_0x47eaf7(0x110),_0x4d5df9[_0x47eaf7(0x110)]=_0xf3735e;const _0x8dc2f6={};_0x8dc2f6[_0x47eaf7(0x14f)]=_0x47cfe5[_0x47eaf7(0x14f)],_0x8dc2f6[_0x47eaf7(0x106)]=_0x47cfe5[_0x47eaf7(0x106)],_0x8dc2f6['filePath']=_0x36e5d9,_0x8dc2f6['analysisTy'+'pe']=_0x47cfe5[_0x47eaf7(0x159)+'pe'];const _0x1bf407={};return _0x1bf407[_0x47eaf7(0x14c)]=[_0x4d5df9],_0x1bf407[_0x47eaf7(0xfb)+_0x47eaf7(0x116)]=_0x8dc2f6,_0x1bf407;}catch(_0x2a65fb){logger[_0x47eaf7(0x11e)](_0x47eaf7(0x14a)+'e\x20SCA\x20anal'+_0x47eaf7(0x125)+'d:',_0x2a65fb);const _0x89d272={};_0x89d272[_0x47eaf7(0x141)]=_0x129979[_0x47eaf7(0xf8)],_0x89d272[_0x47eaf7(0x110)]='SCA\x20analys'+_0x47eaf7(0x15b)+_0x47eaf7(0x105)+(_0x2a65fb instanceof Error?_0x2a65fb['message']:_0x47eaf7(0x162)+_0x47eaf7(0x14b));const _0x5e52b2={};_0x5e52b2[_0x47eaf7(0x11e)]=_0x2a65fb instanceof Error?_0x2a65fb[_0x47eaf7(0x12f)]:_0x47eaf7(0x162)+_0x47eaf7(0x14b);const _0x415d21={};return _0x415d21[_0x47eaf7(0x14c)]=[_0x89d272],_0x415d21[_0x47eaf7(0xfb)+'Content']=_0x5e52b2,_0x415d21;}}async[a9_0x5c65d2(0x15a)+'esSca']({filePaths:_0x57ec54,zipFileName:_0x16c8d8,memo:_0xefd372,isSbom:_0x4cec6d}){const _0x4bf0be=a9_0x5c65d2,_0x3a1ab8={};_0x3a1ab8[_0x4bf0be(0x11b)]=_0x4bf0be(0x110);const _0x31a4ac=_0x3a1ab8;try{if(!_0x57ec54||_0x57ec54[_0x4bf0be(0x111)]===0x0){const _0x27e7c5={};_0x27e7c5['type']=_0x4bf0be(0x110),_0x27e7c5['text']=_0x4bf0be(0xf9)+_0x4bf0be(0x143)+_0x4bf0be(0x10c)+_0x4bf0be(0x11a)+_0x4bf0be(0x160)+_0x4bf0be(0x104)+_0x4bf0be(0x135)+_0x4bf0be(0x158);const _0xa7af29={};_0xa7af29[_0x4bf0be(0x11e)]=_0x4bf0be(0x15f)+_0x4bf0be(0x15e)+'ded';const _0x15ed17={};return _0x15ed17['content']=[_0x27e7c5],_0x15ed17[_0x4bf0be(0xfb)+_0x4bf0be(0x116)]=_0xa7af29,_0x15ed17;}logger[_0x4bf0be(0x155)](_0x4bf0be(0x109)+_0x4bf0be(0x150)+'sis\x20reques'+'ted:\x20'+_0x57ec54[_0x4bf0be(0x111)]+(_0x4bf0be(0x12a)+'s'));const _0x3d78dc=await this[_0x4bf0be(0x100)+'rvice'][_0x4bf0be(0x15a)+'esSca'](_0x57ec54,_0x16c8d8,_0xefd372,_0x4cec6d),_0x5002c6=_0x4bf0be(0x140)+_0x4bf0be(0x11f)+_0x4bf0be(0x146)+_0x4bf0be(0x134)+_0x4bf0be(0xf4)+_0x57ec54['length']+(_0x4bf0be(0x10a)+_0x4bf0be(0x115))+_0x3d78dc[_0x4bf0be(0x14f)]+_0x4bf0be(0x13e)+_0x3d78dc[_0x4bf0be(0x106)]+(_0x4bf0be(0x10a)+'Type:\x20')+_0x3d78dc[_0x4bf0be(0x159)+'pe'],_0x1f4018={};_0x1f4018[_0x4bf0be(0x141)]=_0x31a4ac[_0x4bf0be(0x11b)],_0x1f4018[_0x4bf0be(0x110)]=_0x5002c6;const _0xd6e2ac={};_0xd6e2ac[_0x4bf0be(0x14f)]=_0x3d78dc[_0x4bf0be(0x14f)],_0xd6e2ac[_0x4bf0be(0x106)]=_0x3d78dc[_0x4bf0be(0x106)],_0xd6e2ac['filePathCo'+'unt']=_0x57ec54[_0x4bf0be(0x111)],_0xd6e2ac[_0x4bf0be(0x159)+'pe']=_0x3d78dc['analysisTy'+'pe'];const _0x4a9c2a={};return _0x4a9c2a[_0x4bf0be(0x14c)]=[_0x1f4018],_0x4a9c2a[_0x4bf0be(0xfb)+_0x4bf0be(0x116)]=_0xd6e2ac,_0x4a9c2a;}catch(_0x553f8b){logger[_0x4bf0be(0x11e)]('Multi-file'+'\x20SCA\x20analy'+_0x4bf0be(0x142)+':',_0x553f8b);const _0x5ea862={};_0x5ea862[_0x4bf0be(0x141)]='text',_0x5ea862['text']=_0x4bf0be(0x140)+_0x4bf0be(0x15b)+_0x4bf0be(0x105)+(_0x553f8b instanceof Error?_0x553f8b[_0x4bf0be(0x12f)]:'Unknown\x20er'+_0x4bf0be(0x14b));const _0x2848d5={};_0x2848d5[_0x4bf0be(0x11e)]=_0x553f8b instanceof Error?_0x553f8b[_0x4bf0be(0x12f)]:_0x4bf0be(0x162)+_0x4bf0be(0x14b);const _0x3647a9={};return _0x3647a9['content']=[_0x5ea862],_0x3647a9[_0x4bf0be(0xfb)+'Content']=_0x2848d5,_0x3647a9;}}async[a9_0x5c65d2(0x132)+a9_0x5c65d2(0x126)]({folderPath:_0x2dea66,zipFileName:_0x4de4f2,memo:_0x8de1c,isSbom:_0x38e015}){const _0x5b30e5=a9_0x5c65d2,_0x35bbf9={};_0x35bbf9['LvDco']=_0x5b30e5(0x110),_0x35bbf9['RiSKD']=function(_0x429434,_0x2b02e9){return _0x429434 instanceof _0x2b02e9;};const _0x53eb79=_0x35bbf9;try{if(!_0x2dea66||_0x2dea66['trim']()[_0x5b30e5(0x111)]===0x0){const _0x393a26={};_0x393a26[_0x5b30e5(0x141)]=_0x53eb79[_0x5b30e5(0x118)],_0x393a26[_0x5b30e5(0x110)]=_0x5b30e5(0x101)+_0x5b30e5(0xf6)+_0x5b30e5(0x145);const _0x18f1ea={};_0x18f1ea[_0x5b30e5(0x11e)]='Folder\x20pat'+_0x5b30e5(0xf6)+_0x5b30e5(0x154);const _0x59998b={};return _0x59998b[_0x5b30e5(0x14c)]=[_0x393a26],_0x59998b['structured'+_0x5b30e5(0x116)]=_0x18f1ea,_0x59998b;}logger[_0x5b30e5(0x155)](_0x5b30e5(0x102)+'\x20analysis\x20'+'requested:'+'\x20'+_0x2dea66);const _0x59ecbd=await this[_0x5b30e5(0x100)+_0x5b30e5(0x12b)]['analyzeFol'+_0x5b30e5(0x126)](_0x2dea66,_0x4de4f2,_0x8de1c,_0x38e015);let _0x2d05c2=_0x5b30e5(0x140)+_0x5b30e5(0x11f)+'rted.\x0aFold'+_0x5b30e5(0x12d)+_0x2dea66+('\x0aAnalysis\x20'+'ID:\x20')+_0x59ecbd[_0x5b30e5(0x14f)]+_0x5b30e5(0x13e)+_0x59ecbd[_0x5b30e5(0x106)]+(_0x5b30e5(0x10a)+_0x5b30e5(0x11d))+_0x59ecbd['analysisTy'+'pe'];_0x59ecbd[_0x5b30e5(0x130)+_0x5b30e5(0x12e)]&&_0x59ecbd['skippedFol'+_0x5b30e5(0x12e)][_0x5b30e5(0x111)]>0x0&&(_0x2d05c2+='\x0a\x0aSkipped\x20'+_0x5b30e5(0x122)+_0x59ecbd[_0x5b30e5(0x130)+_0x5b30e5(0x12e)]['length']+_0x5b30e5(0x117)+_0x59ecbd[_0x5b30e5(0x130)+'ders'][_0x5b30e5(0xfa)](',\x20'));const _0x356613={};_0x356613[_0x5b30e5(0x141)]=_0x53eb79[_0x5b30e5(0x118)],_0x356613[_0x5b30e5(0x110)]=_0x2d05c2;const _0x5d06e3={};_0x5d06e3[_0x5b30e5(0x14f)]=_0x59ecbd[_0x5b30e5(0x14f)],_0x5d06e3[_0x5b30e5(0x106)]=_0x59ecbd['status'],_0x5d06e3[_0x5b30e5(0x148)]=_0x2dea66,_0x5d06e3[_0x5b30e5(0x159)+'pe']=_0x59ecbd['analysisTy'+'pe'],_0x5d06e3['skippedFol'+'ders']=_0x59ecbd['skippedFol'+'ders'];const _0x5a8ffe={};return _0x5a8ffe[_0x5b30e5(0x14c)]=[_0x356613],_0x5a8ffe[_0x5b30e5(0xfb)+_0x5b30e5(0x116)]=_0x5d06e3,_0x5a8ffe;}catch(_0x2c9343){logger[_0x5b30e5(0x11e)](_0x5b30e5(0x102)+_0x5b30e5(0x13c)+_0x5b30e5(0x128),_0x2c9343);const _0x24a9f3={};return _0x24a9f3[_0x5b30e5(0x141)]=_0x53eb79[_0x5b30e5(0x118)],_0x24a9f3[_0x5b30e5(0x110)]=_0x5b30e5(0x140)+_0x5b30e5(0x15b)+_0x5b30e5(0x105)+(_0x2c9343 instanceof Error?_0x2c9343['message']:_0x5b30e5(0x162)+_0x5b30e5(0x14b)),{'content':[_0x24a9f3],'structuredContent':{'error':_0x53eb79[_0x5b30e5(0xf7)](_0x2c9343,Error)?_0x2c9343[_0x5b30e5(0x12f)]:'Unknown\x20er'+_0x5b30e5(0x14b)}};}}async[a9_0x5c65d2(0x13b)+a9_0x5c65d2(0x112)]({zipFilePath:_0x3b4ba7,zipFileName:_0x50a921,memo:_0x57482e,isSbom:_0x5cc33b}){const _0x2757ea=a9_0x5c65d2,_0x391cea={};_0x391cea[_0x2757ea(0x124)]=_0x2757ea(0x110);const _0x45c861=_0x391cea;try{if(!_0x3b4ba7||_0x3b4ba7[_0x2757ea(0x161)]()['length']===0x0){const _0x116391={};_0x116391[_0x2757ea(0x141)]=_0x45c861[_0x2757ea(0x124)],_0x116391[_0x2757ea(0x110)]='ZIP\x20file\x20p'+'ath\x20not\x20pr'+_0x2757ea(0x123);const _0xdd617d={};_0xdd617d[_0x2757ea(0x11e)]=_0x2757ea(0xff)+'ath\x20not\x20pr'+'ovided';const _0x4e277c={};return _0x4e277c[_0x2757ea(0x14c)]=[_0x116391],_0x4e277c[_0x2757ea(0xfb)+_0x2757ea(0x116)]=_0xdd617d,_0x4e277c;}logger[_0x2757ea(0x155)](_0x2757ea(0x127)+_0x2757ea(0xf5)+_0x2757ea(0x10e)+_0x2757ea(0x139)+_0x3b4ba7);const _0x40a810=await this[_0x2757ea(0x100)+_0x2757ea(0x12b)][_0x2757ea(0x13b)+_0x2757ea(0x112)](_0x3b4ba7,_0x50a921,_0x57482e,_0x5cc33b),_0x3e2e6a=_0x2757ea(0x140)+_0x2757ea(0x11f)+'rted.\x0aZIP\x20'+'File:\x20'+_0x3b4ba7+('\x0aAnalysis\x20'+_0x2757ea(0x115))+_0x40a810[_0x2757ea(0x14f)]+'\x0aStatus:\x20'+_0x40a810['status']+(_0x2757ea(0x10a)+'Type:\x20')+_0x40a810[_0x2757ea(0x159)+'pe'],_0x181133={};_0x181133[_0x2757ea(0x141)]=_0x2757ea(0x110),_0x181133[_0x2757ea(0x110)]=_0x3e2e6a;const _0x2e345a={};_0x2e345a[_0x2757ea(0x14f)]=_0x40a810['analysisId'],_0x2e345a[_0x2757ea(0x106)]=_0x40a810['status'],_0x2e345a[_0x2757ea(0x133)+'h']=_0x3b4ba7,_0x2e345a[_0x2757ea(0x159)+'pe']=_0x40a810[_0x2757ea(0x159)+'pe'];const _0x1bb00a={};return _0x1bb00a['content']=[_0x181133],_0x1bb00a[_0x2757ea(0xfb)+_0x2757ea(0x116)]=_0x2e345a,_0x1bb00a;}catch(_0xa16be7){logger[_0x2757ea(0x11e)](_0x2757ea(0x127)+_0x2757ea(0xf5)+_0x2757ea(0x149),_0xa16be7);const _0x2857f5={};_0x2857f5[_0x2757ea(0x141)]=_0x2757ea(0x110),_0x2857f5[_0x2757ea(0x110)]='SCA\x20analys'+'is\x20request'+'\x20failed:\x20'+(_0xa16be7 instanceof Error?_0xa16be7[_0x2757ea(0x12f)]:_0x2757ea(0x162)+_0x2757ea(0x14b));const _0x361c4b={};_0x361c4b[_0x2757ea(0x11e)]=_0xa16be7 instanceof Error?_0xa16be7[_0x2757ea(0x12f)]:_0x2757ea(0x162)+_0x2757ea(0x14b);const _0x1473ff={};return _0x1473ff[_0x2757ea(0x14c)]=[_0x2857f5],_0x1473ff['structured'+_0x2757ea(0x116)]=_0x361c4b,_0x1473ff;}}async['downloadSb'+'omFiles']({analysisId:_0x11cbe2}){const _0xfc1aa1=a9_0x5c65d2;try{logger['info']('SBOM\x20files'+'\x20download\x20'+_0xfc1aa1(0x137)+'\x20'+_0x11cbe2);const _0x6ff858=await this[_0xfc1aa1(0x100)+_0xfc1aa1(0x12b)]['downloadSb'+'omFiles'](_0x11cbe2);if(_0x6ff858[_0xfc1aa1(0x111)]===0x0){const _0xa318af={};_0xa318af[_0xfc1aa1(0x141)]=_0xfc1aa1(0x110),_0xa318af[_0xfc1aa1(0x110)]=_0xfc1aa1(0x14d)+_0xfc1aa1(0x103)+_0xfc1aa1(0x153)+_0xfc1aa1(0x157)+_0x11cbe2;const _0xbcdba7={};_0xbcdba7['analysisId']=_0x11cbe2,_0xbcdba7[_0xfc1aa1(0x151)]=[];const _0x20caa7={};return _0x20caa7[_0xfc1aa1(0x14c)]=[_0xa318af],_0x20caa7[_0xfc1aa1(0xfb)+_0xfc1aa1(0x116)]=_0xbcdba7,_0x20caa7;}const _0x3fde97=_0x6ff858[_0xfc1aa1(0x163)](_0x30c482=>'-\x20'+_0x30c482)['join']('\x0a'),_0x5d8a41={};_0x5d8a41[_0xfc1aa1(0x141)]=_0xfc1aa1(0x110),_0x5d8a41[_0xfc1aa1(0x110)]=_0xfc1aa1(0x119)+_0xfc1aa1(0x107)+_0xfc1aa1(0x13d)+_0xfc1aa1(0x156)+_0x3fde97;const _0x1a7da8={};_0x1a7da8[_0xfc1aa1(0x14f)]=_0x11cbe2,_0x1a7da8[_0xfc1aa1(0x151)]=_0x6ff858;const _0x1f9354={};return _0x1f9354[_0xfc1aa1(0x14c)]=[_0x5d8a41],_0x1f9354[_0xfc1aa1(0xfb)+'Content']=_0x1a7da8,_0x1f9354;}catch(_0x70e242){logger[_0xfc1aa1(0x11e)](_0xfc1aa1(0x120)+_0xfc1aa1(0x108)+'BOM\x20files:',_0x70e242);const _0xffbf1={};_0xffbf1['type']='text',_0xffbf1[_0xfc1aa1(0x110)]=_0xfc1aa1(0x120)+'download\x20S'+_0xfc1aa1(0x129)+'\x20'+(_0x70e242 instanceof Error?_0x70e242[_0xfc1aa1(0x12f)]:_0xfc1aa1(0x162)+_0xfc1aa1(0x14b));const _0x1caa30={};_0x1caa30[_0xfc1aa1(0x11e)]=_0x70e242 instanceof Error?_0x70e242[_0xfc1aa1(0x12f)]:'Unknown\x20er'+_0xfc1aa1(0x14b);const _0x11b29a={};return _0x11b29a[_0xfc1aa1(0x14c)]=[_0xffbf1],_0x11b29a['structured'+_0xfc1aa1(0x116)]=_0x1caa30,_0x11b29a[_0xfc1aa1(0x10f)]=!![],_0x11b29a;}}}
|
|
1
|
+
function a9_0x296d(_0x126de9,_0x4111f4){_0x126de9=_0x126de9-0x12d;const _0x3d2aeb=a9_0x1d4c();let _0x139d65=_0x3d2aeb[_0x126de9];return _0x139d65;}const a9_0x1436cc=a9_0x296d;(function(_0x22594f,_0x508d81){const _0x15da68=a9_0x296d,_0x14c1ae=_0x22594f();while(!![]){try{const _0x3b1fa3=-parseInt(_0x15da68(0x191))/0x1*(parseInt(_0x15da68(0x171))/0x2)+parseInt(_0x15da68(0x149))/0x3+-parseInt(_0x15da68(0x163))/0x4*(parseInt(_0x15da68(0x15a))/0x5)+parseInt(_0x15da68(0x193))/0x6+-parseInt(_0x15da68(0x16e))/0x7+-parseInt(_0x15da68(0x197))/0x8*(parseInt(_0x15da68(0x180))/0x9)+-parseInt(_0x15da68(0x182))/0xa*(-parseInt(_0x15da68(0x15d))/0xb);if(_0x3b1fa3===_0x508d81)break;else _0x14c1ae['push'](_0x14c1ae['shift']());}catch(_0x3b5409){_0x14c1ae['push'](_0x14c1ae['shift']());}}}(a9_0x1d4c,0x8e5b8));const a9_0x30f6fe=(function(){let _0xaec179=!![];return function(_0x414dbb,_0x238f69){const _0x51bcb5=_0xaec179?function(){const _0x502e6f=a9_0x296d;if(_0x238f69){const _0x53eae8=_0x238f69[_0x502e6f(0x18b)](_0x414dbb,arguments);return _0x238f69=null,_0x53eae8;}}:function(){};return _0xaec179=![],_0x51bcb5;};}()),a9_0x139d65=a9_0x30f6fe(this,function(){const _0x2f0e96=a9_0x296d;return a9_0x139d65['toString']()[_0x2f0e96(0x135)](_0x2f0e96(0x18d)+'+$')[_0x2f0e96(0x18f)]()[_0x2f0e96(0x17b)+'r'](a9_0x139d65)['search']('(((.+)+)+)'+'+$');});a9_0x139d65();function a9_0x1d4c(){const _0x252725=['download\x20S','Multi-file','sis\x20reques','folders\x20(','analyzeFol','ed.','SBOM\x20files','analyzeFil','apply','Type:\x20','(((.+)+)+)','trim','toString','o\x20analyze.','17GtwEte','analysisId','3166632QyYIxC','\x20downloade','Content','):\x20','24pjziIw','files','esSca','er\x20of\x20file','ID:\x20','ovided','rvice','at\x20least\x20o','Folder\x20SCA','CA\x20analysi','omFiles','cXRJp','\x20file\x20path','search','BHiew','\x20failed:\x20','ovided.','skippedFol','rted.\x0aZIP\x20','for\x20analys','\x0aStatus:\x20','ided.','\x0aAnalysis\x20','e\x20SCA\x20anal','No\x20files\x20t','content','\x20paths:\x20','th.','BOM\x20files:','join','analysisSe','Sca','is\x20request','2576409nOulTp','folderPath','requested:','Folder\x20pat','ders','\x20requires\x20','analyzeZip','structured','\x20analysis\x20','status','File:\x20','s\x20requeste','unt','aths\x20array','text','length','ne\x20file\x20pa','5duvvRJ','File\x20paths','\x20not\x20provi','74239oPZnGa','SCA\x20analys','downloadSb','KTEJn','eSca','cDVjC','344028bBWomW','ysis\x20faile','rted.\x0aFold','Unknown\x20er','File\x20path\x20','s\x20failed:','rted.\x0aNumb','type','analysisTy','info','error','7830963nRhtne','Failed\x20to\x20','message','70002SNiTna','derSca','ath\x20not\x20pr','is\x20has\x20sta','ded','VXUtd','zipFilePat','ror','sted:\x20','ully:\x0a','constructo','Single\x20fil','not\x20provid','ZIP\x20file\x20S','\x20SCA\x20analy','1587060dcrxUz','d\x20successf','2260PnwOBz'];a9_0x1d4c=function(){return _0x252725;};return a9_0x1d4c();}import{logger}from'../utils/logger.js';export class ScaController{[a9_0x1436cc(0x146)+'rvice'];constructor(_0x407b63){const _0x2c1f16=a9_0x1436cc;this[_0x2c1f16(0x146)+_0x2c1f16(0x12e)]=_0x407b63;}async[a9_0x1436cc(0x18a)+a9_0x1436cc(0x161)]({filePath:_0x32e961,zipFileName:_0x47dde2,memo:_0xe51942,isSbom:_0x192b9b}){const _0x18e5f5=a9_0x1436cc;try{if(!_0x32e961||_0x32e961[_0x18e5f5(0x18e)]()[_0x18e5f5(0x158)]===0x0){const _0x58edd0={};_0x58edd0['type']=_0x18e5f5(0x157),_0x58edd0[_0x18e5f5(0x157)]=_0x18e5f5(0x167)+_0x18e5f5(0x17d)+_0x18e5f5(0x188);const _0xd2baa5={};_0xd2baa5[_0x18e5f5(0x16d)]=_0x18e5f5(0x167)+_0x18e5f5(0x17d)+'ed';const _0x2cf9a1={};return _0x2cf9a1[_0x18e5f5(0x141)]=[_0x58edd0],_0x2cf9a1[_0x18e5f5(0x150)+_0x18e5f5(0x195)]=_0xd2baa5,_0x2cf9a1;}logger[_0x18e5f5(0x16c)](_0x18e5f5(0x17c)+_0x18e5f5(0x13f)+'ysis\x20reque'+_0x18e5f5(0x179)+_0x32e961);const _0x346cc2=await this['analysisSe'+_0x18e5f5(0x12e)]['analyzeFil'+_0x18e5f5(0x161)](_0x32e961,_0x47dde2,_0xe51942,_0x192b9b),_0xb433e9=_0x18e5f5(0x15e)+'is\x20has\x20sta'+'rted.\x0aFile'+':\x20'+_0x32e961+(_0x18e5f5(0x13e)+_0x18e5f5(0x19b))+_0x346cc2['analysisId']+_0x18e5f5(0x13c)+_0x346cc2[_0x18e5f5(0x152)]+(_0x18e5f5(0x13e)+_0x18e5f5(0x18c))+_0x346cc2[_0x18e5f5(0x16b)+'pe'],_0x503769={};_0x503769[_0x18e5f5(0x16a)]=_0x18e5f5(0x157),_0x503769[_0x18e5f5(0x157)]=_0xb433e9;const _0x52f97b={};_0x52f97b[_0x18e5f5(0x192)]=_0x346cc2[_0x18e5f5(0x192)],_0x52f97b['status']=_0x346cc2[_0x18e5f5(0x152)],_0x52f97b['filePath']=_0x32e961,_0x52f97b[_0x18e5f5(0x16b)+'pe']=_0x346cc2[_0x18e5f5(0x16b)+'pe'];const _0x31f9eb={};return _0x31f9eb[_0x18e5f5(0x141)]=[_0x503769],_0x31f9eb[_0x18e5f5(0x150)+_0x18e5f5(0x195)]=_0x52f97b,_0x31f9eb;}catch(_0x3c410c){logger[_0x18e5f5(0x16d)](_0x18e5f5(0x17c)+_0x18e5f5(0x13f)+_0x18e5f5(0x164)+'d:',_0x3c410c);const _0x20be4b={};_0x20be4b[_0x18e5f5(0x16a)]=_0x18e5f5(0x157),_0x20be4b[_0x18e5f5(0x157)]=_0x18e5f5(0x15e)+_0x18e5f5(0x148)+_0x18e5f5(0x137)+(_0x3c410c instanceof Error?_0x3c410c[_0x18e5f5(0x170)]:_0x18e5f5(0x166)+_0x18e5f5(0x178));const _0xc105eb={};_0xc105eb['error']=_0x3c410c instanceof Error?_0x3c410c[_0x18e5f5(0x170)]:_0x18e5f5(0x166)+_0x18e5f5(0x178);const _0x5756f9={};return _0x5756f9[_0x18e5f5(0x141)]=[_0x20be4b],_0x5756f9['structured'+'Content']=_0xc105eb,_0x5756f9;}}async[a9_0x1436cc(0x18a)+'esSca']({filePaths:_0x1af3b,zipFileName:_0x4c848c,memo:_0x2fd68f,isSbom:_0x6f80e4}){const _0xd3944e=a9_0x1436cc;try{if(!_0x1af3b||_0x1af3b[_0xd3944e(0x158)]===0x0){const _0x321cf8={};_0x321cf8[_0xd3944e(0x16a)]='text',_0x321cf8['text']=_0xd3944e(0x140)+_0xd3944e(0x190)+'\x20The\x20fileP'+_0xd3944e(0x156)+_0xd3944e(0x14e)+_0xd3944e(0x12f)+_0xd3944e(0x159)+_0xd3944e(0x143);const _0x24665e={};_0x24665e['error']=_0xd3944e(0x15b)+_0xd3944e(0x15c)+_0xd3944e(0x175);const _0x39e7d0={};return _0x39e7d0['content']=[_0x321cf8],_0x39e7d0['structured'+_0xd3944e(0x195)]=_0x24665e,_0x39e7d0;}logger[_0xd3944e(0x16c)](_0xd3944e(0x184)+_0xd3944e(0x17f)+_0xd3944e(0x185)+'ted:\x20'+_0x1af3b['length']+(_0xd3944e(0x134)+'s'));const _0x53fee4=await this[_0xd3944e(0x146)+_0xd3944e(0x12e)]['analyzeFil'+_0xd3944e(0x199)](_0x1af3b,_0x4c848c,_0x2fd68f,_0x6f80e4),_0x12d1fe='SCA\x20analys'+_0xd3944e(0x174)+_0xd3944e(0x169)+_0xd3944e(0x19a)+_0xd3944e(0x142)+_0x1af3b['length']+(_0xd3944e(0x13e)+_0xd3944e(0x19b))+_0x53fee4['analysisId']+'\x0aStatus:\x20'+_0x53fee4[_0xd3944e(0x152)]+(_0xd3944e(0x13e)+'Type:\x20')+_0x53fee4['analysisTy'+'pe'],_0x59fffa={};_0x59fffa[_0xd3944e(0x16a)]=_0xd3944e(0x157),_0x59fffa['text']=_0x12d1fe;const _0x3f6663={};_0x3f6663[_0xd3944e(0x192)]=_0x53fee4[_0xd3944e(0x192)],_0x3f6663[_0xd3944e(0x152)]=_0x53fee4[_0xd3944e(0x152)],_0x3f6663['filePathCo'+_0xd3944e(0x155)]=_0x1af3b[_0xd3944e(0x158)],_0x3f6663[_0xd3944e(0x16b)+'pe']=_0x53fee4[_0xd3944e(0x16b)+'pe'];const _0x3af673={};return _0x3af673['content']=[_0x59fffa],_0x3af673[_0xd3944e(0x150)+_0xd3944e(0x195)]=_0x3f6663,_0x3af673;}catch(_0x377198){logger[_0xd3944e(0x16d)](_0xd3944e(0x184)+'\x20SCA\x20analy'+'sis\x20failed'+':',_0x377198);const _0x2a81af={};_0x2a81af[_0xd3944e(0x16a)]=_0xd3944e(0x157),_0x2a81af[_0xd3944e(0x157)]=_0xd3944e(0x15e)+'is\x20request'+'\x20failed:\x20'+(_0x377198 instanceof Error?_0x377198[_0xd3944e(0x170)]:_0xd3944e(0x166)+_0xd3944e(0x178));const _0x509768={};_0x509768[_0xd3944e(0x16d)]=_0x377198 instanceof Error?_0x377198['message']:_0xd3944e(0x166)+_0xd3944e(0x178);const _0x213455={};return _0x213455[_0xd3944e(0x141)]=[_0x2a81af],_0x213455[_0xd3944e(0x150)+_0xd3944e(0x195)]=_0x509768,_0x213455;}}async[a9_0x1436cc(0x187)+a9_0x1436cc(0x172)]({folderPath:_0x146f1a,zipFileName:_0x4e790b,memo:_0x33f62a,isSbom:_0x28da61}){const _0x50da63=a9_0x1436cc,_0x805006={};_0x805006[_0x50da63(0x162)]=_0x50da63(0x157),_0x805006['VXUtd']=function(_0x55c48e,_0x1fa3a7){return _0x55c48e>_0x1fa3a7;},_0x805006[_0x50da63(0x133)]=function(_0x2d4f0a,_0x2a569b){return _0x2d4f0a instanceof _0x2a569b;};const _0x193571=_0x805006;try{if(!_0x146f1a||_0x146f1a[_0x50da63(0x18e)]()[_0x50da63(0x158)]===0x0){const _0x2e5a3f={};_0x2e5a3f[_0x50da63(0x16a)]=_0x193571['cDVjC'],_0x2e5a3f[_0x50da63(0x157)]=_0x50da63(0x14c)+'h\x20not\x20prov'+_0x50da63(0x13d);const _0x193589={};_0x193589['error']=_0x50da63(0x14c)+'h\x20not\x20prov'+'ided';const _0x2eb989={};return _0x2eb989[_0x50da63(0x141)]=[_0x2e5a3f],_0x2eb989[_0x50da63(0x150)+'Content']=_0x193589,_0x2eb989;}logger[_0x50da63(0x16c)](_0x50da63(0x130)+_0x50da63(0x151)+_0x50da63(0x14b)+'\x20'+_0x146f1a);const _0x405b26=await this[_0x50da63(0x146)+_0x50da63(0x12e)][_0x50da63(0x187)+'derSca'](_0x146f1a,_0x4e790b,_0x33f62a,_0x28da61);let _0x31a36f=_0x50da63(0x15e)+_0x50da63(0x174)+_0x50da63(0x165)+'er:\x20'+_0x146f1a+('\x0aAnalysis\x20'+'ID:\x20')+_0x405b26[_0x50da63(0x192)]+_0x50da63(0x13c)+_0x405b26[_0x50da63(0x152)]+('\x0aAnalysis\x20'+_0x50da63(0x18c))+_0x405b26[_0x50da63(0x16b)+'pe'];_0x405b26['skippedFol'+_0x50da63(0x14d)]&&_0x193571[_0x50da63(0x176)](_0x405b26[_0x50da63(0x139)+_0x50da63(0x14d)][_0x50da63(0x158)],0x0)&&(_0x31a36f+='\x0a\x0aSkipped\x20'+_0x50da63(0x186)+_0x405b26[_0x50da63(0x139)+_0x50da63(0x14d)][_0x50da63(0x158)]+_0x50da63(0x196)+_0x405b26[_0x50da63(0x139)+_0x50da63(0x14d)][_0x50da63(0x145)](',\x20'));const _0x4904f6={};_0x4904f6[_0x50da63(0x16a)]=_0x50da63(0x157),_0x4904f6[_0x50da63(0x157)]=_0x31a36f;const _0x10e4a1={};_0x10e4a1[_0x50da63(0x192)]=_0x405b26[_0x50da63(0x192)],_0x10e4a1[_0x50da63(0x152)]=_0x405b26[_0x50da63(0x152)],_0x10e4a1[_0x50da63(0x14a)]=_0x146f1a,_0x10e4a1[_0x50da63(0x16b)+'pe']=_0x405b26[_0x50da63(0x16b)+'pe'],_0x10e4a1[_0x50da63(0x139)+'ders']=_0x405b26[_0x50da63(0x139)+_0x50da63(0x14d)];const _0x11bb7a={};return _0x11bb7a[_0x50da63(0x141)]=[_0x4904f6],_0x11bb7a[_0x50da63(0x150)+_0x50da63(0x195)]=_0x10e4a1,_0x11bb7a;}catch(_0xce7fab){logger[_0x50da63(0x16d)]('Folder\x20SCA'+_0x50da63(0x151)+'failed:',_0xce7fab);const _0x547f6c={};return _0x547f6c[_0x50da63(0x16a)]=_0x193571[_0x50da63(0x162)],_0x547f6c[_0x50da63(0x157)]=_0x50da63(0x15e)+'is\x20request'+_0x50da63(0x137)+(_0xce7fab instanceof Error?_0xce7fab[_0x50da63(0x170)]:_0x50da63(0x166)+_0x50da63(0x178)),{'content':[_0x547f6c],'structuredContent':{'error':_0x193571[_0x50da63(0x133)](_0xce7fab,Error)?_0xce7fab[_0x50da63(0x170)]:_0x50da63(0x166)+_0x50da63(0x178)}};}}async[a9_0x1436cc(0x14f)+'Sca']({zipFilePath:_0x117294,zipFileName:_0x7b3efa,memo:_0x4ec88f,isSbom:_0x3de71a}){const _0x29d7b7=a9_0x1436cc,_0x360473={};_0x360473[_0x29d7b7(0x160)]=function(_0x526436,_0xd551e2){return _0x526436===_0xd551e2;};const _0xa43c57=_0x360473;try{if(!_0x117294||_0xa43c57[_0x29d7b7(0x160)](_0x117294[_0x29d7b7(0x18e)]()[_0x29d7b7(0x158)],0x0)){const _0x55dbfb={};_0x55dbfb[_0x29d7b7(0x16a)]=_0x29d7b7(0x157),_0x55dbfb[_0x29d7b7(0x157)]='ZIP\x20file\x20p'+'ath\x20not\x20pr'+_0x29d7b7(0x138);const _0x3ea393={};_0x3ea393[_0x29d7b7(0x16d)]='ZIP\x20file\x20p'+_0x29d7b7(0x173)+_0x29d7b7(0x12d);const _0x5c60b1={};return _0x5c60b1[_0x29d7b7(0x141)]=[_0x55dbfb],_0x5c60b1[_0x29d7b7(0x150)+_0x29d7b7(0x195)]=_0x3ea393,_0x5c60b1;}logger[_0x29d7b7(0x16c)](_0x29d7b7(0x17e)+'CA\x20analysi'+_0x29d7b7(0x154)+'d:\x20'+_0x117294);const _0x53ccec=await this[_0x29d7b7(0x146)+_0x29d7b7(0x12e)][_0x29d7b7(0x14f)+_0x29d7b7(0x147)](_0x117294,_0x7b3efa,_0x4ec88f,_0x3de71a),_0x1a65ba='SCA\x20analys'+_0x29d7b7(0x174)+_0x29d7b7(0x13a)+_0x29d7b7(0x153)+_0x117294+(_0x29d7b7(0x13e)+_0x29d7b7(0x19b))+_0x53ccec['analysisId']+_0x29d7b7(0x13c)+_0x53ccec[_0x29d7b7(0x152)]+(_0x29d7b7(0x13e)+_0x29d7b7(0x18c))+_0x53ccec[_0x29d7b7(0x16b)+'pe'],_0x26dd44={};_0x26dd44['type']=_0x29d7b7(0x157),_0x26dd44[_0x29d7b7(0x157)]=_0x1a65ba;const _0x58c6be={};_0x58c6be[_0x29d7b7(0x192)]=_0x53ccec[_0x29d7b7(0x192)],_0x58c6be[_0x29d7b7(0x152)]=_0x53ccec[_0x29d7b7(0x152)],_0x58c6be[_0x29d7b7(0x177)+'h']=_0x117294,_0x58c6be[_0x29d7b7(0x16b)+'pe']=_0x53ccec[_0x29d7b7(0x16b)+'pe'];const _0x5b1a79={};return _0x5b1a79[_0x29d7b7(0x141)]=[_0x26dd44],_0x5b1a79['structured'+_0x29d7b7(0x195)]=_0x58c6be,_0x5b1a79;}catch(_0x5d3ecc){logger[_0x29d7b7(0x16d)]('ZIP\x20file\x20S'+_0x29d7b7(0x131)+_0x29d7b7(0x168),_0x5d3ecc);const _0x1dedd8={};_0x1dedd8[_0x29d7b7(0x16a)]=_0x29d7b7(0x157),_0x1dedd8['text']=_0x29d7b7(0x15e)+_0x29d7b7(0x148)+_0x29d7b7(0x137)+(_0x5d3ecc instanceof Error?_0x5d3ecc[_0x29d7b7(0x170)]:_0x29d7b7(0x166)+'ror');const _0x41a8c8={};_0x41a8c8['error']=_0x5d3ecc instanceof Error?_0x5d3ecc[_0x29d7b7(0x170)]:_0x29d7b7(0x166)+_0x29d7b7(0x178);const _0x115667={};return _0x115667[_0x29d7b7(0x141)]=[_0x1dedd8],_0x115667[_0x29d7b7(0x150)+_0x29d7b7(0x195)]=_0x41a8c8,_0x115667;}}async[a9_0x1436cc(0x15f)+a9_0x1436cc(0x132)]({analysisId:_0x24f2c0}){const _0xe363ea=a9_0x1436cc,_0x734607={};_0x734607['BHiew']=_0xe363ea(0x157);const _0x3d60c2=_0x734607;try{logger[_0xe363ea(0x16c)](_0xe363ea(0x189)+'\x20download\x20'+_0xe363ea(0x14b)+'\x20'+_0x24f2c0);const _0x4dbea2=await this[_0xe363ea(0x146)+_0xe363ea(0x12e)][_0xe363ea(0x15f)+'omFiles'](_0x24f2c0);if(_0x4dbea2[_0xe363ea(0x158)]===0x0){const _0x25a9c8={};_0x25a9c8['type']=_0x3d60c2[_0xe363ea(0x136)],_0x25a9c8[_0xe363ea(0x157)]='No\x20SBOM\x20fi'+'les\x20found\x20'+_0xe363ea(0x13b)+'is\x20ID:\x20'+_0x24f2c0;const _0x2a0a33={};_0x2a0a33['analysisId']=_0x24f2c0,_0x2a0a33[_0xe363ea(0x198)]=[];const _0x302f94={};return _0x302f94[_0xe363ea(0x141)]=[_0x25a9c8],_0x302f94[_0xe363ea(0x150)+_0xe363ea(0x195)]=_0x2a0a33,_0x302f94;}const _0x5ed77e=_0x4dbea2['map'](_0x33f65c=>'-\x20'+_0x33f65c)[_0xe363ea(0x145)]('\x0a'),_0x506049={};_0x506049[_0xe363ea(0x16a)]=_0xe363ea(0x157),_0x506049[_0xe363ea(0x157)]=_0xe363ea(0x189)+_0xe363ea(0x194)+_0xe363ea(0x181)+_0xe363ea(0x17a)+_0x5ed77e;const _0x55a0f9={};_0x55a0f9[_0xe363ea(0x192)]=_0x24f2c0,_0x55a0f9[_0xe363ea(0x198)]=_0x4dbea2;const _0x30420f={};return _0x30420f[_0xe363ea(0x141)]=[_0x506049],_0x30420f[_0xe363ea(0x150)+_0xe363ea(0x195)]=_0x55a0f9,_0x30420f;}catch(_0x171bbe){logger[_0xe363ea(0x16d)](_0xe363ea(0x16f)+_0xe363ea(0x183)+'BOM\x20files:',_0x171bbe);const _0xa08d30={};_0xa08d30[_0xe363ea(0x16a)]=_0xe363ea(0x157),_0xa08d30[_0xe363ea(0x157)]='Failed\x20to\x20'+'download\x20S'+_0xe363ea(0x144)+'\x20'+(_0x171bbe instanceof Error?_0x171bbe[_0xe363ea(0x170)]:_0xe363ea(0x166)+_0xe363ea(0x178));const _0x16dbe4={};_0x16dbe4['error']=_0x171bbe instanceof Error?_0x171bbe[_0xe363ea(0x170)]:'Unknown\x20er'+_0xe363ea(0x178);const _0x5ae690={};return _0x5ae690[_0xe363ea(0x141)]=[_0xa08d30],_0x5ae690[_0xe363ea(0x150)+_0xe363ea(0x195)]=_0x16dbe4,_0x5ae690['isError']=!![],_0x5ae690;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a10_0xff5ee5=a10_0x467f;function a10_0x467f(_0x5e488b,_0x293bc0){_0x5e488b=_0x5e488b-0x11d;const _0x594503=a10_0x41f1();let _0x1bd784=_0x594503[_0x5e488b];return _0x1bd784;}function a10_0x41f1(){const _0xbebfaf=['ecure\x20Code','790iTJEWc','content','ecure\x20code','Failed\x20to\x20','Content','8387433TLTXrw','analysisSe','info','697917cirOff','omAnalysis','cureCodeFr','\x0a\x0a##\x20Code\x20','length','e\x20generati','6062268RwlwZl','\x0a\x0a...\x20(Sho','649qIHjVo','Secure\x20cod','error','message','ed:\x20','\x0a#\x20Secure\x20','lts\x0a\x0a##\x20Se','rvice','\x20character','Changes\x20(D','7ZJibVW','diff','\x0a```\x0a\x0a##\x20S','6WjHORd','cureCode','search','3020cGzQUJ','substring','Brief','toString','generateSe','\x20of\x20','cure\x20Code\x0a','ff\x0a','trim','\x0a```\x0a\x20\x20\x20\x20\x20','secureCode','generate\x20s','```java\x0a','structured','apply','isError','iff)\x0a```di','1445400yyaQyp','Code\x20Gener','242518WTocBW','Unknown\x20er','551290PzzOzl','(((.+)+)+)','text','type','on\x20request'];a10_0x41f1=function(){return _0xbebfaf;};return a10_0x41f1();}(function(_0x4d50a6,_0x5b16e9){const _0x454ed1=a10_0x467f,_0x383eef=_0x4d50a6();while(!![]){try{const _0x54fdf7=parseInt(_0x454ed1(0x12f))/0x1*(-parseInt(_0x454ed1(0x145))/0x2)+parseInt(_0x454ed1(0x155))/0x3+parseInt(_0x454ed1(0x132))/0x4*(-parseInt(_0x454ed1(0x14d))/0x5)+parseInt(_0x454ed1(0x120))/0x6*(-parseInt(_0x454ed1(0x12c))/0x7)+-parseInt(_0x454ed1(0x143))/0x8+-parseInt(_0x454ed1(0x152))/0x9+parseInt(_0x454ed1(0x147))/0xa*(parseInt(_0x454ed1(0x122))/0xb);if(_0x54fdf7===_0x5b16e9)break;else _0x383eef['push'](_0x383eef['shift']());}catch(_0x4f1f15){_0x383eef['push'](_0x383eef['shift']());}}}(a10_0x41f1,0x7dd58));const a10_0x530364=(function(){let _0x4d1992=!![];return function(_0x4d8ee8,_0x30a55c){const _0x2cbc40=_0x4d1992?function(){const _0x230fa5=a10_0x467f;if(_0x30a55c){const _0x27894a=_0x30a55c[_0x230fa5(0x140)](_0x4d8ee8,arguments);return _0x30a55c=null,_0x27894a;}}:function(){};return _0x4d1992=![],_0x2cbc40;};}()),a10_0x1bd784=a10_0x530364(this,function(){const _0xdc2b44=a10_0x467f;return a10_0x1bd784[_0xdc2b44(0x135)]()['search'](_0xdc2b44(0x148)+'+$')[_0xdc2b44(0x135)]()['constructo'+'r'](a10_0x1bd784)[_0xdc2b44(0x131)]('(((.+)+)+)'+'+$');});a10_0x1bd784();import{logger}from'../utils/logger.js';export class SecurityController{[a10_0xff5ee5(0x153)+'rvice'];constructor(_0xee0db8){const _0x277f64=a10_0xff5ee5;this[_0x277f64(0x153)+_0x277f64(0x129)]=_0xee0db8;}async[a10_0xff5ee5(0x136)+a10_0xff5ee5(0x130)]({analysisId:_0x1bc991,fileContent:_0x3aa0b2}){const _0x1c2bc4=a10_0xff5ee5,_0xebbd={'YHhdl':function(_0x4a3c73,_0x4e4b3b){return _0x4a3c73+_0x4e4b3b;},'JfnWJ':function(_0x1765d4,_0x26b29e,_0x3b371c){return _0x1765d4(_0x26b29e,_0x3b371c);}};try{logger[_0x1c2bc4(0x154)](_0x1c2bc4(0x123)+_0x1c2bc4(0x11f)+_0x1c2bc4(0x14b)+_0x1c2bc4(0x126)+_0x1bc991);const _0x2ab993=await this[_0x1c2bc4(0x153)+'rvice'][_0x1c2bc4(0x136)+_0x1c2bc4(0x157)+_0x1c2bc4(0x156)](_0x1bc991,_0x3aa0b2),_0x804eb9=0x7a120,_0x575d21=(_0x3a9ec8,_0x58fe43)=>{const _0x596400=_0x1c2bc4;if(_0x3a9ec8[_0x596400(0x11e)]<=_0x58fe43)return _0x3a9ec8;return _0xebbd['YHhdl'](_0x3a9ec8[_0x596400(0x133)](0x0,_0x58fe43),_0x596400(0x121)+'wing\x20'+_0x58fe43+_0x596400(0x137)+_0x3a9ec8[_0x596400(0x11e)]+(_0x596400(0x12a)+'s)'));},_0x4bad59=(_0x1c2bc4(0x127)+_0x1c2bc4(0x144)+'ation\x20Resu'+_0x1c2bc4(0x128)+_0x1c2bc4(0x138)+_0x1c2bc4(0x13e)+_0x575d21(_0x2ab993[_0x1c2bc4(0x13c)],_0x804eb9)+(_0x1c2bc4(0x12e)+_0x1c2bc4(0x14c)+'\x20Briefing\x0a')+_0x575d21(_0x2ab993[_0x1c2bc4(0x13c)+'Brief'],_0x804eb9)+(_0x1c2bc4(0x11d)+_0x1c2bc4(0x12b)+_0x1c2bc4(0x142)+_0x1c2bc4(0x139))+_0xebbd['JfnWJ'](_0x575d21,_0x2ab993[_0x1c2bc4(0x12d)],_0x804eb9)+(_0x1c2bc4(0x13b)+'\x20'))[_0x1c2bc4(0x13a)](),_0xfb05dd={'analysisId':_0x1bc991,'secureCode':_0x575d21(_0x2ab993['secureCode'],_0x804eb9),'secureCodeBrief':_0x575d21(_0x2ab993['secureCode'+_0x1c2bc4(0x134)],_0x804eb9),'diff':_0x575d21(_0x2ab993['diff'],_0x804eb9)},_0x1983ce={};_0x1983ce[_0x1c2bc4(0x14a)]='text',_0x1983ce[_0x1c2bc4(0x149)]=_0x4bad59;const _0x3594d5={};return _0x3594d5[_0x1c2bc4(0x14e)]=[_0x1983ce],_0x3594d5[_0x1c2bc4(0x13f)+_0x1c2bc4(0x151)]=_0xfb05dd,_0x3594d5;}catch(_0x85017){logger['error'](_0x1c2bc4(0x150)+_0x1c2bc4(0x13d)+_0x1c2bc4(0x14f)+':',_0x85017);const _0x4d31d8=_0x85017 instanceof Error?_0x85017[_0x1c2bc4(0x125)]:_0x1c2bc4(0x146)+'ror',_0x3ef135={};_0x3ef135[_0x1c2bc4(0x14a)]=_0x1c2bc4(0x149),_0x3ef135[_0x1c2bc4(0x149)]='Failed\x20to\x20'+_0x1c2bc4(0x13d)+_0x1c2bc4(0x14f)+':\x20'+_0x4d31d8;const _0x31fcb4={};_0x31fcb4[_0x1c2bc4(0x124)]=_0x4d31d8;const _0x299960={};return _0x299960[_0x1c2bc4(0x14e)]=[_0x3ef135],_0x299960[_0x1c2bc4(0x13f)+_0x1c2bc4(0x151)]=_0x31fcb4,_0x299960[_0x1c2bc4(0x141)]=!![],_0x299960;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a11_0x475f(){var _0x193ddd=['79210EOFqwP','664746nVdwAH','305MbcrwU','constructo','8oIzCmT','4836502IQtCbq','search','3313940kBtyqd','51522VJjsaM','apply','1367724QWaCrD','397539XNWnUo','(((.+)+)+)','40yIowOn','5HSVYrf'];a11_0x475f=function(){return _0x193ddd;};return a11_0x475f();}function a11_0x25af(_0x5d6275,_0x509583){_0x5d6275=_0x5d6275-0x1e9;var _0x364884=a11_0x475f();var _0x88d64a=_0x364884[_0x5d6275];return _0x88d64a;}(function(_0x7961a1,_0x213e91){var _0x35743d=a11_0x25af,_0x3ebeb5=_0x7961a1();while(!![]){try{var _0x45d844=-parseInt(_0x35743d(0x1f3))/0x1*(parseInt(_0x35743d(0x1f4))/0x2)+-parseInt(_0x35743d(0x1f5))/0x3+parseInt(_0x35743d(0x1ef))/0x4+parseInt(_0x35743d(0x1f6))/0x5*(parseInt(_0x35743d(0x1ed))/0x6)+-parseInt(_0x35743d(0x1ec))/0x7*(-parseInt(_0x35743d(0x1e9))/0x8)+parseInt(_0x35743d(0x1f0))/0x9*(-parseInt(_0x35743d(0x1f2))/0xa)+-parseInt(_0x35743d(0x1ea))/0xb;if(_0x45d844===_0x213e91)break;else _0x3ebeb5['push'](_0x3ebeb5['shift']());}catch(_0x466dfe){_0x3ebeb5['push'](_0x3ebeb5['shift']());}}}(a11_0x475f,0x4a051));var a11_0x272dcc=(function(){var _0x4af84c=!![];return function(_0x169c55,_0xf21302){var _0x1801f0=_0x4af84c?function(){var _0x1349fc=a11_0x25af;if(_0xf21302){var _0x58eed3=_0xf21302[_0x1349fc(0x1ee)](_0x169c55,arguments);return _0xf21302=null,_0x58eed3;}}:function(){};return _0x4af84c=![],_0x1801f0;};}()),a11_0x88d64a=a11_0x272dcc(this,function(){var _0x86d0a=a11_0x25af;return a11_0x88d64a['toString']()[_0x86d0a(0x1eb)](_0x86d0a(0x1f1)+'+$')['toString']()[_0x86d0a(0x1f7)+'r'](a11_0x88d64a)[_0x86d0a(0x1eb)](_0x86d0a(0x1f1)+'+$');});a11_0x88d64a();export class SystemController{}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x4f3eb0=a17_0x5371;(function(_0x5f083f,_0x2faa90){const _0x288c18=a17_0x5371,_0x30f3d2=_0x5f083f();while(!![]){try{const _0x567197=-parseInt(_0x288c18(0x210))/0x1*(parseInt(_0x288c18(0x203))/0x2)+parseInt(_0x288c18(0x213))/0x3+parseInt(_0x288c18(0x1e1))/0x4+-parseInt(_0x288c18(0x1d1))/0x5+parseInt(_0x288c18(0x209))/0x6*(-parseInt(_0x288c18(0x223))/0x7)+parseInt(_0x288c18(0x1e4))/0x8*(parseInt(_0x288c18(0x1f9))/0x9)+-parseInt(_0x288c18(0x20c))/0xa*(parseInt(_0x288c18(0x200))/0xb);if(_0x567197===_0x2faa90)break;else _0x30f3d2['push'](_0x30f3d2['shift']());}catch(_0x14131f){_0x30f3d2['push'](_0x30f3d2['shift']());}}}(a17_0x3f69,0x58444));const a17_0x183fbe=(function(){let _0x3dad9f=!![];return function(_0x7e1e71,_0x3062dd){const _0x498532=_0x3dad9f?function(){const _0x113afc=a17_0x5371;if(_0x3062dd){const _0x591953=_0x3062dd[_0x113afc(0x1cb)](_0x7e1e71,arguments);return _0x3062dd=null,_0x591953;}}:function(){};return _0x3dad9f=![],_0x498532;};}()),a17_0x1ba0df=a17_0x183fbe(this,function(){const _0x216aa1=a17_0x5371;return a17_0x1ba0df[_0x216aa1(0x229)]()[_0x216aa1(0x1e8)](_0x216aa1(0x20d)+'+$')['toString']()[_0x216aa1(0x215)+'r'](a17_0x1ba0df)[_0x216aa1(0x1e8)](_0x216aa1(0x20d)+'+$');});a17_0x1ba0df();import{z}from'zod';const a17_0x42e431={};a17_0x42e431[a17_0x4f3eb0(0x1c3)]='파일명에\x20확장자가\x20'+a17_0x4f3eb0(0x21a);export const AnalyzeFileSastSchema={'fileContent':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x206)](0x1,a17_0x4f3eb0(0x20a)+a17_0x4f3eb0(0x1c2))['describe'](a17_0x4f3eb0(0x236)+a17_0x4f3eb0(0x1fd)+'e\x20code\x20fil'+'e\x20to\x20analy'+'ze'),'fileName':z['string']()[a17_0x4f3eb0(0x206)](0x1)[a17_0x4f3eb0(0x1e6)](_0x8cf83e=>_0x8cf83e[a17_0x4f3eb0(0x1f7)]('.'),a17_0x42e431)[a17_0x4f3eb0(0x204)]('File\x20name\x20'+a17_0x4f3eb0(0x222)+a17_0x4f3eb0(0x22a)+a17_0x4f3eb0(0x1f2)+a17_0x4f3eb0(0x1d4)+')'),'memo':z['string']()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x237)+'emo')};export const AnalyzeFilesSastSchema={'filePaths':z[a17_0x4f3eb0(0x1fb)](z[a17_0x4f3eb0(0x1c5)]())[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1da)+a17_0x4f3eb0(0x1e0)+'file\x20paths'+a17_0x4f3eb0(0x1ca)+a17_0x4f3eb0(0x207)+a17_0x4f3eb0(0x1d2)+'Service.ja'+a17_0x4f3eb0(0x220)+a17_0x4f3eb0(0x22c)+a17_0x4f3eb0(0x226)),'zipFileName':z[a17_0x4f3eb0(0x1c5)]()['optional']()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x208)+a17_0x4f3eb0(0x1ef)+a17_0x4f3eb0(0x202)+a17_0x4f3eb0(0x1ea)+'onal)'),'memo':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()['describe'](a17_0x4f3eb0(0x237)+a17_0x4f3eb0(0x1e5))};export const AnalyzeFolderSastSchema={'folderPath':z['string']()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1ee)+a17_0x4f3eb0(0x22e)+a17_0x4f3eb0(0x218)+a17_0x4f3eb0(0x1d3)+a17_0x4f3eb0(0x216)+'ze'),'zipFileName':z[a17_0x4f3eb0(0x1c5)]()['optional']()[a17_0x4f3eb0(0x204)]('Name\x20of\x20th'+'e\x20ZIP\x20file'+a17_0x4f3eb0(0x202)+a17_0x4f3eb0(0x1ea)+'onal,\x20uses'+a17_0x4f3eb0(0x1c6)+a17_0x4f3eb0(0x21b)+a17_0x4f3eb0(0x233)),'memo':z['string']()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)]('Analysis\x20m'+'emo')};export const AnalyzeZipSastSchema={'zipFilePath':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1ee)+a17_0x4f3eb0(0x1ef)+'\x20containin'+a17_0x4f3eb0(0x1ec)+'ode\x20to\x20ana'+'lyze'),'zipFileName':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x225)+a17_0x4f3eb0(0x235)+a17_0x4f3eb0(0x1c7)+a17_0x4f3eb0(0x1e2)+a17_0x4f3eb0(0x1f8)+a17_0x4f3eb0(0x1d0)+a17_0x4f3eb0(0x1cd)+a17_0x4f3eb0(0x1d5)),'memo':z['string']()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x237)+a17_0x4f3eb0(0x1e5))};export const AnalyzeFileScaSchema={'filePath':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1ee)+a17_0x4f3eb0(0x212)+a17_0x4f3eb0(0x21d)+a17_0x4f3eb0(0x21f)+a17_0x4f3eb0(0x1d8)+'kage.json\x27'+')'),'zipFileName':z['string']()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)]('Name\x20of\x20th'+a17_0x4f3eb0(0x1ef)+'\x20to\x20be\x20cre'+'ated\x20(opti'+a17_0x4f3eb0(0x1c9)),'memo':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x237)+a17_0x4f3eb0(0x1e5)),'isSbom':z['boolean']()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)]('Whether\x20th'+a17_0x4f3eb0(0x232)+a17_0x4f3eb0(0x1f5)+a17_0x4f3eb0(0x1db)+'ycloneDX)')};export const AnalyzeFilesScaSchema={'filePaths':z[a17_0x4f3eb0(0x1fb)](z['string']())[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1f0)+a17_0x4f3eb0(0x1ce)+a17_0x4f3eb0(0x1d7)+a17_0x4f3eb0(0x1c4)+a17_0x4f3eb0(0x217)+a17_0x4f3eb0(0x1e7)+a17_0x4f3eb0(0x1cc)+'\x20\x27requirem'+a17_0x4f3eb0(0x1f6)+')'),'zipFileName':z['string']()['optional']()['describe']('Name\x20of\x20th'+'e\x20ZIP\x20file'+a17_0x4f3eb0(0x202)+a17_0x4f3eb0(0x1ea)+a17_0x4f3eb0(0x1c9)),'memo':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x237)+a17_0x4f3eb0(0x1e5)),'isSbom':z[a17_0x4f3eb0(0x221)]()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x20e)+a17_0x4f3eb0(0x1de)+a17_0x4f3eb0(0x205)+'es\x20(SPDX/C'+'ycloneDX)')};export const AnalyzeFolderScaSchema={'folderPath':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1ee)+a17_0x4f3eb0(0x1dd)+a17_0x4f3eb0(0x201)+a17_0x4f3eb0(0x22b)+a17_0x4f3eb0(0x1ce)+a17_0x4f3eb0(0x1d7)+a17_0x4f3eb0(0x1fe)),'zipFileName':z[a17_0x4f3eb0(0x1c5)]()['optional']()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x208)+a17_0x4f3eb0(0x1ef)+a17_0x4f3eb0(0x202)+a17_0x4f3eb0(0x1ea)+'onal,\x20uses'+'\x20folder\x20na'+a17_0x4f3eb0(0x21b)+a17_0x4f3eb0(0x233)),'memo':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)]('Analysis\x20m'+a17_0x4f3eb0(0x1e5)),'isSbom':z[a17_0x4f3eb0(0x221)]()['optional']()['describe']('Whether\x20th'+a17_0x4f3eb0(0x22e)+'ontains\x20SB'+a17_0x4f3eb0(0x1e3))};function a17_0x5371(_0x2ca794,_0x15e974){_0x2ca794=_0x2ca794-0x1c2;const _0x18572a=a17_0x3f69();let _0x1ba0df=_0x18572a[_0x2ca794];return _0x1ba0df;}export const AnalyzeZipScaSchema={'zipFilePath':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1ee)+'e\x20ZIP\x20file'+a17_0x4f3eb0(0x214)+a17_0x4f3eb0(0x1ed)+'dependenci'+a17_0x4f3eb0(0x224)+a17_0x4f3eb0(0x22f)),'zipFileName':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()['describe'](a17_0x4f3eb0(0x225)+a17_0x4f3eb0(0x235)+'stored\x20(op'+a17_0x4f3eb0(0x1e2)+a17_0x4f3eb0(0x1f8)+a17_0x4f3eb0(0x1d0)+a17_0x4f3eb0(0x1cd)+a17_0x4f3eb0(0x1d5)),'memo':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x1eb)]()[a17_0x4f3eb0(0x204)]('Analysis\x20m'+'emo'),'isSbom':z[a17_0x4f3eb0(0x221)]()[a17_0x4f3eb0(0x1eb)]()['describe']('Whether\x20th'+a17_0x4f3eb0(0x219)+'ains\x20SBOM\x20'+a17_0x4f3eb0(0x21e))};export const TrackAnalysisProgressSchema={'analysisId':z[a17_0x4f3eb0(0x1c5)]()['describe'](a17_0x4f3eb0(0x1fa)+'D'),'intervalMs':z[a17_0x4f3eb0(0x230)]()[a17_0x4f3eb0(0x1eb)]()['describe'](a17_0x4f3eb0(0x1f3)+'ck\x20interva'+a17_0x4f3eb0(0x234)+a17_0x4f3eb0(0x231)+'efault:\x2030'+'00)'),'maxWaitMs':z[a17_0x4f3eb0(0x230)]()['optional']()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1d6)+a17_0x4f3eb0(0x20b)+a17_0x4f3eb0(0x1f1)+a17_0x4f3eb0(0x1c8)+a17_0x4f3eb0(0x1df)+'ing\x20(defau'+a17_0x4f3eb0(0x238))};export const GetAnalysisStatusSchema={'analysisId':z['string']()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1fa)+'D')};export const GetAnalysisResultsSchema={'analysisId':z['string']()['describe'](a17_0x4f3eb0(0x1fa)+'D')};export const GetScaAnalysisResultsSchema={'analysisId':z[a17_0x4f3eb0(0x1c5)]()['describe'](a17_0x4f3eb0(0x1fa)+a17_0x4f3eb0(0x21c)+a17_0x4f3eb0(0x22d))};function a17_0x3f69(){const _0x36f7dd=['stored\x20(op','econds\x20bef','onal)','\x20to\x20analyz','apply','\x27pom.xml\x27,','\x20if\x20not\x20sp','pendency\x20f','D\x20from\x20the','l\x20filename','1775575okQwWf','\x27/src/User','source\x20cod','vice.java\x27','ecified)','Maximum\x20ti','iles\x20to\x20an','e.g.,\x20\x27pac','t\x20to\x20gener','List\x20of\x20so','le\x20(SPDX/C','ile\x20conten','e\x20project\x20','e\x20files\x20ar','ore\x20return','urce\x20code\x20','2206120AOlOjK','tional,\x20us','OM\x20files','38744FLJEgk','emo','refine','ge.json\x27,\x20','search','\x20security\x20','ated\x20(opti','optional','g\x20source\x20c','g\x20project\x20','Path\x20to\x20th','e\x20ZIP\x20file','List\x20of\x20de','\x20in\x20millis',',\x20\x27UserSer','Status\x20che','analysis','an\x20SBOM\x20fi','ents.txt\x27]','includes','es\x20origina','1323igcIkZ','Analysis\x20I','array','Original\x20f','\x20the\x20sourc','alyze','iles\x20for','768812YKOmuS','folder\x20con','\x20to\x20be\x20cre','36TNPRJV','describe','e\x20SBOM\x20fil','min','e\x20(e.g.,\x20[','Name\x20of\x20th','18JuhnDP','파일\x20내용이\x20비어있','me\x20to\x20wait','10dVNMCu','(((.+)+)+)','Whether\x20th','\x20version','8530ayAuVb','ate\x20secure','e\x20dependen','891279EnDqDs','\x20containin','constructo','e\x20to\x20analy','.,\x20[\x27packa','ontaining\x20','e\x20ZIP\x20cont','필요합니다','me\x20if\x20not\x20','D\x20from\x20SCA','cy\x20file\x20to','files','\x20analyze\x20(','va\x27,\x20\x27/src','boolean','with\x20exten','1447733rpTKNi','es\x20to\x20anal','ZIP\x20file\x20n','va\x27])','oad\x20SBOM\x20f','D\x20to\x20downl','toString','sion\x20(e.g.','taining\x20de','/DbUtil.ja','\x20analysis','e\x20folder\x20c','yze','number','seconds\x20(d','e\x20file\x20is\x20','specified)','l\x20in\x20milli','ame\x20to\x20be\x20','Content\x20of','Analysis\x20m','lt:\x2030000)','습니다','message','alyze\x20(e.g','string','\x20folder\x20na'];a17_0x3f69=function(){return _0x36f7dd;};return a17_0x3f69();}export const GenerateSecureCodeSchema={'analysisId':z['string']()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1fa)+a17_0x4f3eb0(0x1cf)+a17_0x4f3eb0(0x1e9)+a17_0x4f3eb0(0x1f4)),'fileContent':z[a17_0x4f3eb0(0x1c5)]()['describe'](a17_0x4f3eb0(0x1fc)+a17_0x4f3eb0(0x1dc)+a17_0x4f3eb0(0x1d9)+a17_0x4f3eb0(0x211)+a17_0x4f3eb0(0x20f))};export const DownloadSbomFilesSchema={'analysisId':z[a17_0x4f3eb0(0x1c5)]()[a17_0x4f3eb0(0x204)](a17_0x4f3eb0(0x1fa)+a17_0x4f3eb0(0x228)+a17_0x4f3eb0(0x227)+a17_0x4f3eb0(0x1ff))};
|
package/dist/src/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
|
-
const a18_0x4ad399=a18_0x925d;(function(_0x3fb263,_0x514d4b){const _0x810912=a18_0x925d,_0x1dd858=_0x3fb263();while(!![]){try{const _0x2fd7f3=parseInt(_0x810912(0x1d8))/0x1*(-parseInt(_0x810912(0x1ff))/0x2)+-parseInt(_0x810912(0x26d))/0x3*(parseInt(_0x810912(0x167))/0x4)+-parseInt(_0x810912(0x240))/0x5+-parseInt(_0x810912(0x173))/0x6+parseInt(_0x810912(0x153))/0x7+parseInt(_0x810912(0x1bb))/0x8+parseInt(_0x810912(0x1b2))/0x9;if(_0x2fd7f3===_0x514d4b)break;else _0x1dd858['push'](_0x1dd858['shift']());}catch(_0x40eada){_0x1dd858['push'](_0x1dd858['shift']());}}}(a18_0x4ac4,0x401a4));const a18_0x124a8f=(function(){let _0x51d581=!![];return function(_0xb89080,_0x3a950b){const _0x28245c=_0x51d581?function(){const _0x3eac1d=a18_0x925d;if(_0x3a950b){const _0x2f360b=_0x3a950b[_0x3eac1d(0x162)](_0xb89080,arguments);return _0x3a950b=null,_0x2f360b;}}:function(){};return _0x51d581=![],_0x28245c;};}()),a18_0x254706=a18_0x124a8f(this,function(){const _0x4a6361=a18_0x925d;return a18_0x254706[_0x4a6361(0x23e)]()[_0x4a6361(0x1e1)](_0x4a6361(0x1b3)+'+$')[_0x4a6361(0x23e)]()['constructo'+'r'](a18_0x254706)[_0x4a6361(0x1e1)](_0x4a6361(0x1b3)+'+$');});a18_0x254706();import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{AnalysisService}from'./services/analysis.service.js';import{logger}from'./utils/logger.js';import a18_0x1b7866 from'path';import a18_0x11509b from'fs';import{fileURLToPath}from'url';import{SPARROW_RULES}from'./config/constants.js';import{AnalyzeFileSastSchema,AnalyzeFilesSastSchema,AnalyzeFolderSastSchema,AnalyzeZipSastSchema,AnalyzeFileScaSchema,AnalyzeFilesScaSchema,AnalyzeFolderScaSchema,AnalyzeZipScaSchema,TrackAnalysisProgressSchema,GetAnalysisStatusSchema,GetAnalysisResultsSchema,GetScaAnalysisResultsSchema,GenerateSecureCodeSchema,DownloadSbomFilesSchema}from'./schemas/tool.schemas.js';import{SastController}from'./controllers/sast.controller.js';import{ScaController}from'./controllers/sca.controller.js';import{AnalysisController}from'./controllers/analysis.controller.js';import{SecurityController}from'./controllers/security.controller.js';import{SystemController}from'./controllers/system.controller.js';const a18_0x37bbd3={};a18_0x37bbd3[a18_0x4ad399(0x1db)]=a18_0x4ad399(0x13a)+a18_0x4ad399(0x1e3)+'r',a18_0x37bbd3[a18_0x4ad399(0x210)]=a18_0x4ad399(0x1e8);const server=new McpServer(a18_0x37bbd3),analysisService=new AnalysisService(),sastController=new SastController(analysisService),scaController=new ScaController(analysisService),analysisController=new AnalysisController(analysisService),securityController=new SecurityController(analysisService),systemController=new SystemController(),a18_0xf51ad0={};a18_0xf51ad0[a18_0x4ad399(0x152)]='Single\x20Fil'+'e\x20SAST\x20Ana'+'lysis',a18_0xf51ad0['descriptio'+'n']=a18_0x4ad399(0x268)+a18_0x4ad399(0x26e)+a18_0x4ad399(0x1ec)+a18_0x4ad399(0x26f)+a18_0x4ad399(0x27f)+a18_0x4ad399(0x21d)+a18_0x4ad399(0x241)+a18_0x4ad399(0x18b)+'f\x20a\x20single'+a18_0x4ad399(0x204)+a18_0x4ad399(0x1fb)+a18_0x4ad399(0x19b)+a18_0x4ad399(0x236)+'g\x20the\x20logi'+'c\x20and\x20secu'+a18_0x4ad399(0x199)+a18_0x4ad399(0x1f4)+'ode\x20snippe'+a18_0x4ad399(0x1a0)+a18_0x4ad399(0x262)+a18_0x4ad399(0x1a3)+'troller\x20or'+'\x20Service).'+a18_0x4ad399(0x282)+a18_0x4ad399(0x158)+a18_0x4ad399(0x223)+a18_0x4ad399(0x1cb)+a18_0x4ad399(0x136)+'\x20XSS,\x20and\x20'+a18_0x4ad399(0x211)+a18_0x4ad399(0x25d)+a18_0x4ad399(0x14a)+a18_0x4ad399(0x1a2)+a18_0x4ad399(0x150)+a18_0x4ad399(0x225)+a18_0x4ad399(0x19e),a18_0xf51ad0['inputSchem'+'a']=AnalyzeFileSastSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x22c)+'le_sast',a18_0xf51ad0,async _0x2126b3=>sastController['analyzeFil'+a18_0x4ad399(0x255)](_0x2126b3));function a18_0x4ac4(){const _0x1b34c1=['mkdirSync','lder_sca','delines\x20fo','\x20results\x20o','ified\x20by\x20t','ported\x20dep','13382118qIhlbE','(((.+)+)+)','ensive\x20rep','ecure_code','registerTo','ce\x20risks.\x20','a\x20SAST\x20ana','dirname','download_s','3184960ilHiDs','\x20code\x20gene','a\x20full\x20SCA','LETE\x27\x20and\x20','Y,\x20PRE_PRO','cted\x20code,','\x20\x27analysis','the\x20genera','ing,\x20\x27trac','\x20for\x20proje','ort\x20with\x20c','\x20archive\x20c','his\x20after\x20','Provides\x20a','e.json,\x20po','alysis_res','\x20like\x20SQL\x20','bom_files','red.','nce\x20for\x20li','\x20project\x20f','ill\x20contin','sis','g\x20the\x20chan','s\x20only\x20pro','\x20open-sour','\x20for\x20analy','sId>\x27\x20dire','s.\x20Returns','425419IMjeBl','text/markd','les','name','saved\x20to\x20t','lder_sast','ysis','ndings.','ginal\x20sour','search','\x27COMPLETE\x27','e-generato','Progress\x20i','vided\x20duri','nsive\x20SAST','Id\x27.','1.0.0','uri','heir\x20absol','Returns\x20an','atic\x20Appli','generateSe','ver\x20starte','BOM\x20Files','\x20SCA\x20Analy','scription,','\x20Compositi','parrow\x20MCP','specific\x20c','les_sast','\x20analysis\x20','derSca','existsSync','is\x20Results','d\x20version\x20','de\x20file.\x20U','analyze_zi','ialized\x20su','\x20vulnerabi','2BMlgJC','join','get_analys',',\x20CVSS),\x20a','results.\x20I','\x20source\x20co','ccessfully','ges.\x20For\x20a','Generate\x20S','\x20scan\x20on\x20a','\x20usage\x20rul','\x20dependenc','\x20of\x20the\x20fi','initialize','\x20categoriz','vice','inputSchem','version','path\x20trave','sbPNM','ogress\x20by\x20','YSIS,\x20POST','esSast','lysis\x20on\x20m','getScaAnal','rvice\x20init','erability\x20','get_sca_an','\x20for\x20manua','les_sca','ing)\x20analy','Checks\x20the','I-generate','sparrow-ru','ess','.\x20Use\x20this','rabilities','sId\x27.','isId\x27\x20for\x20','CheckerSer','ing\x20source','y\x20file\x20(e.','iance\x20info','ute\x20paths.','ialization','analyze_fi','ges.\x20Use\x20t','sisId\x27.','text','s\x20the\x20code','iles\x20(e.g.','Periodical','ile\x20vulner','getAnalysi','\x20Returns\x20a','r\x20analyzin',',\x20a\x20packag','d\x20set\x20of\x20f','sisProgres','rity\x20scan.','\x20is\x20prefer','status\x20is\x20','to\x20see\x20if\x20','toString','xplanation','2030135tTmcmd','sis\x20on\x20the','\x20current\x20p','ysisResult','sed\x20on\x20pre','sResults','tes.','_PROCESS,\x20','connect','brary\x20upda','is_status','\x20an\x20ongoin','ackaged\x20or','dentifies\x20','ve\x20contain',',\x20error:\x20','uirements.','logs','le\x20paths.','OMPLETE\x27.\x20','messages','eSast','user','ly\x20check\x20a','of\x20the\x20ori','ctory.\x20Ret','ty\x20flaws.\x20','le_sca','rules','rsal\x20withi','T\x20Analysis','ry.\x20It\x20aut','type','ftware\x20Com','gle\x20file\x20(','ZIP\x20File\x20S','atus\x20is\x20\x27C','Load\x20the\x20S',')\x20and\x20an\x20A','\x20once\x20the\x20','Initiates\x20','rom\x20a\x20comp','Multi-File','e\x20context.','Fetches\x20de','354uZtVlf','a\x20SAST\x20(St','cation\x20Sec','es\x20and\x20lic','sparrow://','output/sbo','t\x20provides','ocations\x20-','fication.\x20','ysis_progr','X,\x20SWID)\x20f','lities\x20(se','ies\x20and\x20li','cluding\x20co','\x20a\x20compreh','analyzeZip','info','ue\x20without','urity\x20Test','n\x20on\x20a\x20ZIP','ojects\x20for','\x20It\x20identi','resolve','cense\x20comp','es.\x20Useful','nloaded\x20fi','g\x20a\x20relate','analysis\x20I','urce\x20code\x20','\x20failed\x20(w','older.\x20It\x20','registerPr','descriptio','s\x20percenta','es\x20into\x20th','ults','to\x20get\x20bas','ultiple\x20so','alysis\x20Res','\x20SAST\x20Anal','P.\x20It\x20scan','g.,\x20packag','cts\x20with\x20m','sion,\x20lice','and\x20upload','_modules)\x20','\x20artifacts','AST\x20Analys','d\x20briefing','ackage\x20man','ber,\x20compl','\x20ZIP\x20archi','g\x20analysis','injection,','s\x20them\x20for','\x20the\x20proje','\x20file\x20path','secure-cod','ies\x20in\x20SAS','leted\x20SCA\x20','then','ctive\x20wait','re\x20directo','e\x20SCA\x20Anal','Folder\x20SAS','iles\x20at\x20on','\x20the\x20corre','Get\x20SCA\x20An','Sca','nalysisId\x27','the\x20entire','finding\x20vu','generate_s','n\x20the\x20code','INIT,\x20READ','\x20like\x20node','registerRe','m/<analysi','role','an\x20\x27analys','omponent\x20t','title','115577sJAAGY','CA\x20Analysi','\x20Useful\x20fo','Track\x20Anal','mimeType','fies\x20vulne','T\x20analysis','esSca','an\x20SCA\x20(So','endency\x20de','analyzeFol','ady\x20packag','CESS,\x20ANAL','urns\x20an\x20\x27a','liance\x20ris','apply','claration\x20','l\x20polling\x20','Checker\x20se','Automatica','11608BDORws','lysis\x20on\x20a','vulnerable','vious\x20SAST','he\x20local\x20\x27','n\x20\x27analysi','nd\x20remedia','rogress\x20an','_progress\x27','p_sca','href','gress\x20Noti','2790522jeXSNH','Files\x20are\x20','position\x20A','COMPLETE.\x20','\x20files\x20(ex','nd\x20cross-f','a\x20comprehe','Sast','tages\x20are\x20','analyze_fo','ables\x20(ver',',\x20line\x20num','ultiple\x20de',',\x20CycloneD','Downloads\x20','recursive','Folder\x20SCA','dependenci','Single\x20Fil','an\x20SCA\x20sca','analysis.\x20','ile\x20checki','lnerabilit','s)\x20results','\x20content\x20o','Analysis\x20s','own','on\x20an\x20enti','\x20(Software','P\x20Rules','g\x20log\x20dire','eSca','tes\x20a\x20secu','\x20within\x20th','Log\x20file\x20l','tion\x20guida','nfo):','nalysis)\x20o','rity\x20of\x20a\x20','dentify\x20vu','se\x20this\x20fo','downloadSb','source','tracking.','\x20a\x20brief\x20e','t\x20or\x20a\x20sin','dules\x20or\x20p','.\x20Returns\x20','like\x20a\x20Con','mmon\x20build','omatically','.\x20Provides','Official\x20S','trackAnaly','ultiple\x20mo','on\x20Analysi','searches\x20f'];a18_0x4ac4=function(){return _0x1b34c1;};return a18_0x4ac4();}const a18_0x1a49cd={};a18_0x1a49cd['title']='Multi-File'+a18_0x4ad399(0x128)+a18_0x4ad399(0x1de),a18_0x1a49cd[a18_0x4ad399(0x121)+'n']='Initiates\x20'+a18_0x4ad399(0x1b8)+a18_0x4ad399(0x216)+a18_0x4ad399(0x126)+a18_0x4ad399(0x11d)+'files\x20spec'+a18_0x4ad399(0x1b0)+a18_0x4ad399(0x1ea)+a18_0x4ad399(0x22a)+a18_0x4ad399(0x155)+a18_0x4ad399(0x236)+a18_0x4ad399(0x11b)+a18_0x4ad399(0x238)+a18_0x4ad399(0x231)+a18_0x4ad399(0x237)+'e\x20or\x20a\x20mod'+'ule)\x20to\x20fi'+a18_0x4ad399(0x178)+a18_0x4ad399(0x233)+'abilities.'+a18_0x4ad399(0x235)+a18_0x4ad399(0x16c)+'sId\x27.',a18_0x1a49cd['inputSchem'+'a']=AnalyzeFilesSastSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x22c)+a18_0x4ad399(0x1f5),a18_0x1a49cd,async _0x4e3aa2=>sastController['analyzeFil'+a18_0x4ad399(0x215)](_0x4e3aa2));const a18_0x3c6a43={};a18_0x3c6a43['title']=a18_0x4ad399(0x141)+a18_0x4ad399(0x25e),a18_0x3c6a43[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x268)+a18_0x4ad399(0x179)+a18_0x4ad399(0x1e6)+a18_0x4ad399(0x1f6)+a18_0x4ad399(0x18e)+a18_0x4ad399(0x13f)+a18_0x4ad399(0x25f)+a18_0x4ad399(0x1a5)+'\x20packages\x20'+'the\x20source'+a18_0x4ad399(0x177)+a18_0x4ad399(0x27a)+a18_0x4ad399(0x1a4)+a18_0x4ad399(0x12f)+a18_0x4ad399(0x14c)+a18_0x4ad399(0x12e)+a18_0x4ad399(0x12d)+a18_0x4ad399(0x137)+'\x20a\x20full-pr'+'oject\x20secu'+a18_0x4ad399(0x23a)+'\x20Returns\x20a'+a18_0x4ad399(0x16c)+a18_0x4ad399(0x224),a18_0x3c6a43[a18_0x4ad399(0x20f)+'a']=AnalyzeFolderSastSchema,server[a18_0x4ad399(0x1b6)+'ol']('analyze_fo'+a18_0x4ad399(0x1dd),a18_0x3c6a43,async _0x1f340e=>sastController[a18_0x4ad399(0x15d)+'derSast'](_0x1f340e));const a18_0x3e10ff={};a18_0x3e10ff['title']='ZIP\x20File\x20S'+a18_0x4ad399(0x130)+'is',a18_0x3e10ff[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x268)+'a\x20SAST\x20ana'+a18_0x4ad399(0x168)+a18_0x4ad399(0x134)+a18_0x4ad399(0x24e)+a18_0x4ad399(0x227)+'\x20code.\x20Use'+'\x20this\x20when'+a18_0x4ad399(0x138)+'ct\x20is\x20alre'+a18_0x4ad399(0x15e)+'ed\x20as\x20a\x20ZI'+a18_0x4ad399(0x129)+a18_0x4ad399(0x230)+a18_0x4ad399(0x194)+'e\x20archive\x20'+'for\x20securi'+a18_0x4ad399(0x25a)+a18_0x4ad399(0x1eb)+a18_0x4ad399(0x1c1)+a18_0x4ad399(0x1e7),a18_0x3e10ff[a18_0x4ad399(0x20f)+'a']=AnalyzeZipSastSchema,server[a18_0x4ad399(0x1b6)+'ol']('analyze_zi'+'p_sast',a18_0x3e10ff,async _0x118e69=>sastController[a18_0x4ad399(0x27c)+a18_0x4ad399(0x17a)](_0x118e69));const a18_0x2fb964={};a18_0x2fb964[a18_0x4ad399(0x152)]=a18_0x4ad399(0x185)+a18_0x4ad399(0x140)+'ysis',a18_0x2fb964[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x268)+a18_0x4ad399(0x15b)+a18_0x4ad399(0x261)+a18_0x4ad399(0x175)+a18_0x4ad399(0x198)+'n\x20a\x20single'+a18_0x4ad399(0x20a)+a18_0x4ad399(0x228)+a18_0x4ad399(0x12a)+a18_0x4ad399(0x1c9)+'m.xml,\x20req'+a18_0x4ad399(0x250)+'txt).\x20It\x20i'+a18_0x4ad399(0x24d)+a18_0x4ad399(0x169)+'\x20open-sour'+'ce\x20librari'+a18_0x4ad399(0x270)+'ense\x20issue'+a18_0x4ad399(0x1d7)+'\x20an\x20\x27analy'+a18_0x4ad399(0x22e),a18_0x2fb964[a18_0x4ad399(0x20f)+'a']=AnalyzeFileScaSchema,server['registerTo'+'ol']('analyze_fi'+a18_0x4ad399(0x25b),a18_0x2fb964,async _0x12c7b6=>scaController['analyzeFil'+a18_0x4ad399(0x192)](_0x12c7b6));const a18_0x313121={};a18_0x313121['title']=a18_0x4ad399(0x26a)+a18_0x4ad399(0x1f0)+a18_0x4ad399(0x1d1),a18_0x313121[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x268)+'an\x20SCA\x20ana'+a18_0x4ad399(0x216)+a18_0x4ad399(0x17f)+'pendency\x20f'+a18_0x4ad399(0x142)+'ce.\x20Useful'+a18_0x4ad399(0x1c4)+a18_0x4ad399(0x12b)+a18_0x4ad399(0x1a9)+a18_0x4ad399(0x1a1)+a18_0x4ad399(0x132)+'agers.\x20Ret'+a18_0x4ad399(0x160)+a18_0x4ad399(0x146)+'.',a18_0x313121[a18_0x4ad399(0x20f)+'a']=AnalyzeFilesScaSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x22c)+a18_0x4ad399(0x21c),a18_0x313121,async _0x5991c0=>scaController['analyzeFil'+a18_0x4ad399(0x15a)](_0x5991c0));const a18_0x463ade={};a18_0x463ade[a18_0x4ad399(0x152)]=a18_0x4ad399(0x183)+'\x20Analysis',a18_0x463ade[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x268)+a18_0x4ad399(0x1bd)+a18_0x4ad399(0x208)+a18_0x4ad399(0x1cf)+a18_0x4ad399(0x11f)+a18_0x4ad399(0x1ab)+'or\x20all\x20sup'+a18_0x4ad399(0x1b1)+a18_0x4ad399(0x15c)+a18_0x4ad399(0x163)+'files\x20to\x20i'+a18_0x4ad399(0x19a)+'lnerabilit'+a18_0x4ad399(0x279)+a18_0x4ad399(0x284)+a18_0x4ad399(0x161)+'ks\x20across\x20'+a18_0x4ad399(0x147)+'\x20project.\x20'+a18_0x4ad399(0x1eb)+a18_0x4ad399(0x1c1)+a18_0x4ad399(0x1e7),a18_0x463ade['inputSchem'+'a']=AnalyzeFolderScaSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x17c)+a18_0x4ad399(0x1ad),a18_0x463ade,async _0x31e829=>scaController[a18_0x4ad399(0x15d)+a18_0x4ad399(0x1f7)](_0x31e829));const a18_0x5d5334={};a18_0x5d5334['title']=a18_0x4ad399(0x263)+a18_0x4ad399(0x154)+'s',a18_0x5d5334[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x268)+a18_0x4ad399(0x186)+a18_0x4ad399(0x280)+a18_0x4ad399(0x1c6)+'ontaining\x20'+a18_0x4ad399(0x184)+a18_0x4ad399(0x285)+a18_0x4ad399(0x1d5)+'zing\x20pre-p'+a18_0x4ad399(0x24c)+'\x20legacy\x20pr'+a18_0x4ad399(0x281)+a18_0x4ad399(0x1d4)+a18_0x4ad399(0x1b7)+a18_0x4ad399(0x1eb)+a18_0x4ad399(0x1c1)+a18_0x4ad399(0x1e7),a18_0x5d5334[a18_0x4ad399(0x20f)+'a']=AnalyzeZipScaSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x1fc)+a18_0x4ad399(0x170),a18_0x5d5334,async _0xa04b57=>scaController[a18_0x4ad399(0x27c)+a18_0x4ad399(0x145)](_0xa04b57));const a18_0x45c2f7={};a18_0x45c2f7[a18_0x4ad399(0x152)]=a18_0x4ad399(0x156)+'ysis\x20Progr'+a18_0x4ad399(0x221),a18_0x45c2f7[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x232)+a18_0x4ad399(0x257)+'nalysis\x20pr'+a18_0x4ad399(0x213)+a18_0x4ad399(0x11c)+'D\x20and\x20upda'+'te\x20via\x20Pro'+a18_0x4ad399(0x172)+a18_0x4ad399(0x275)+a18_0x4ad399(0x18c)+a18_0x4ad399(0x17b)+a18_0x4ad399(0x14b)+a18_0x4ad399(0x1bf)+a18_0x4ad399(0x15f)+a18_0x4ad399(0x214)+a18_0x4ad399(0x247)+a18_0x4ad399(0x176)+a18_0x4ad399(0x1e4)+a18_0x4ad399(0x1d3)+a18_0x4ad399(0x1e5)+'ng\x20the\x20ANA'+'LYSIS\x20stag'+'e.',a18_0x45c2f7[a18_0x4ad399(0x20f)+'a']=TrackAnalysisProgressSchema,server[a18_0x4ad399(0x1b6)+'ol']('track_anal'+a18_0x4ad399(0x276)+a18_0x4ad399(0x221),a18_0x45c2f7,async(_0x5c095f,_0x1ad965)=>analysisController[a18_0x4ad399(0x1a8)+a18_0x4ad399(0x239)+'s'](_0x5c095f,_0x1ad965));const a18_0x266437={};a18_0x266437[a18_0x4ad399(0x152)]='Get\x20Analys'+'is\x20Status',a18_0x266437['descriptio'+'n']=a18_0x4ad399(0x21e)+a18_0x4ad399(0x242)+a18_0x4ad399(0x16e)+'d\x20stage\x20of'+a18_0x4ad399(0x24b)+a18_0x4ad399(0x135)+a18_0x4ad399(0x222)+a18_0x4ad399(0x21b)+a18_0x4ad399(0x164)+a18_0x4ad399(0x23d)+'an\x20analysi'+'s\x20is\x20\x27COMP'+a18_0x4ad399(0x1be)+a18_0x4ad399(0x125)+'ic\x20progres'+a18_0x4ad399(0x122)+a18_0x4ad399(0x206)+a18_0x4ad399(0x13e)+a18_0x4ad399(0x1c3)+'k_analysis'+a18_0x4ad399(0x16f)+a18_0x4ad399(0x23b)+a18_0x4ad399(0x1cd),a18_0x266437[a18_0x4ad399(0x20f)+'a']=GetAnalysisStatusSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x201)+a18_0x4ad399(0x24a),a18_0x266437,async _0x362ce5=>analysisController[a18_0x4ad399(0x234)+'sStatus'](_0x362ce5));const a18_0x175dd1={};a18_0x175dd1[a18_0x4ad399(0x152)]='Get\x20Analys'+a18_0x4ad399(0x1f9),a18_0x175dd1[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x26c)+'tailed\x20SAS'+a18_0x4ad399(0x159)+a18_0x4ad399(0x1af)+'nce\x20the\x20st'+a18_0x4ad399(0x264)+a18_0x4ad399(0x253)+a18_0x4ad399(0x1c8)+a18_0x4ad399(0x20d)+'ed\x20list\x20of'+a18_0x4ad399(0x1fe)+a18_0x4ad399(0x278)+'verity,\x20de'+a18_0x4ad399(0x1f1)+a18_0x4ad399(0x139)+a18_0x4ad399(0x17e)+a18_0x4ad399(0x133)+a18_0x4ad399(0x229)+a18_0x4ad399(0x266)+a18_0x4ad399(0x21f)+a18_0x4ad399(0x131)+'\x20of\x20the\x20fi'+a18_0x4ad399(0x1df),a18_0x175dd1['inputSchem'+'a']=GetAnalysisResultsSchema,server[a18_0x4ad399(0x1b6)+'ol']('get_analys'+'is_results',a18_0x175dd1,async _0x556ac0=>analysisController[a18_0x4ad399(0x234)+a18_0x4ad399(0x245)](_0x556ac0));const a18_0x2748f8={};a18_0x2748f8[a18_0x4ad399(0x152)]=a18_0x4ad399(0x144)+a18_0x4ad399(0x127)+a18_0x4ad399(0x124),a18_0x2748f8[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x26c)+'tailed\x20SCA'+a18_0x4ad399(0x18f)+a18_0x4ad399(0x1f2)+a18_0x4ad399(0x1aa)+a18_0x4ad399(0x18a)+a18_0x4ad399(0x267)+a18_0x4ad399(0x23c)+a18_0x4ad399(0x1e2)+a18_0x4ad399(0x1a6)+a18_0x4ad399(0x27b)+a18_0x4ad399(0x1b4)+a18_0x4ad399(0x1c5)+a18_0x4ad399(0x151)+a18_0x4ad399(0x17d)+a18_0x4ad399(0x12c)+'nse),\x20vuln'+a18_0x4ad399(0x219)+'lists\x20(CVE'+a18_0x4ad399(0x202)+a18_0x4ad399(0x16d)+a18_0x4ad399(0x196)+a18_0x4ad399(0x1ce)+a18_0x4ad399(0x249)+a18_0x4ad399(0x246),a18_0x2748f8['inputSchem'+'a']=GetScaAnalysisResultsSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x21a)+a18_0x4ad399(0x1ca)+a18_0x4ad399(0x124),a18_0x2748f8,async _0x38c8dd=>analysisController[a18_0x4ad399(0x217)+a18_0x4ad399(0x243)+'s'](_0x38c8dd));const a18_0x43ebc9={};a18_0x43ebc9[a18_0x4ad399(0x152)]='Download\x20S'+a18_0x4ad399(0x1ef),a18_0x43ebc9[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x181)+a18_0x4ad399(0x1c2)+'ted\x20SBOM\x20f'+'iles\x20(SPDX'+a18_0x4ad399(0x180)+a18_0x4ad399(0x277)+a18_0x4ad399(0x269)+a18_0x4ad399(0x13c)+a18_0x4ad399(0x187)+a18_0x4ad399(0x174)+a18_0x4ad399(0x1dc)+a18_0x4ad399(0x16b)+a18_0x4ad399(0x272)+a18_0x4ad399(0x14e)+a18_0x4ad399(0x1d6)+a18_0x4ad399(0x259)+'urns\x20the\x20l'+'ist\x20of\x20dow'+a18_0x4ad399(0x11a)+a18_0x4ad399(0x252),a18_0x43ebc9[a18_0x4ad399(0x20f)+'a']=DownloadSbomFilesSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x1ba)+a18_0x4ad399(0x1cc),a18_0x43ebc9,async _0x1cb1e0=>scaController[a18_0x4ad399(0x19c)+'omFiles'](_0x1cb1e0));const a18_0x4d3a43={};a18_0x4d3a43[a18_0x4ad399(0x152)]=a18_0x4ad399(0x207)+'ecure\x20Code',a18_0x4d3a43[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x166)+'lly\x20genera'+a18_0x4ad399(0x193)+'re,\x20patche'+a18_0x4ad399(0x1fa)+a18_0x4ad399(0x258)+a18_0x4ad399(0x1e0)+'ce\x20code\x20ba'+a18_0x4ad399(0x244)+a18_0x4ad399(0x16a)+a18_0x4ad399(0x1f6)+a18_0x4ad399(0x203)+a18_0x4ad399(0x273)+a18_0x4ad399(0x143)+a18_0x4ad399(0x1c0)+a18_0x4ad399(0x19f)+a18_0x4ad399(0x23f)+a18_0x4ad399(0x20b)+'x,\x20and\x20a\x20d'+'iff\x20showin'+a18_0x4ad399(0x1d2)+a18_0x4ad399(0x22d)+a18_0x4ad399(0x1c7)+a18_0x4ad399(0x148)+a18_0x4ad399(0x189)+a18_0x4ad399(0x13b)+'T.',a18_0x4d3a43[a18_0x4ad399(0x20f)+'a']=GenerateSecureCodeSchema,server[a18_0x4ad399(0x1b6)+'ol'](a18_0x4ad399(0x149)+a18_0x4ad399(0x1b5),a18_0x4d3a43,async _0x3ebc97=>securityController[a18_0x4ad399(0x1ed)+'cureCode'](_0x3ebc97));const a18_0x47af6c={};a18_0x47af6c['descriptio'+'n']=a18_0x4ad399(0x1a7)+a18_0x4ad399(0x1f3)+a18_0x4ad399(0x209)+'es\x20and\x20gui'+a18_0x4ad399(0x1ae)+'r\x20AI\x20agent'+'s.',a18_0x47af6c[a18_0x4ad399(0x157)]=a18_0x4ad399(0x1d9)+a18_0x4ad399(0x18d),server[a18_0x4ad399(0x14d)+a18_0x4ad399(0x19d)](a18_0x4ad399(0x220)+'les',a18_0x4ad399(0x271)+a18_0x4ad399(0x25c),a18_0x47af6c,async _0x3f539a=>{const _0x4b3860=a18_0x4ad399,_0x5d528b={};_0x5d528b[_0x4b3860(0x1e9)]=_0x3f539a[_0x4b3860(0x171)],_0x5d528b[_0x4b3860(0x22f)]=SPARROW_RULES,_0x5d528b[_0x4b3860(0x157)]=_0x4b3860(0x1d9)+'own';const _0xf2c9e4={};return _0xf2c9e4['contents']=[_0x5d528b],_0xf2c9e4;});const a18_0x23d31f={};a18_0x23d31f[a18_0x4ad399(0x152)]='Sparrow\x20MC'+a18_0x4ad399(0x190),a18_0x23d31f[a18_0x4ad399(0x121)+'n']=a18_0x4ad399(0x265)+a18_0x4ad399(0x1f3)+'\x20usage\x20rul'+a18_0x4ad399(0x123)+a18_0x4ad399(0x26b),server[a18_0x4ad399(0x120)+'ompt']('sparrow-ru'+a18_0x4ad399(0x1da),a18_0x23d31f,async()=>{const _0x37a558=a18_0x4ad399,_0x544668={};_0x544668[_0x37a558(0x212)]=_0x37a558(0x256);const _0x1a9aff=_0x544668,_0x5ae517={};_0x5ae517[_0x37a558(0x260)]=_0x37a558(0x22f),_0x5ae517['text']=SPARROW_RULES;const _0x3c4f34={};_0x3c4f34[_0x37a558(0x14f)]=_0x1a9aff[_0x37a558(0x212)],_0x3c4f34['content']=_0x5ae517;const _0x5cf3e6={};return _0x5cf3e6[_0x37a558(0x254)]=[_0x3c4f34],_0x5cf3e6;});const transport=new StdioServerTransport();logger['info']('MCP\x20secure'+a18_0x4ad399(0x1bc)+'ration\x20ser'+a18_0x4ad399(0x1ee)+'d');try{const serverFileDir=a18_0x1b7866[a18_0x4ad399(0x1b9)](fileURLToPath(import.meta.url)),projectRoot=a18_0x1b7866[a18_0x4ad399(0x283)](serverFileDir,'..'),logsDir=a18_0x1b7866['resolve'](projectRoot,a18_0x4ad399(0x251));if(!a18_0x11509b[a18_0x4ad399(0x1f8)](logsDir)){const a18_0x37b479={};a18_0x37b479[a18_0x4ad399(0x182)]=!![],a18_0x11509b[a18_0x4ad399(0x1ac)](logsDir,a18_0x37b479);}const combinedPath=a18_0x1b7866[a18_0x4ad399(0x200)](logsDir,'combined.l'+'og'),errorPath=a18_0x1b7866[a18_0x4ad399(0x200)](logsDir,'error.log');logger[a18_0x4ad399(0x27d)](a18_0x4ad399(0x195)+a18_0x4ad399(0x274)+'\x20combined:'+'\x20'+combinedPath+a18_0x4ad399(0x24f)+errorPath);}catch(a18_0x261f88){logger['warn']('Warning\x20wh'+a18_0x4ad399(0x188)+'ng/creatin'+a18_0x4ad399(0x191)+'ctory:',a18_0x261f88);}function a18_0x925d(_0x3351fd,_0xd0e766){_0x3351fd=_0x3351fd-0x11a;const _0x3edaa2=a18_0x4ac4();let _0x254706=_0x3edaa2[_0x3351fd];return _0x254706;}analysisService[a18_0x4ad399(0x20c)+a18_0x4ad399(0x226)+a18_0x4ad399(0x20e)]()[a18_0x4ad399(0x13d)](()=>{const _0x5df584=a18_0x4ad399;logger[_0x5df584(0x27d)](_0x5df584(0x165)+_0x5df584(0x218)+_0x5df584(0x1fd)+_0x5df584(0x205));})['catch'](_0x4151ea=>{const _0x4c5cb1=a18_0x4ad399;logger['warn'](_0x4c5cb1(0x165)+_0x4c5cb1(0x218)+_0x4c5cb1(0x22b)+_0x4c5cb1(0x11e)+_0x4c5cb1(0x1d0)+_0x4c5cb1(0x27e)+'\x20checker\x20i'+_0x4c5cb1(0x197),_0x4151ea);}),await server[a18_0x4ad399(0x248)](transport);
|
|
2
|
+
const a18_0x499644=a18_0x1f60;(function(_0x30d7c7,_0x42d7b3){const _0x61e893=a18_0x1f60,_0x5d556b=_0x30d7c7();while(!![]){try{const _0x4beb58=parseInt(_0x61e893(0x189))/0x1*(parseInt(_0x61e893(0x1e0))/0x2)+-parseInt(_0x61e893(0x23f))/0x3+parseInt(_0x61e893(0x22a))/0x4*(-parseInt(_0x61e893(0x173))/0x5)+parseInt(_0x61e893(0x227))/0x6+-parseInt(_0x61e893(0x21a))/0x7+parseInt(_0x61e893(0x240))/0x8+parseInt(_0x61e893(0x2ad))/0x9;if(_0x4beb58===_0x42d7b3)break;else _0x5d556b['push'](_0x5d556b['shift']());}catch(_0x334899){_0x5d556b['push'](_0x5d556b['shift']());}}}(a18_0x5bee,0xcb376));const a18_0x34ee85=(function(){let _0x5dc3d4=!![];return function(_0x47a18c,_0x2becaa){const _0x8893f=_0x5dc3d4?function(){const _0x530b1e=a18_0x1f60;if(_0x2becaa){const _0x515180=_0x2becaa[_0x530b1e(0x2a4)](_0x47a18c,arguments);return _0x2becaa=null,_0x515180;}}:function(){};return _0x5dc3d4=![],_0x8893f;};}()),a18_0x3b9de9=a18_0x34ee85(this,function(){const _0x42a5f1=a18_0x1f60,_0x2e562d={};_0x2e562d[_0x42a5f1(0x1d1)]='(((.+)+)+)'+'+$';const _0x4a5696=_0x2e562d;return a18_0x3b9de9[_0x42a5f1(0x284)]()[_0x42a5f1(0x1b3)](_0x42a5f1(0x184)+'+$')[_0x42a5f1(0x284)]()[_0x42a5f1(0x1c9)+'r'](a18_0x3b9de9)[_0x42a5f1(0x1b3)](_0x4a5696[_0x42a5f1(0x1d1)]);});a18_0x3b9de9();import{McpServer}from'@modelcontextprotocol/sdk/server/mcp.js';import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{AnalysisService}from'./services/analysis.service.js';import{logger}from'./utils/logger.js';function a18_0x5bee(){const _0xd9870b=['\x20Analysis','tailed\x20SCA','an\x20analysi','\x20usage\x20rul','Automatica','e\x20SCA\x20Anal','Load\x20the\x20S','ultiple\x20de','CESS,\x20ANAL','contents','\x20a\x20full-pr','of\x20the\x20ori','ute\x20paths.','Downloads\x20','e-generato','ZIP\x20File\x20S','nd\x20remedia','brary\x20upda','ysis_progr','ct\x20is\x20alre','\x27COMPLETE\x27','eSca','\x20Service).','get_analys','output/sbo','tion\x20guida','iff\x20showin','\x20categoriz','then','rity\x20of\x20a\x20','lysis','Initiates\x20','\x20SCA\x20Analy','Analysis\x20s','P.\x20It\x20scan','.\x20Returns\x20','parrow\x20MCP','ed\x20list\x20of','Generate\x20S','_modules)\x20','ables\x20(ver','search','generate_s','to\x20see\x20if\x20',',\x20error:\x20','Periodical','resolve','omatically','\x20an\x20\x27analy','mimeType','status\x20is\x20','s\x20is\x20\x27COMP','Multi-File','ified\x20by\x20t','atic\x20Appli','error.log','g\x20the\x20chan','\x20archive\x20c','is_status','type','ysisResult','sed\x20on\x20pre','Y,\x20PRE_PRO','constructo','r\x20analyzin','\x20It\x20identi','Returns\x20an','ce\x20code\x20ba','lder_sca','leted\x20SCA\x20','MCP\x20secure','CiflU','combined.l','ense\x20issue','lysis\x20on\x20m','vided\x20duri','\x20project.\x20','verity,\x20de','files\x20to\x20i','ist\x20of\x20dow','generateSe','\x20once\x20the\x20','m/<analysi','\x20packages\x20','sisId\x27.','s\x20only\x20pro','293256svjmYS','\x20the\x20corre','s)\x20results','vulnerable','get_sca_an','\x20is\x20prefer','a\x20comprehe','analyzeZip','mkdirSync','ess','ecure\x20Code','and\x20upload','text','ce\x20risks.\x20','ults','warn','nce\x20the\x20st','user','\x20open-sour','ialization','dules\x20or\x20p','Checker\x20se','analyzeFol','\x20(Software','ty\x20flaws.\x20','esSca','rogress\x20an','fication.\x20','delines\x20fo','\x20an\x20ongoin','a\x20SAST\x20ana','ile\x20vulner','track_anal','X,\x20SWID)\x20f','nsive\x20SAST','m.xml,\x20req','lnerabilit','dependenci','cation\x20Sec','iance\x20info','derSast','ady\x20packag','\x20artifacts','f\x20a\x20single','bom_files','name','analyzeFil','t\x20provides','urce\x20code\x20','inputSchem','Get\x20SCA\x20An','connect','descriptio','dentify\x20vu','ginal\x20sour','Checks\x20the','specific\x20c','s\x20the\x20code','6222384vUpBYb','nce\x20for\x20li','analyze_fo','version','like\x20a\x20Con','d\x20set\x20of\x20f','ue\x20without','e\x20SAST\x20Ana','\x20of\x20the\x20fi','g\x20the\x20logi','n\x20\x27analysi','\x20Returns\x20a','nalysis)\x20o','4413234bTJUSN','\x20legacy\x20pr','trackAnaly','943084NULPYm','the\x20genera','I-generate','les','mmon\x20build','Official\x20S','ysis','saved\x20to\x20t','CA\x20Analysi','ort\x20with\x20c','es.\x20Useful','uri','join','eSast','troller\x20or','Log\x20file\x20l','rvice\x20init','sparrow://','tages\x20are\x20','ule)\x20to\x20fi','p_sast','3986412uXVbRo','10932488TElscA','OMPLETE\x27.\x20','les_sca','tes.','ly\x20check\x20a','sResults','agers.\x20Ret','initialize','title','sId\x27.','rsal\x20withi','ndings.','nalysisId\x27','ctive\x20wait','\x20like\x20node','iles\x20(e.g.','Files\x20are\x20','ry.\x20It\x20aut','registerRe','LETE\x27\x20and\x20','\x20content\x20o','rabilities','\x20analysis\x20','is_results','ile\x20checki','re\x20directo','for\x20securi','les_sast','dentifies\x20','the\x20entire','erability\x20','omponent\x20t','pendency\x20f','Folder\x20SAS','_progress\x27','Single\x20Fil','dirname','sId>\x27\x20dire','c\x20and\x20secu','\x20Useful\x20fo','ported\x20dep','t\x20or\x20a\x20sin','secure-cod','the\x20source','cts\x20with\x20m','\x20Compositi','fies\x20vulne','position\x20A','ic\x20progres','ccessfully','COMPLETE.\x20','ode\x20snippe','ing,\x20\x27trac','ultiple\x20mo','re,\x20patche','own','an\x20SCA\x20sca','ackaged\x20or','le_sast',',\x20CycloneD','Download\x20S','is\x20Results','es\x20into\x20th','vious\x20SAST','he\x20local\x20\x27','endency\x20de','href','ng\x20the\x20ANA','toString','results.\x20I','ompt','ialized\x20su','finding\x20vu','ontaining\x20','\x20project\x20f','\x20a\x20compreh','\x20current\x20p','\x20this\x20when','source','\x20SAST\x20Anal','download_s','sion,\x20lice','T\x20analysis','registerPr',')\x20and\x20an\x20A','n\x20on\x20a\x20ZIP','lly\x20genera','heir\x20absol','T\x20Analysis','le\x20paths.','rules','Get\x20Analys','injection,','isId\x27\x20for\x20','rom\x20a\x20comp','path\x20trave','\x20source\x20co','x,\x20and\x20a\x20d','tailed\x20SAS','g\x20a\x20relate','apply','older.\x20It\x20','Id\x27.','\x20files\x20(ex','uirements.','or\x20all\x20sup','Provides\x20a','\x20\x27analysis','analysis\x20I','17821953BrMWBw','lists\x20(CVE','.\x20Use\x20this','getScaAnal','messages','ogress\x20by\x20','Folder\x20SCA','nalysis\x20pr','cted\x20code,','content','sparrow-ru',',\x20CVSS),\x20a','scription,','Sca','\x20ZIP\x20archi','_PROCESS,\x20','e\x20archive\x20','ensive\x20rep','INIT,\x20READ','ed\x20as\x20a\x20ZI','lities\x20(se','\x20XSS,\x20and\x20',',\x20a\x20packag','n\x20a\x20single','\x20code\x20gene','getAnalysi','txt).\x20It\x20i','ill\x20contin','analyze_fi','registerTo','red.','ing)\x20analy','lysis\x20on\x20a','info','on\x20Analysi','1.0.0','urity\x20Test','\x20for\x20manua','nloaded\x20fi','ojects\x20for','ftware\x20Com','cureCode','s\x20percenta','ctory:','\x20dependenc','ce.\x20Useful','CheckerSer','es\x20and\x20lic','files\x20spec','25nCLnYH','ges.\x20For\x20a','gress\x20Noti','atus\x20is\x20\x27C','d\x20version\x20','ctory.\x20Ret','es\x20and\x20gui','analysis.\x20','urns\x20an\x20\x27a','derSca','recursive','lder_sast','logs','YSIS,\x20POST','Sast','role','ng/creatin','(((.+)+)+)','sisProgres','de\x20file.\x20U','.\x20Provides','omFiles','1TZenRd'];a18_0x5bee=function(){return _0xd9870b;};return a18_0x5bee();}import a18_0x539fa3 from'path';function a18_0x1f60(_0x2d83f1,_0x24c648){_0x2d83f1=_0x2d83f1-0x171;const _0x158061=a18_0x5bee();let _0x3b9de9=_0x158061[_0x2d83f1];return _0x3b9de9;}import a18_0x3cce3b from'fs';import{fileURLToPath}from'url';import{SPARROW_RULES}from'./config/constants.js';import{AnalyzeFileSastSchema,AnalyzeFilesSastSchema,AnalyzeFolderSastSchema,AnalyzeZipSastSchema,AnalyzeFileScaSchema,AnalyzeFilesScaSchema,AnalyzeFolderScaSchema,AnalyzeZipScaSchema,TrackAnalysisProgressSchema,GetAnalysisStatusSchema,GetAnalysisResultsSchema,GetScaAnalysisResultsSchema,GenerateSecureCodeSchema,DownloadSbomFilesSchema}from'./schemas/tool.schemas.js';import{SastController}from'./controllers/sast.controller.js';import{ScaController}from'./controllers/sca.controller.js';import{AnalysisController}from'./controllers/analysis.controller.js';import{SecurityController}from'./controllers/security.controller.js';import{SystemController}from'./controllers/system.controller.js';const a18_0x3e6e9b={};a18_0x3e6e9b[a18_0x499644(0x20d)]=a18_0x499644(0x26a)+a18_0x499644(0x198)+'r',a18_0x3e6e9b[a18_0x499644(0x21d)]=a18_0x499644(0x2d0);const server=new McpServer(a18_0x3e6e9b),analysisService=new AnalysisService(),sastController=new SastController(analysisService),scaController=new ScaController(analysisService),analysisController=new AnalysisController(analysisService),securityController=new SecurityController(analysisService),systemController=new SystemController(),a18_0x449a09={};a18_0x449a09[a18_0x499644(0x248)]='Single\x20Fil'+a18_0x499644(0x221)+a18_0x499644(0x1a8),a18_0x449a09[a18_0x499644(0x214)+'n']='Initiates\x20'+'a\x20SAST\x20(St'+a18_0x499644(0x1c0)+a18_0x499644(0x206)+a18_0x499644(0x2d1)+a18_0x499644(0x2cc)+'sis\x20on\x20the'+a18_0x499644(0x254)+a18_0x499644(0x20b)+a18_0x499644(0x2a0)+a18_0x499644(0x186)+'se\x20this\x20fo'+'r\x20analyzin'+a18_0x499644(0x223)+a18_0x499644(0x266)+a18_0x499644(0x1a7)+a18_0x499644(0x218)+a18_0x499644(0x273)+a18_0x499644(0x269)+'gle\x20file\x20('+a18_0x499644(0x21e)+a18_0x499644(0x238)+a18_0x499644(0x1a0)+a18_0x499644(0x1cb)+a18_0x499644(0x26e)+a18_0x499644(0x255)+'\x20like\x20SQL\x20'+a18_0x499644(0x29c)+a18_0x499644(0x2c2)+a18_0x499644(0x29f)+a18_0x499644(0x24a)+'n\x20the\x20code'+a18_0x499644(0x1ad)+'an\x20\x27analys'+a18_0x499644(0x29d)+'tracking.',a18_0x449a09[a18_0x499644(0x211)+'a']=AnalyzeFileSastSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x2c9)+a18_0x499644(0x27a),a18_0x449a09,async _0x28a0f3=>sastController[a18_0x499644(0x20e)+a18_0x499644(0x237)](_0x28a0f3));const a18_0x5799e8={};a18_0x5799e8[a18_0x499644(0x248)]=a18_0x499644(0x1be)+a18_0x499644(0x28f)+a18_0x499644(0x230),a18_0x5799e8['descriptio'+'n']=a18_0x499644(0x1a9)+a18_0x499644(0x1fe)+a18_0x499644(0x1d4)+'ultiple\x20so'+a18_0x499644(0x210)+a18_0x499644(0x172)+a18_0x499644(0x1bf)+a18_0x499644(0x297)+a18_0x499644(0x196)+a18_0x499644(0x267)+a18_0x499644(0x1ca)+a18_0x499644(0x2a3)+a18_0x499644(0x21f)+a18_0x499644(0x24f)+a18_0x499644(0x2c3)+'e\x20or\x20a\x20mod'+a18_0x499644(0x23d)+'nd\x20cross-f'+a18_0x499644(0x1ff)+'abilities.'+'\x20Returns\x20a'+a18_0x499644(0x224)+a18_0x499644(0x249),a18_0x5799e8[a18_0x499644(0x211)+'a']=AnalyzeFilesSastSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x2c9)+a18_0x499644(0x25b),a18_0x5799e8,async _0xd1cccc=>sastController[a18_0x499644(0x20e)+'esSast'](_0xd1cccc));const a18_0x2598ad={};a18_0x2598ad[a18_0x499644(0x248)]=a18_0x499644(0x261)+a18_0x499644(0x298),a18_0x2598ad[a18_0x499644(0x214)+'n']=a18_0x499644(0x1a9)+a18_0x499644(0x1e6)+a18_0x499644(0x202)+a18_0x499644(0x256)+'on\x20an\x20enti'+a18_0x499644(0x259)+a18_0x499644(0x251)+a18_0x499644(0x1b9)+a18_0x499644(0x1dd)+a18_0x499644(0x26b)+a18_0x499644(0x2a7)+'cluding\x20co'+a18_0x499644(0x22e)+a18_0x499644(0x20a)+a18_0x499644(0x24e)+a18_0x499644(0x1b1)+a18_0x499644(0x1eb)+'s\x20them\x20for'+a18_0x499644(0x194)+'oject\x20secu'+'rity\x20scan.'+a18_0x499644(0x225)+a18_0x499644(0x224)+'sId\x27.',a18_0x2598ad[a18_0x499644(0x211)+'a']=AnalyzeFolderSastSchema,server['registerTo'+'ol'](a18_0x499644(0x21c)+a18_0x499644(0x17e),a18_0x2598ad,async _0x3ef06f=>sastController[a18_0x499644(0x1f6)+a18_0x499644(0x208)](_0x3ef06f));const a18_0x236c17={};a18_0x236c17[a18_0x499644(0x248)]=a18_0x499644(0x199)+'AST\x20Analys'+'is',a18_0x236c17[a18_0x499644(0x214)+'n']=a18_0x499644(0x1a9)+a18_0x499644(0x1fe)+a18_0x499644(0x2cd)+a18_0x499644(0x2bb)+'ve\x20contain'+'ing\x20source'+'\x20code.\x20Use'+a18_0x499644(0x28d)+'\x20the\x20proje'+a18_0x499644(0x19d)+a18_0x499644(0x209)+a18_0x499644(0x2c0)+a18_0x499644(0x1ac)+a18_0x499644(0x219)+'\x20within\x20th'+a18_0x499644(0x2bd)+a18_0x499644(0x25a)+a18_0x499644(0x1f8)+a18_0x499644(0x1cc)+a18_0x499644(0x2ab)+a18_0x499644(0x2a6),a18_0x236c17['inputSchem'+'a']=AnalyzeZipSastSchema,server['registerTo'+'ol']('analyze_zi'+a18_0x499644(0x23e),a18_0x236c17,async _0x401307=>sastController[a18_0x499644(0x1e7)+a18_0x499644(0x181)](_0x401307));const a18_0x198aba={};a18_0x198aba[a18_0x499644(0x248)]=a18_0x499644(0x263)+a18_0x499644(0x18f)+a18_0x499644(0x230),a18_0x198aba[a18_0x499644(0x214)+'n']=a18_0x499644(0x1a9)+'an\x20SCA\x20(So'+a18_0x499644(0x2d5)+a18_0x499644(0x26f)+a18_0x499644(0x226)+a18_0x499644(0x2c4)+a18_0x499644(0x2d9)+'y\x20file\x20(e.'+'g.,\x20packag'+'e.json,\x20po'+a18_0x499644(0x203)+a18_0x499644(0x2a8)+a18_0x499644(0x2c7)+a18_0x499644(0x25c)+a18_0x499644(0x1e3)+a18_0x499644(0x1f2)+'ce\x20librari'+a18_0x499644(0x171)+a18_0x499644(0x1d3)+'s.\x20Returns'+a18_0x499644(0x1ba)+a18_0x499644(0x1de),a18_0x198aba['inputSchem'+'a']=AnalyzeFileScaSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x2c9)+'le_sca',a18_0x198aba,async _0x57a928=>scaController[a18_0x499644(0x20e)+a18_0x499644(0x19f)](_0x57a928));const a18_0x2249b7={};a18_0x2249b7[a18_0x499644(0x248)]='Multi-File'+a18_0x499644(0x1aa)+'sis',a18_0x2249b7['descriptio'+'n']=a18_0x499644(0x1a9)+'an\x20SCA\x20ana'+'lysis\x20on\x20m'+a18_0x499644(0x191)+a18_0x499644(0x260)+'iles\x20at\x20on'+a18_0x499644(0x2da)+'\x20for\x20proje'+a18_0x499644(0x26c)+a18_0x499644(0x275)+a18_0x499644(0x1f4)+'ackage\x20man'+a18_0x499644(0x246)+a18_0x499644(0x17b)+a18_0x499644(0x24c)+'.',a18_0x2249b7[a18_0x499644(0x211)+'a']=AnalyzeFilesScaSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x2c9)+a18_0x499644(0x242),a18_0x2249b7,async _0x534ddd=>scaController[a18_0x499644(0x20e)+a18_0x499644(0x1f9)](_0x534ddd));const a18_0x4fbebf={};a18_0x4fbebf[a18_0x499644(0x248)]=a18_0x499644(0x2b3)+a18_0x499644(0x18a),a18_0x4fbebf[a18_0x499644(0x214)+'n']=a18_0x499644(0x1a9)+'a\x20full\x20SCA'+'\x20scan\x20on\x20a'+a18_0x499644(0x28a)+a18_0x499644(0x2a5)+'searches\x20f'+a18_0x499644(0x2a9)+a18_0x499644(0x268)+a18_0x499644(0x281)+'claration\x20'+a18_0x499644(0x1d8)+a18_0x499644(0x215)+a18_0x499644(0x204)+'ies\x20and\x20li'+'cense\x20comp'+'liance\x20ris'+'ks\x20across\x20'+a18_0x499644(0x25d)+a18_0x499644(0x1d6)+a18_0x499644(0x1cc)+a18_0x499644(0x2ab)+a18_0x499644(0x2a6),a18_0x4fbebf['inputSchem'+'a']=AnalyzeFolderScaSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x21c)+a18_0x499644(0x1ce),a18_0x4fbebf,async _0xbd661c=>scaController[a18_0x499644(0x1f6)+a18_0x499644(0x17c)](_0xbd661c));const a18_0x4b5ab1={};a18_0x4b5ab1['title']=a18_0x499644(0x199)+a18_0x499644(0x232)+'s',a18_0x4b5ab1[a18_0x499644(0x214)+'n']='Initiates\x20'+a18_0x499644(0x278)+a18_0x499644(0x295)+a18_0x499644(0x1c3)+a18_0x499644(0x289)+a18_0x499644(0x205)+a18_0x499644(0x234)+'\x20for\x20analy'+'zing\x20pre-p'+a18_0x499644(0x279)+a18_0x499644(0x228)+a18_0x499644(0x2d4)+'\x20open-sour'+a18_0x499644(0x1ed)+a18_0x499644(0x1cc)+'\x20\x27analysis'+'Id\x27.',a18_0x4b5ab1[a18_0x499644(0x211)+'a']=AnalyzeZipScaSchema,server[a18_0x499644(0x2ca)+'ol']('analyze_zi'+'p_sca',a18_0x4b5ab1,async _0x333293=>scaController[a18_0x499644(0x1e7)+a18_0x499644(0x2ba)](_0x333293));const a18_0x3e2ef0={};a18_0x3e2ef0['title']='Track\x20Anal'+'ysis\x20Progr'+a18_0x499644(0x1e9),a18_0x3e2ef0[a18_0x499644(0x214)+'n']=a18_0x499644(0x1b7)+a18_0x499644(0x244)+a18_0x499644(0x2b4)+a18_0x499644(0x2b2)+a18_0x499644(0x2ac)+'D\x20and\x20upda'+'te\x20via\x20Pro'+a18_0x499644(0x175)+a18_0x499644(0x1fb)+a18_0x499644(0x1ab)+a18_0x499644(0x23c)+a18_0x499644(0x2bf)+a18_0x499644(0x1c8)+a18_0x499644(0x192)+a18_0x499644(0x180)+a18_0x499644(0x2bc)+a18_0x499644(0x272)+'Progress\x20i'+a18_0x499644(0x1df)+a18_0x499644(0x1d5)+a18_0x499644(0x283)+'LYSIS\x20stag'+'e.',a18_0x3e2ef0[a18_0x499644(0x211)+'a']=TrackAnalysisProgressSchema,server['registerTo'+'ol'](a18_0x499644(0x200)+a18_0x499644(0x19c)+a18_0x499644(0x1e9),a18_0x3e2ef0,async(_0x3935db,_0x2e4996)=>analysisController[a18_0x499644(0x229)+a18_0x499644(0x185)+'s'](_0x3935db,_0x2e4996));const a18_0x81f31e={};a18_0x81f31e[a18_0x499644(0x248)]=a18_0x499644(0x29b)+'is\x20Status',a18_0x81f31e[a18_0x499644(0x214)+'n']=a18_0x499644(0x217)+a18_0x499644(0x28c)+a18_0x499644(0x1fa)+'d\x20stage\x20of'+a18_0x499644(0x1fd)+'g\x20analysis'+a18_0x499644(0x2af)+a18_0x499644(0x2d2)+'l\x20polling\x20'+a18_0x499644(0x1b5)+a18_0x499644(0x18c)+a18_0x499644(0x1bd)+a18_0x499644(0x253)+'to\x20get\x20bas'+a18_0x499644(0x270)+a18_0x499644(0x2d7)+a18_0x499644(0x174)+a18_0x499644(0x24d)+a18_0x499644(0x274)+'k_analysis'+a18_0x499644(0x262)+a18_0x499644(0x1e5)+a18_0x499644(0x2cb),a18_0x81f31e['inputSchem'+'a']=GetAnalysisStatusSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x1a1)+a18_0x499644(0x1c4),a18_0x81f31e,async _0x2627bd=>analysisController['getAnalysi'+'sStatus'](_0x2627bd));const a18_0x69038b={};a18_0x69038b['title']='Get\x20Analys'+a18_0x499644(0x27d),a18_0x69038b[a18_0x499644(0x214)+'n']='Fetches\x20de'+a18_0x499644(0x2a2)+a18_0x499644(0x292)+'\x20results\x20o'+a18_0x499644(0x1f0)+a18_0x499644(0x176)+a18_0x499644(0x241)+a18_0x499644(0x2aa)+a18_0x499644(0x1a5)+a18_0x499644(0x1af)+'\x20vulnerabi'+a18_0x499644(0x2c1)+a18_0x499644(0x1d7)+a18_0x499644(0x2b9)+'\x20file\x20path'+',\x20line\x20num'+'ber,\x20compl'+a18_0x499644(0x207)+a18_0x499644(0x294)+a18_0x499644(0x22c)+'d\x20briefing'+a18_0x499644(0x222)+a18_0x499644(0x24b),a18_0x69038b[a18_0x499644(0x211)+'a']=GetAnalysisResultsSchema,server['registerTo'+'ol'](a18_0x499644(0x1a1)+a18_0x499644(0x257),a18_0x69038b,async _0x4c43f0=>analysisController[a18_0x499644(0x2c6)+a18_0x499644(0x245)](_0x4c43f0));const a18_0x1bea82={};a18_0x1bea82['title']=a18_0x499644(0x212)+'alysis\x20Res'+a18_0x499644(0x1ee),a18_0x1bea82[a18_0x499644(0x214)+'n']='Fetches\x20de'+a18_0x499644(0x18b)+a18_0x499644(0x1f7)+a18_0x499644(0x26d)+a18_0x499644(0x2cf)+a18_0x499644(0x1e2)+a18_0x499644(0x1db)+a18_0x499644(0x1bc)+a18_0x499644(0x19e)+a18_0x499644(0x187)+a18_0x499644(0x28b)+a18_0x499644(0x2be)+a18_0x499644(0x233)+a18_0x499644(0x25f)+a18_0x499644(0x1b2)+a18_0x499644(0x291)+'nse),\x20vuln'+a18_0x499644(0x25e)+a18_0x499644(0x2ae)+a18_0x499644(0x2b8)+a18_0x499644(0x19a)+a18_0x499644(0x1a3)+a18_0x499644(0x21b)+a18_0x499644(0x19b)+a18_0x499644(0x243),a18_0x1bea82['inputSchem'+'a']=GetScaAnalysisResultsSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x1e4)+'alysis_res'+a18_0x499644(0x1ee),a18_0x1bea82,async _0x780745=>analysisController[a18_0x499644(0x2b0)+a18_0x499644(0x1c6)+'s'](_0x780745));const a18_0x395cfa={};a18_0x395cfa[a18_0x499644(0x248)]=a18_0x499644(0x27c)+'BOM\x20Files',a18_0x395cfa['descriptio'+'n']=a18_0x499644(0x197)+a18_0x499644(0x22b)+'ted\x20SBOM\x20f'+'iles\x20(SPDX'+a18_0x499644(0x27b)+a18_0x499644(0x201)+a18_0x499644(0x29e)+a18_0x499644(0x1cf)+a18_0x499644(0x17a)+a18_0x499644(0x250)+a18_0x499644(0x231)+a18_0x499644(0x280)+a18_0x499644(0x1a2)+a18_0x499644(0x1dc)+a18_0x499644(0x265)+a18_0x499644(0x178)+'urns\x20the\x20l'+a18_0x499644(0x1d9)+a18_0x499644(0x2d3)+a18_0x499644(0x299),a18_0x395cfa['inputSchem'+'a']=DownloadSbomFilesSchema,server[a18_0x499644(0x2ca)+'ol'](a18_0x499644(0x290)+a18_0x499644(0x20c),a18_0x395cfa,async _0x241220=>scaController['downloadSb'+a18_0x499644(0x188)](_0x241220));const a18_0x46fc65={};a18_0x46fc65[a18_0x499644(0x248)]=a18_0x499644(0x1b0)+a18_0x499644(0x1ea),a18_0x46fc65[a18_0x499644(0x214)+'n']=a18_0x499644(0x18e)+a18_0x499644(0x296)+'tes\x20a\x20secu'+a18_0x499644(0x276)+a18_0x499644(0x177)+a18_0x499644(0x195)+a18_0x499644(0x216)+a18_0x499644(0x1cd)+a18_0x499644(0x1c7)+a18_0x499644(0x27f)+a18_0x499644(0x256)+a18_0x499644(0x285)+a18_0x499644(0x20f)+a18_0x499644(0x1e1)+a18_0x499644(0x2b5)+'\x20a\x20brief\x20e'+'xplanation'+a18_0x499644(0x222)+a18_0x499644(0x2a1)+a18_0x499644(0x1a4)+a18_0x499644(0x1c2)+'ges.\x20Use\x20t'+'his\x20after\x20'+a18_0x499644(0x288)+a18_0x499644(0x204)+'ies\x20in\x20SAS'+'T.',a18_0x46fc65[a18_0x499644(0x211)+'a']=GenerateSecureCodeSchema,server['registerTo'+'ol'](a18_0x499644(0x1b4)+'ecure_code',a18_0x46fc65,async _0x1b718c=>securityController[a18_0x499644(0x1da)+a18_0x499644(0x2d6)](_0x1b718c));const a18_0x203396={};a18_0x203396[a18_0x499644(0x214)+'n']=a18_0x499644(0x22f)+a18_0x499644(0x1ae)+a18_0x499644(0x18d)+a18_0x499644(0x179)+a18_0x499644(0x1fc)+'r\x20AI\x20agent'+'s.',a18_0x203396[a18_0x499644(0x1bb)]='text/markd'+a18_0x499644(0x277),server[a18_0x499644(0x252)+a18_0x499644(0x28e)](a18_0x499644(0x2b7)+a18_0x499644(0x22d),a18_0x499644(0x23b)+a18_0x499644(0x29a),a18_0x203396,async _0x6539f=>{const _0x51afd7=a18_0x499644,_0x541a50={};_0x541a50[_0x51afd7(0x235)]=_0x6539f[_0x51afd7(0x282)],_0x541a50[_0x51afd7(0x1ec)]=SPARROW_RULES,_0x541a50[_0x51afd7(0x1bb)]='text/markd'+_0x51afd7(0x277);const _0x4777cc={};return _0x4777cc[_0x51afd7(0x193)]=[_0x541a50],_0x4777cc;});const a18_0x4138a6={};a18_0x4138a6[a18_0x499644(0x248)]='Sparrow\x20MC'+'P\x20Rules',a18_0x4138a6[a18_0x499644(0x214)+'n']=a18_0x499644(0x190)+a18_0x499644(0x1ae)+'\x20usage\x20rul'+a18_0x499644(0x27e)+'e\x20context.',server[a18_0x499644(0x293)+a18_0x499644(0x286)](a18_0x499644(0x2b7)+'les',a18_0x4138a6,async()=>{const _0x18c428=a18_0x499644,_0x2acf1a={};_0x2acf1a[_0x18c428(0x1c5)]=_0x18c428(0x1ec),_0x2acf1a[_0x18c428(0x1ec)]=SPARROW_RULES;const _0x22ea53={};_0x22ea53[_0x18c428(0x182)]=_0x18c428(0x1f1),_0x22ea53[_0x18c428(0x2b6)]=_0x2acf1a;const _0x5a507b={};return _0x5a507b[_0x18c428(0x2b1)]=[_0x22ea53],_0x5a507b;});const transport=new StdioServerTransport();logger[a18_0x499644(0x2ce)](a18_0x499644(0x1d0)+a18_0x499644(0x2c5)+'ration\x20ser'+'ver\x20starte'+'d');try{const serverFileDir=a18_0x539fa3[a18_0x499644(0x264)](fileURLToPath(import.meta.url)),projectRoot=a18_0x539fa3[a18_0x499644(0x1b8)](serverFileDir,'..'),logsDir=a18_0x539fa3[a18_0x499644(0x1b8)](projectRoot,a18_0x499644(0x17f));if(!a18_0x3cce3b['existsSync'](logsDir)){const a18_0x2c8aa5={};a18_0x2c8aa5[a18_0x499644(0x17d)]=!![],a18_0x3cce3b[a18_0x499644(0x1e8)](logsDir,a18_0x2c8aa5);}const combinedPath=a18_0x539fa3[a18_0x499644(0x236)](logsDir,a18_0x499644(0x1d2)+'og'),errorPath=a18_0x539fa3[a18_0x499644(0x236)](logsDir,a18_0x499644(0x1c1));logger[a18_0x499644(0x2ce)](a18_0x499644(0x239)+'ocations\x20-'+'\x20combined:'+'\x20'+combinedPath+a18_0x499644(0x1b6)+errorPath);}catch(a18_0x9b3e36){logger[a18_0x499644(0x1ef)]('Warning\x20wh'+a18_0x499644(0x258)+a18_0x499644(0x183)+'g\x20log\x20dire'+a18_0x499644(0x2d8),a18_0x9b3e36);}analysisService[a18_0x499644(0x247)+a18_0x499644(0x2db)+'vice']()[a18_0x499644(0x1a6)](()=>{const _0x8a2cd1=a18_0x499644;logger[_0x8a2cd1(0x2ce)](_0x8a2cd1(0x1f5)+_0x8a2cd1(0x23a)+_0x8a2cd1(0x287)+_0x8a2cd1(0x271));})['catch'](_0x413df2=>{const _0x3b4c11=a18_0x499644;logger[_0x3b4c11(0x1ef)](_0x3b4c11(0x1f5)+'rvice\x20init'+_0x3b4c11(0x1f3)+'\x20failed\x20(w'+_0x3b4c11(0x2c8)+_0x3b4c11(0x220)+'\x20checker\x20i'+'nfo):',_0x413df2);}),await server[a18_0x499644(0x213)](transport);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a31_0x17af1b=a31_0x149b;(function(_0x471ca8,_0x41e733){const _0x2e2c55=a31_0x149b,_0x51eb1d=_0x471ca8();while(!![]){try{const _0x1398dd=-parseInt(_0x2e2c55(0x97))/0x1*(-parseInt(_0x2e2c55(0x70))/0x2)+parseInt(_0x2e2c55(0xa1))/0x3*(-parseInt(_0x2e2c55(0x91))/0x4)+-parseInt(_0x2e2c55(0x83))/0x5+-parseInt(_0x2e2c55(0x90))/0x6+-parseInt(_0x2e2c55(0x78))/0x7*(-parseInt(_0x2e2c55(0xa0))/0x8)+parseInt(_0x2e2c55(0x9a))/0x9*(parseInt(_0x2e2c55(0x68))/0xa)+parseInt(_0x2e2c55(0x7e))/0xb;if(_0x1398dd===_0x41e733)break;else _0x51eb1d['push'](_0x51eb1d['shift']());}catch(_0x12448d){_0x51eb1d['push'](_0x51eb1d['shift']());}}}(a31_0xa56c,0xa1a64));const a31_0x26efc5=(function(){let _0x1dac3a=!![];return function(_0x2a8df2,_0x48e475){const _0x232682=_0x1dac3a?function(){if(_0x48e475){const _0x197d21=_0x48e475['apply'](_0x2a8df2,arguments);return _0x48e475=null,_0x197d21;}}:function(){};return _0x1dac3a=![],_0x232682;};}()),a31_0x503711=a31_0x26efc5(this,function(){const _0x246b36=a31_0x149b;return a31_0x503711[_0x246b36(0x93)]()['search'](_0x246b36(0xaf)+'+$')[_0x246b36(0x93)]()[_0x246b36(0x8d)+'r'](a31_0x503711)[_0x246b36(0x9f)](_0x246b36(0xaf)+'+$');});function a31_0x149b(_0xe9c965,_0x542a96){_0xe9c965=_0xe9c965-0x68;const _0x5bfdf3=a31_0xa56c();let _0x503711=_0x5bfdf3[_0xe9c965];return _0x503711;}a31_0x503711();function a31_0xa56c(){const _0x41d262=['rrectly','yuFqR','409270gsWoji','nRecommend','.AND.LT.OR','.service.j','SION.GT.AN','should\x20for','D.LT','toBe','30653PCETFL','.EQUAL.AND','../sparrow','1.9.0','rectly','ation','25162940vSLqAL','name','1.9.15\x20이상\x20','버전으로\x20업데이트하','SCA.SV.COM','6366125CVCHSn','orrectly','.LT','1.9.15\x20초과\x20','mat\x20UPDATE','type','T.OR.EQUAL','s/logger.j','MON.5896','rvice\x20-\x20Re','constructo','.VERSION.G','VhkXW','7651446zZHQOI','60ryBlrj','ice.js','toString','versionRem','parseScaCo','1.9.16','2RaPJFd','T.AND.LT.O','SION.GT.OR','18ZlrvIg','ediations','mock','.AND.LT\x20co','versions','search','1256wpbOOs','90339CsEmDQ','../checker','R.EQUAL\x20co','1.9.16\x20미만\x20','vOGjW','ant','../s3.serv','../llm.ser','1.9.15','.LT.OR.EQU','remediatio','issues','checkerKey','세요.','(((.+)+)+)','1389820yrPCDB','UPDATE.VER','.EQUAL\x20cor','mponents','version','T.AND.LT\x20c'];a31_0xa56c=function(){return _0x41d262;};return a31_0xa56c();}import{AnalysisService}from'../analysis.service.js';import{jest}from'@jest/globals';jest[a31_0x17af1b(0x9c)](a31_0x17af1b(0xa8)+'vice.js'),jest['mock'](a31_0x17af1b(0x7a)+a31_0x17af1b(0x73)+'s'),jest[a31_0x17af1b(0x9c)](a31_0x17af1b(0xa7)+a31_0x17af1b(0x92)),jest[a31_0x17af1b(0x9c)](a31_0x17af1b(0xa2)+a31_0x17af1b(0x73)+'s'),jest['mock']('../../util'+a31_0x17af1b(0x8a)+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn'](),'warn':jest['fn'](),'debug':jest['fn']()}})),describe('AnalysisSe'+a31_0x17af1b(0x8c)+'mediation\x20'+'Formatting',()=>{const _0x5aca09=a31_0x17af1b,_0x2e5895={'vOGjW':'1.9.15','yuFqR':_0x5aca09(0x75)+_0x5aca09(0x87)+_0x5aca09(0x8e)+_0x5aca09(0x89)+_0x5aca09(0x72)+_0x5aca09(0x6a)+_0x5aca09(0x7c),'VhkXW':function(_0x353bfd,_0x2e4f79,_0x4e9c92){return _0x353bfd(_0x2e4f79,_0x4e9c92);}};let _0x100dc9;beforeAll(()=>{_0x100dc9=new AnalysisService();}),it(_0x2e5895[_0x5aca09(0x6f)],()=>{const _0x2dcc77=_0x5aca09,_0x30006a={};_0x30006a[_0x2dcc77(0x88)]='UPDATE.VER'+_0x2dcc77(0x99)+_0x2dcc77(0x79)+_0x2dcc77(0xaa)+'AL',_0x30006a['versions']=[_0x2dcc77(0xa9),_0x2dcc77(0x96)];const _0x2209f8={};_0x2209f8[_0x2dcc77(0x94)+'ediations']=[_0x30006a];const _0x522e7a={};_0x522e7a['checkerKey']=_0x2dcc77(0x82)+_0x2dcc77(0x8b),_0x522e7a[_0x2dcc77(0xab)+'ns']=_0x2209f8;const _0x325689={};_0x325689[_0x2dcc77(0x7f)]='ant',_0x325689[_0x2dcc77(0x6c)]='1.9.0',_0x325689['issues']=[_0x522e7a];const _0x3ccd29=[_0x325689],_0x2f254c=_0x100dc9['parseScaCo'+'mponents'](_0x3ccd29),_0x40b873=_0x2f254c[0x0][_0x2dcc77(0xac)][0x0][_0x2dcc77(0xab)+'nRecommend'+_0x2dcc77(0x7d)];expect(_0x40b873)[_0x2dcc77(0x77)](_0x2dcc77(0x80)+'1.9.16\x20이하\x20'+_0x2dcc77(0x81)+_0x2dcc77(0xae));}),_0x2e5895[_0x5aca09(0x8f)](it,_0x5aca09(0x75)+_0x5aca09(0x87)+_0x5aca09(0x8e)+_0x5aca09(0x89)+_0x5aca09(0x9d)+'rrectly',()=>{const _0x10d9dd=_0x5aca09,_0x2796b0={};_0x2796b0[_0x10d9dd(0x88)]=_0x10d9dd(0x69)+_0x10d9dd(0x99)+_0x10d9dd(0x79)+_0x10d9dd(0x85),_0x2796b0['versions']=[_0x2e5895[_0x10d9dd(0xa5)],_0x10d9dd(0x96)];const _0x3cf3db={};_0x3cf3db[_0x10d9dd(0x94)+_0x10d9dd(0x9b)]=[_0x2796b0];const _0x2e2777={};_0x2e2777['checkerKey']='SCA.SV.COM'+_0x10d9dd(0x8b),_0x2e2777[_0x10d9dd(0xab)+'ns']=_0x3cf3db;const _0x5c7f02={};_0x5c7f02[_0x10d9dd(0x7f)]=_0x10d9dd(0xa6),_0x5c7f02[_0x10d9dd(0x6c)]=_0x10d9dd(0x7b),_0x5c7f02['issues']=[_0x2e2777];const _0x249023=[_0x5c7f02],_0xe0ab7d=_0x100dc9[_0x10d9dd(0x95)+_0x10d9dd(0x6b)](_0x249023),_0x1ab411=_0xe0ab7d[0x0][_0x10d9dd(0xac)][0x0][_0x10d9dd(0xab)+_0x10d9dd(0x71)+_0x10d9dd(0x7d)];expect(_0x1ab411)[_0x10d9dd(0x77)]('1.9.15\x20이상\x20'+_0x10d9dd(0xa4)+_0x10d9dd(0x81)+_0x10d9dd(0xae));}),it('should\x20for'+_0x5aca09(0x87)+'.VERSION.G'+_0x5aca09(0x98)+_0x5aca09(0xa3)+_0x5aca09(0x6e),()=>{const _0x3d73c9=_0x5aca09,_0x47d9a1={};_0x47d9a1[_0x3d73c9(0x88)]=_0x3d73c9(0x69)+_0x3d73c9(0x74)+'D.LT.OR.EQ'+'UAL',_0x47d9a1[_0x3d73c9(0x9e)]=[_0x2e5895[_0x3d73c9(0xa5)],_0x3d73c9(0x96)];const _0x5e6d32={};_0x5e6d32[_0x3d73c9(0x94)+'ediations']=[_0x47d9a1];const _0x52c53b={};_0x52c53b[_0x3d73c9(0xad)]=_0x3d73c9(0x82)+'MON.5896',_0x52c53b['remediatio'+'ns']=_0x5e6d32;const _0x21d80d={};_0x21d80d[_0x3d73c9(0x7f)]=_0x3d73c9(0xa6),_0x21d80d[_0x3d73c9(0x6c)]=_0x3d73c9(0x7b),_0x21d80d[_0x3d73c9(0xac)]=[_0x52c53b];const _0x33abd5=[_0x21d80d],_0x4bf454=_0x100dc9['parseScaCo'+_0x3d73c9(0x6b)](_0x33abd5),_0x8f5121=_0x4bf454[0x0]['issues'][0x0][_0x3d73c9(0xab)+_0x3d73c9(0x71)+_0x3d73c9(0x7d)];expect(_0x8f5121)['toBe'](_0x3d73c9(0x86)+'1.9.16\x20이하\x20'+_0x3d73c9(0x81)+_0x3d73c9(0xae));}),it('should\x20for'+_0x5aca09(0x87)+'.VERSION.G'+_0x5aca09(0x6d)+_0x5aca09(0x84),()=>{const _0x5db66f=_0x5aca09,_0x56db18={};_0x56db18[_0x5db66f(0x88)]=_0x5db66f(0x69)+_0x5db66f(0x74)+_0x5db66f(0x76),_0x56db18['versions']=[_0x5db66f(0xa9),_0x5db66f(0x96)];const _0x317d63={};_0x317d63['versionRem'+'ediations']=[_0x56db18];const _0x3fa6bb={};_0x3fa6bb[_0x5db66f(0xad)]=_0x5db66f(0x82)+'MON.5896',_0x3fa6bb['remediatio'+'ns']=_0x317d63;const _0x40157c={};_0x40157c[_0x5db66f(0x7f)]=_0x5db66f(0xa6),_0x40157c[_0x5db66f(0x6c)]=_0x5db66f(0x7b),_0x40157c[_0x5db66f(0xac)]=[_0x3fa6bb];const _0x4b1fe5=[_0x40157c],_0x5c7ebd=_0x100dc9[_0x5db66f(0x95)+_0x5db66f(0x6b)](_0x4b1fe5),_0x4e8957=_0x5c7ebd[0x0][_0x5db66f(0xac)][0x0][_0x5db66f(0xab)+_0x5db66f(0x71)+_0x5db66f(0x7d)];expect(_0x4e8957)[_0x5db66f(0x77)](_0x5db66f(0x86)+_0x5db66f(0xa4)+_0x5db66f(0x81)+_0x5db66f(0xae));});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x12e544=a31_0x59c7;function a31_0x59c7(_0x13cf1a,_0x1cc361){_0x13cf1a=_0x13cf1a-0x105;const _0x2f2ab7=a31_0x3808();let _0x503522=_0x2f2ab7[_0x13cf1a];return _0x503522;}(function(_0x3f7f43,_0x5d92b5){const _0xe8295e=a31_0x59c7,_0x522ab5=_0x3f7f43();while(!![]){try{const _0x27fe3c=-parseInt(_0xe8295e(0x174))/0x1*(parseInt(_0xe8295e(0x154))/0x2)+parseInt(_0xe8295e(0x127))/0x3*(-parseInt(_0xe8295e(0x16e))/0x4)+-parseInt(_0xe8295e(0x172))/0x5*(-parseInt(_0xe8295e(0x143))/0x6)+parseInt(_0xe8295e(0x155))/0x7+parseInt(_0xe8295e(0x179))/0x8*(parseInt(_0xe8295e(0x126))/0x9)+parseInt(_0xe8295e(0x158))/0xa+-parseInt(_0xe8295e(0x15a))/0xb;if(_0x27fe3c===_0x5d92b5)break;else _0x522ab5['push'](_0x522ab5['shift']());}catch(_0x5a067c){_0x522ab5['push'](_0x522ab5['shift']());}}}(a31_0x3808,0xbf9de));const a31_0x4b2a25=(function(){let _0x141d34=!![];return function(_0x833d14,_0x24b06d){const _0x5d25f0=_0x141d34?function(){const _0x4fdcc7=a31_0x59c7;if(_0x24b06d){const _0x15cb45=_0x24b06d[_0x4fdcc7(0x14f)](_0x833d14,arguments);return _0x24b06d=null,_0x15cb45;}}:function(){};return _0x141d34=![],_0x5d25f0;};}()),a31_0x503522=a31_0x4b2a25(this,function(){const _0x2dffeb=a31_0x59c7,_0x2199c8={};_0x2199c8[_0x2dffeb(0x129)]=_0x2dffeb(0x15f)+'+$';const _0x1d2159=_0x2199c8;return a31_0x503522[_0x2dffeb(0x163)]()['search'](_0x1d2159[_0x2dffeb(0x129)])[_0x2dffeb(0x163)]()[_0x2dffeb(0x138)+'r'](a31_0x503522)['search'](_0x2dffeb(0x15f)+'+$');});a31_0x503522();function a31_0x3808(){const _0x23c13b=['2623phtmwm','EgQjx','../checker','1.0.1','unstable_m','8TLchyC','1.0.0','type','mockResolv','DuXXP','ation\x20Form','cZUdZ','COMPLETE','isCompleti','e\x20correctl','2.9.9','remediatio','alysisResu','\x20correctly','test-analy','components','으로\x20업데이트하세요','QUAL\x20corre','T.OR.EQUAL','versionRem','versions','전으로\x20업데이트하세','.VERSION.G','678','toBe','1.0.1\x20버전으로','890','should\x20han','1.5.0\x20이하\x20버','mockImplem','SION.GT.OR','sis-id-5','UPDATE.VER','LQmpn','.VERSION.L','11068605oRuRZA','6621jVgZwO','SION.LT.OR','XfDUB','version','\x20with\x20sing','../s3.serv','sis-id','ctly','atting','sis-id-4','pollAnalys','should\x20for','ediations','CVE-2023-3','dle\x20no\x20rem','edValue','.EQUAL','constructo','SUCCESS','sis-id-6','ation','2.0.0','234','3.0.0','ediations\x20','analysisId','ned','\x20업데이트하세요.','2382amwmFy','ice.js','ectly','.9.9\x20이하\x20버전','.service.j','FfuOR','severity','status','.VERSION.E','CVE-2023-9','CVE-2023-7','test-lib','apply','entation','CVE-2023-1','result','getScaAnal','1180dmdkdz','5571825QHbOeh','456','검색된\x20조치\x20방안이','7308090WcOmpJ','cfFwB','8573015ZpAofY','sis-id-2','rvice\x20-\x20Re','\x20with\x20rang','cks','(((.+)+)+)','ysisResult','name','HIGH','toString','nRecommend','nFmFC','012','CVE-2023-5','le\x20version','\x20없습니다.','downloadAn','correctly','dle\x20empty\x20','clearAllMo','1140rVcNob','issues','lts','3.0.0\x20이상\x20버','12395JmzaYA','mat\x20UPDATE'];a31_0x3808=function(){return _0x23c13b;};return a31_0x3808();}import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockSparrowService={'getAnalysisStatus':jest['fn'](),'downloadAnalysisResults':jest['fn'](),'pollAnalysisCompletion':jest['fn'](),'requestScaAnalysis':jest['fn']()},mockS3Service={'uploadFile':jest['fn'](),'uploadMultipleFiles':jest['fn'](),'uploadFilesFromPaths':jest['fn'](),'uploadZipFile':jest['fn'](),'uploadFolderAsZip':jest['fn']()},mockCheckerService={'initialize':jest['fn'](),'getLocalizedInfo':jest['fn'](),'getComplianceInfo':jest['fn']()};jest[a31_0x12e544(0x178)+'ockModule']('../sparrow'+a31_0x12e544(0x147)+'s',()=>({'SparrowService':jest['fn']()[a31_0x12e544(0x120)+a31_0x12e544(0x150)](()=>mockSparrowService)})),jest[a31_0x12e544(0x178)+'ockModule'](a31_0x12e544(0x12c)+a31_0x12e544(0x144),()=>({'S3Service':jest['fn']()[a31_0x12e544(0x120)+a31_0x12e544(0x150)](()=>mockS3Service)})),jest[a31_0x12e544(0x178)+'ockModule'](a31_0x12e544(0x176)+a31_0x12e544(0x147)+'s',()=>({'CheckerService':jest['fn']()['mockImplem'+a31_0x12e544(0x150)](()=>mockCheckerService)}));const {AnalysisService:AnalysisServiceClass}=await import('../analysi'+'s.service.'+'js');describe('AnalysisSe'+a31_0x12e544(0x15c)+'mediation',()=>{const _0x2036e4=a31_0x12e544,_0xeb122a={'cfFwB':'test-analy'+_0x2036e4(0x130),'xVOgk':_0x2036e4(0x123)+_0x2036e4(0x121)+_0x2036e4(0x137),'FfuOR':function(_0x44e67e,_0x40bd34,_0xed0c37){return _0x44e67e(_0x40bd34,_0xed0c37);},'EgQjx':_0x2036e4(0x132)+'mat\x20UPDATE'+'.VERSION.G'+_0x2036e4(0x115)+_0x2036e4(0x15d)+_0x2036e4(0x10c)+'y','cZUdZ':'getScaAnal'+_0x2036e4(0x160)+'s\x20-\x20Remedi'+_0x2036e4(0x108)+_0x2036e4(0x12f)};let _0x57e789;beforeEach(()=>{const _0x1c6fa5=_0x2036e4;jest[_0x1c6fa5(0x16d)+_0x1c6fa5(0x15e)](),_0x57e789=new AnalysisServiceClass();}),describe(_0xeb122a[_0x2036e4(0x109)],()=>{const _0x4fa8e7=_0x2036e4,_0x42b4f9={};_0x42b4f9[_0x4fa8e7(0x124)]=_0x4fa8e7(0x123)+'SION.EQUAL',_0x42b4f9[_0x4fa8e7(0x165)]=_0x4fa8e7(0x167)+_0x4fa8e7(0x11a),_0x42b4f9[_0x4fa8e7(0x107)]=_0x4fa8e7(0x111)+'sis-id-3';const _0xe1cc39=_0x42b4f9;it(_0x4fa8e7(0x132)+_0x4fa8e7(0x173)+_0x4fa8e7(0x14b)+_0x4fa8e7(0x114)+_0x4fa8e7(0x12e),async()=>{const _0x1f7929=_0x4fa8e7,_0x12f764=_0x1f7929(0x111)+_0x1f7929(0x12d),_0x5b763e={};_0x5b763e[_0x1f7929(0x105)]=_0xe1cc39[_0x1f7929(0x124)],_0x5b763e[_0x1f7929(0x117)]=[_0x1f7929(0x177)];const _0x2a715e={};_0x2a715e[_0x1f7929(0x116)+'ediations']=[_0x5b763e];const _0x7a3be5={};_0x7a3be5['id']=_0x1f7929(0x151)+_0x1f7929(0x13d),_0x7a3be5[_0x1f7929(0x149)]='HIGH',_0x7a3be5[_0x1f7929(0x10e)+'ns']=_0x2a715e;const _0x2bfb90={};_0x2bfb90[_0x1f7929(0x161)]='test-lib',_0x2bfb90[_0x1f7929(0x12a)]=_0x1f7929(0x17a),_0x2bfb90[_0x1f7929(0x16f)]=[_0x7a3be5];const _0xe5266f=[_0x2bfb90],_0x1ade13={};_0x1ade13[_0x1f7929(0x14a)]=_0x1f7929(0x10a),_0x1ade13[_0x1f7929(0x152)]='SUCCESS',_0x1ade13[_0x1f7929(0x140)]=_0x12f764,mockSparrowService[_0x1f7929(0x131)+_0x1f7929(0x10b)+'on'][_0x1f7929(0x106)+_0x1f7929(0x136)](_0x1ade13),mockSparrowService['downloadAn'+'alysisResu'+_0x1f7929(0x170)]['mockResolv'+_0x1f7929(0x136)](_0xe5266f);const _0x364051=await _0x57e789['getScaAnal'+'ysisResult'+'s'](_0x12f764),_0x17f9ac=_0x364051[_0x1f7929(0x112)][0x0][_0x1f7929(0x16f)][0x0];expect(_0x17f9ac['remediatio'+'nRecommend'+_0x1f7929(0x13b)])['toBe'](_0x1f7929(0x11c)+_0x1f7929(0x142));}),_0xeb122a[_0x4fa8e7(0x148)](it,'should\x20for'+_0x4fa8e7(0x173)+_0x4fa8e7(0x125)+_0x4fa8e7(0x115)+_0x4fa8e7(0x110),async()=>{const _0xc53c51=_0x4fa8e7,_0x4a3d48=_0xc53c51(0x111)+_0xc53c51(0x15b),_0xbf1c57={};_0xbf1c57[_0xc53c51(0x105)]=_0xc53c51(0x123)+_0xc53c51(0x128)+_0xc53c51(0x137),_0xbf1c57[_0xc53c51(0x117)]=['1.5.0'];const _0x1b750b={};_0x1b750b['versionRem'+_0xc53c51(0x133)]=[_0xbf1c57];const _0x134cf6={};_0x134cf6['id']=_0xe1cc39['nFmFC'],_0x134cf6[_0xc53c51(0x149)]=_0xc53c51(0x162),_0x134cf6[_0xc53c51(0x10e)+'ns']=_0x1b750b;const _0x57b116={};_0x57b116[_0xc53c51(0x161)]='test-lib',_0x57b116[_0xc53c51(0x12a)]='1.0.0',_0x57b116[_0xc53c51(0x16f)]=[_0x134cf6];const _0x5cd7cd=[_0x57b116],_0x1a0bdf={};_0x1a0bdf['status']=_0xc53c51(0x10a),_0x1a0bdf[_0xc53c51(0x152)]=_0xc53c51(0x139),_0x1a0bdf['analysisId']=_0x4a3d48,mockSparrowService['pollAnalys'+_0xc53c51(0x10b)+'on'][_0xc53c51(0x106)+_0xc53c51(0x136)](_0x1a0bdf),mockSparrowService[_0xc53c51(0x16a)+_0xc53c51(0x10f)+_0xc53c51(0x170)]['mockResolv'+_0xc53c51(0x136)](_0x5cd7cd);const _0x29541d=await _0x57e789[_0xc53c51(0x153)+_0xc53c51(0x160)+'s'](_0x4a3d48),_0x84dc10=_0x29541d[_0xc53c51(0x112)][0x0][_0xc53c51(0x16f)][0x0];expect(_0x84dc10[_0xc53c51(0x10e)+_0xc53c51(0x164)+_0xc53c51(0x13b)])[_0xc53c51(0x11b)](_0xc53c51(0x11f)+_0xc53c51(0x118)+'요.');}),it(_0xeb122a[_0x4fa8e7(0x175)],async()=>{const _0x314dc5=_0x4fa8e7,_0x40db02=_0xe1cc39[_0x314dc5(0x107)],_0x2b6917={};_0x2b6917['type']=_0x314dc5(0x123)+_0x314dc5(0x121)+_0x314dc5(0x137),_0x2b6917[_0x314dc5(0x117)]=[_0x314dc5(0x13c),_0x314dc5(0x10d)];const _0x2995ba={};_0x2995ba[_0x314dc5(0x116)+_0x314dc5(0x133)]=[_0x2b6917];const _0x4c9b07={};_0x4c9b07['id']=_0x314dc5(0x14c)+_0x314dc5(0x166),_0x4c9b07['severity']=_0x314dc5(0x162),_0x4c9b07['remediatio'+'ns']=_0x2995ba;const _0x54f6ba={};_0x54f6ba[_0x314dc5(0x161)]=_0x314dc5(0x14e),_0x54f6ba[_0x314dc5(0x12a)]=_0x314dc5(0x17a),_0x54f6ba[_0x314dc5(0x16f)]=[_0x4c9b07];const _0x438865=[_0x54f6ba],_0x5bf4cc={};_0x5bf4cc[_0x314dc5(0x14a)]=_0x314dc5(0x10a),_0x5bf4cc[_0x314dc5(0x152)]=_0x314dc5(0x139),_0x5bf4cc['analysisId']=_0x40db02,mockSparrowService[_0x314dc5(0x131)+'isCompleti'+'on'][_0x314dc5(0x106)+'edValue'](_0x5bf4cc),mockSparrowService[_0x314dc5(0x16a)+'alysisResu'+_0x314dc5(0x170)][_0x314dc5(0x106)+_0x314dc5(0x136)](_0x438865);const _0x2ebc7a=await _0x57e789[_0x314dc5(0x153)+_0x314dc5(0x160)+'s'](_0x40db02),_0x45cfb7=_0x2ebc7a[_0x314dc5(0x112)][0x0]['issues'][0x0];expect(_0x45cfb7['remediatio'+_0x314dc5(0x164)+_0x314dc5(0x13b)])[_0x314dc5(0x11b)]('2.0.0\x20이상\x202'+_0x314dc5(0x146)+_0x314dc5(0x113)+'.');}),it(_0x4fa8e7(0x132)+_0x4fa8e7(0x173)+_0x4fa8e7(0x119)+'T.OR.EQUAL'+_0x4fa8e7(0x12b)+_0x4fa8e7(0x168)+_0x4fa8e7(0x110),async()=>{const _0x2bf588=_0x4fa8e7,_0x5396a0=_0xeb122a[_0x2bf588(0x159)],_0x4583d2={};_0x4583d2['type']=_0xeb122a['xVOgk'],_0x4583d2['versions']=[_0x2bf588(0x13e)];const _0xec9e5c={};_0xec9e5c[_0x2bf588(0x116)+'ediations']=[_0x4583d2];const _0x23ec91={};_0x23ec91['id']=_0x2bf588(0x134)+_0x2bf588(0x156),_0x23ec91[_0x2bf588(0x149)]='HIGH',_0x23ec91[_0x2bf588(0x10e)+'ns']=_0xec9e5c;const _0x48ed56={};_0x48ed56['name']=_0x2bf588(0x14e),_0x48ed56['version']=_0x2bf588(0x17a),_0x48ed56[_0x2bf588(0x16f)]=[_0x23ec91];const _0x3efc07=[_0x48ed56],_0x23a029={};_0x23a029[_0x2bf588(0x14a)]=_0x2bf588(0x10a),_0x23a029[_0x2bf588(0x152)]=_0x2bf588(0x139),_0x23a029[_0x2bf588(0x140)]=_0x5396a0,mockSparrowService[_0x2bf588(0x131)+_0x2bf588(0x10b)+'on'][_0x2bf588(0x106)+_0x2bf588(0x136)](_0x23a029),mockSparrowService[_0x2bf588(0x16a)+'alysisResu'+_0x2bf588(0x170)][_0x2bf588(0x106)+'edValue'](_0x3efc07);const _0x12634e=await _0x57e789[_0x2bf588(0x153)+_0x2bf588(0x160)+'s'](_0x5396a0),_0x5b2f2b=_0x12634e[_0x2bf588(0x112)][0x0]['issues'][0x0];expect(_0x5b2f2b[_0x2bf588(0x10e)+_0x2bf588(0x164)+'ation'])['toBe'](_0x2bf588(0x171)+_0x2bf588(0x118)+'요.');}),it(_0x4fa8e7(0x11e)+_0x4fa8e7(0x135)+'ediations\x20'+_0x4fa8e7(0x16b),async()=>{const _0x21c0a0=_0x4fa8e7,_0x2a605b=_0x21c0a0(0x111)+_0x21c0a0(0x122),_0x4df195={};_0x4df195['id']=_0x21c0a0(0x14d)+_0x21c0a0(0x11d),_0x4df195['severity']=_0x21c0a0(0x162),_0x4df195[_0x21c0a0(0x10e)+'ns']=undefined;const _0x1ab00e={};_0x1ab00e['name']='test-lib',_0x1ab00e[_0x21c0a0(0x12a)]=_0x21c0a0(0x17a),_0x1ab00e['issues']=[_0x4df195];const _0x20a3f5=[_0x1ab00e],_0xda073e={};_0xda073e[_0x21c0a0(0x14a)]=_0x21c0a0(0x10a),_0xda073e[_0x21c0a0(0x152)]='SUCCESS',_0xda073e[_0x21c0a0(0x140)]=_0x2a605b,mockSparrowService[_0x21c0a0(0x131)+_0x21c0a0(0x10b)+'on'][_0x21c0a0(0x106)+_0x21c0a0(0x136)](_0xda073e),mockSparrowService[_0x21c0a0(0x16a)+_0x21c0a0(0x10f)+'lts'][_0x21c0a0(0x106)+_0x21c0a0(0x136)](_0x20a3f5);const _0x2b4ae9=await _0x57e789[_0x21c0a0(0x153)+_0x21c0a0(0x160)+'s'](_0x2a605b),_0x114bbf=_0x2b4ae9[_0x21c0a0(0x112)][0x0][_0x21c0a0(0x16f)][0x0];expect(_0x114bbf[_0x21c0a0(0x10e)+_0x21c0a0(0x164)+_0x21c0a0(0x13b)])['toBeUndefi'+_0x21c0a0(0x141)]();}),it('should\x20han'+_0x4fa8e7(0x16c)+_0x4fa8e7(0x116)+_0x4fa8e7(0x13f)+'array\x20corr'+_0x4fa8e7(0x145),async()=>{const _0xc94ea2=_0x4fa8e7,_0x2c055d=_0xc94ea2(0x111)+_0xc94ea2(0x13a),_0x14d8c7={};_0x14d8c7[_0xc94ea2(0x116)+_0xc94ea2(0x133)]=[];const _0x56f421={};_0x56f421['id']=_0xc94ea2(0x14d)+'890',_0x56f421[_0xc94ea2(0x149)]=_0xc94ea2(0x162),_0x56f421[_0xc94ea2(0x10e)+'ns']=_0x14d8c7;const _0x10f943={};_0x10f943['name']=_0xc94ea2(0x14e),_0x10f943[_0xc94ea2(0x12a)]='1.0.0',_0x10f943['issues']=[_0x56f421];const _0x1e5163=[_0x10f943],_0x51e99e={};_0x51e99e['status']=_0xc94ea2(0x10a),_0x51e99e[_0xc94ea2(0x152)]=_0xc94ea2(0x139),_0x51e99e[_0xc94ea2(0x140)]=_0x2c055d,mockSparrowService[_0xc94ea2(0x131)+_0xc94ea2(0x10b)+'on'][_0xc94ea2(0x106)+_0xc94ea2(0x136)](_0x51e99e),mockSparrowService[_0xc94ea2(0x16a)+_0xc94ea2(0x10f)+_0xc94ea2(0x170)]['mockResolv'+_0xc94ea2(0x136)](_0x1e5163);const _0x592dd8=await _0x57e789[_0xc94ea2(0x153)+_0xc94ea2(0x160)+'s'](_0x2c055d),_0x4a9f42=_0x592dd8[_0xc94ea2(0x112)][0x0][_0xc94ea2(0x16f)][0x0];expect(_0x4a9f42['remediatio'+_0xc94ea2(0x164)+_0xc94ea2(0x13b)])['toBe'](_0xc94ea2(0x157)+_0xc94ea2(0x169));});});});
|
|
1
|
+
function a32_0x224a(){const _0x4b1f44=['2.0.0','AnalysisSe','57213XZItPj','.EQUAL\x20cor','CVE-2023-7','HIGH','검색된\x20조치\x20방안이','severity','1.0.1','1.0.1\x20버전으로','test-lib','rectly','1.5.0\x20이하\x20버','issues','lts','should\x20han','.LT.OR.EQU','version','세요.','.AND.LT.OR','alysisResu','2.9.9','6aRUBMf','hIDKZ','Akcmw','377zDXXIM','UPDATE.VER','T.OR.EQUAL','ons\x20correc','entation','array\x20corr','should\x20for','93378zEvbHh','downloadAn','sis-id-3','456','\x20업데이트하세요.','versionRem','1.9.15\x20이상\x20','ation\x20Form','.VERSION.L','1.0.0','pollAnalys','unstable_m','search','264tpcClq','SION.EQUAL','COMPLETE','ation','status','\x20correctly','apply','전으로\x20업데이트하세','iZapk','.9\x20이상\x20버전으로','getScaAnal','버전으로\x20업데이트하','le\x20version','131545vDFBta','nRecommend','ediations','\x20with\x20mult','type','sis-id','versions','BKWaf','154gXmuod','ice.js','s\x20-\x20Remedi','5uUQcUn','sis-id-6','890','.service.j','2.0.0,\x202.9','40458LOopVf','atting','ectly','s.service.','isCompleti','1.9.15','toBeUndefi','SUCCESS','3.0.0\x20이상\x20버','SION.GT.OR','mat\x20UPDATE','1.5.0','../analysi','234','result','ediations\x20','ysisResult','3.0.0','SION.LT.OR','edValue','(((.+)+)+)','WQAgD','999','correctly','toBe','CVE-2023-9','mockImplem','2903296wJQUHx','.EQUAL.AND','dle\x20no\x20rem','ockModule','1.9.16\x20이하\x20','ctly','mockResolv','rvice\x20-\x20Re','820084zDtlie','.EQUAL','remediatio','analysisId','012','../checker','Fqpuv','86580foRVRR','sis-id-2','test-analy','.VERSION.E','dle\x20empty\x20','name','components','10zGjzFb'];a32_0x224a=function(){return _0x4b1f44;};return a32_0x224a();}const a32_0x2f207d=a32_0x540d;(function(_0x566258,_0xc43b14){const _0x1ff426=a32_0x540d,_0x3d6f7b=_0x566258();while(!![]){try{const _0x1260db=-parseInt(_0x1ff426(0xf1))/0x1+parseInt(_0x1ff426(0x101))/0x2*(parseInt(_0x1ff426(0xcd))/0x3)+-parseInt(_0x1ff426(0x124))/0x4*(-parseInt(_0x1ff426(0xfc))/0x5)+-parseInt(_0x1ff426(0xd7))/0x6*(-parseInt(_0x1ff426(0xf9))/0x7)+-parseInt(_0x1ff426(0xe4))/0x8*(parseInt(_0x1ff426(0x135))/0x9)+parseInt(_0x1ff426(0x132))/0xa*(-parseInt(_0x1ff426(0x11c))/0xb)+parseInt(_0x1ff426(0x12b))/0xc*(parseInt(_0x1ff426(0xd0))/0xd);if(_0x1260db===_0xc43b14)break;else _0x3d6f7b['push'](_0x3d6f7b['shift']());}catch(_0x4e06f7){_0x3d6f7b['push'](_0x3d6f7b['shift']());}}}(a32_0x224a,0x2ed5e));const a32_0x2c4eb6=(function(){let _0x31c782=!![];return function(_0x522175,_0x1d7f21){const _0x525eb1=_0x31c782?function(){const _0xd2dd88=a32_0x540d;if(_0x1d7f21){const _0x42a47b=_0x1d7f21[_0xd2dd88(0xea)](_0x522175,arguments);return _0x1d7f21=null,_0x42a47b;}}:function(){};return _0x31c782=![],_0x525eb1;};}()),a32_0x503556=a32_0x2c4eb6(this,function(){const _0x3f8087=a32_0x540d;return a32_0x503556['toString']()[_0x3f8087(0xe3)](_0x3f8087(0x115)+'+$')['toString']()['constructo'+'r'](a32_0x503556)[_0x3f8087(0xe3)]('(((.+)+)+)'+'+$');});function a32_0x540d(_0xcf9261,_0x373262){_0xcf9261=_0xcf9261-0xbf;const _0x425aa3=a32_0x224a();let _0x503556=_0x425aa3[_0xcf9261];return _0x503556;}a32_0x503556();import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockSparrowService={'getAnalysisStatus':jest['fn'](),'downloadAnalysisResults':jest['fn'](),'pollAnalysisCompletion':jest['fn'](),'requestScaAnalysis':jest['fn']()},mockS3Service={'uploadFile':jest['fn'](),'uploadMultipleFiles':jest['fn'](),'uploadFilesFromPaths':jest['fn'](),'uploadZipFile':jest['fn'](),'uploadFolderAsZip':jest['fn']()},mockCheckerService={'initialize':jest['fn'](),'getLocalizedInfo':jest['fn'](),'getComplianceInfo':jest['fn']()};jest[a32_0x2f207d(0xe2)+a32_0x2f207d(0x11f)]('../sparrow'+a32_0x2f207d(0xff)+'s',()=>({'SparrowService':jest['fn']()['mockImplem'+a32_0x2f207d(0xd4)](()=>mockSparrowService)})),jest[a32_0x2f207d(0xe2)+a32_0x2f207d(0x11f)]('../s3.serv'+a32_0x2f207d(0xfa),()=>({'S3Service':jest['fn']()['mockImplem'+a32_0x2f207d(0xd4)](()=>mockS3Service)})),jest[a32_0x2f207d(0xe2)+a32_0x2f207d(0x11f)](a32_0x2f207d(0x129)+a32_0x2f207d(0xff)+'s',()=>({'CheckerService':jest['fn']()[a32_0x2f207d(0x11b)+a32_0x2f207d(0xd4)](()=>mockCheckerService)}));const {AnalysisService:AnalysisServiceClass}=await import(a32_0x2f207d(0x10d)+a32_0x2f207d(0x104)+'js');describe(a32_0x2f207d(0x134)+a32_0x2f207d(0x123)+'mediation',()=>{const _0x4e853c=a32_0x2f207d,_0x36c93e={'iZapk':'test-analy'+_0x4e853c(0xd9),'BKWaf':_0x4e853c(0x12d)+'sis-id-5','Fqpuv':'COMPLETE','hIDKZ':_0x4e853c(0xc1),'Akcmw':'should\x20for'+_0x4e853c(0x10b)+_0x4e853c(0xdf)+'T.OR.EQUAL'+_0x4e853c(0xe9),'AmMRw':function(_0x2cab57,_0x3818b2,_0x153d14){return _0x2cab57(_0x3818b2,_0x153d14);},'bpDaO':function(_0x8ec0ce,_0x49b649){return _0x8ec0ce(_0x49b649);}};let _0x413ba2;_0x36c93e['bpDaO'](beforeEach,()=>{jest['clearAllMo'+'cks'](),_0x413ba2=new AnalysisServiceClass();}),describe(_0x4e853c(0xee)+_0x4e853c(0x111)+_0x4e853c(0xfb)+_0x4e853c(0xde)+_0x4e853c(0x102),()=>{const _0x41713e=_0x4e853c,_0x17bf51={};_0x17bf51[_0x41713e(0x116)]='HIGH',_0x17bf51['hnsUe']=_0x41713e(0x12d)+'sis-id-4';const _0x14f427=_0x17bf51;it(_0x41713e(0xd6)+_0x41713e(0x10b)+_0x41713e(0x12e)+'QUAL\x20corre'+_0x41713e(0x121),async()=>{const _0x519fb3=_0x41713e,_0x1b8274=_0x519fb3(0x12d)+_0x519fb3(0xf6),_0x3535b3={};_0x3535b3[_0x519fb3(0xf5)]='UPDATE.VER'+_0x519fb3(0xe5),_0x3535b3[_0x519fb3(0xf7)]=[_0x519fb3(0xbf)];const _0x1b7500={};_0x1b7500[_0x519fb3(0xdc)+_0x519fb3(0xf3)]=[_0x3535b3];const _0x5053b7={};_0x5053b7['id']='CVE-2023-1'+_0x519fb3(0x10e),_0x5053b7[_0x519fb3(0x13a)]=_0x519fb3(0x138),_0x5053b7[_0x519fb3(0x126)+'ns']=_0x1b7500;const _0x12df61={};_0x12df61[_0x519fb3(0x130)]=_0x519fb3(0xc1),_0x12df61[_0x519fb3(0xc8)]=_0x519fb3(0xe0),_0x12df61[_0x519fb3(0xc4)]=[_0x5053b7];const _0x2c0c41=[_0x12df61],_0x36835e={};_0x36835e[_0x519fb3(0xe8)]='COMPLETE',_0x36835e['result']=_0x519fb3(0x108),_0x36835e['analysisId']=_0x1b8274,mockSparrowService[_0x519fb3(0xe1)+_0x519fb3(0x105)+'on'][_0x519fb3(0x122)+'edValue'](_0x36835e),mockSparrowService[_0x519fb3(0xd8)+_0x519fb3(0xcb)+'lts'][_0x519fb3(0x122)+'edValue'](_0x2c0c41);const _0x5f5e01=await _0x413ba2[_0x519fb3(0xee)+_0x519fb3(0x111)+'s'](_0x1b8274),_0x3426e9=_0x5f5e01[_0x519fb3(0x131)][0x0][_0x519fb3(0xc4)][0x0];expect(_0x3426e9[_0x519fb3(0x126)+'nRecommend'+'ation'])[_0x519fb3(0x119)](_0x519fb3(0xc0)+'\x20업데이트하세요.');}),it(_0x36c93e[_0x41713e(0xcf)],async()=>{const _0xe90789=_0x41713e,_0xb042ac=_0xe90789(0x12d)+_0xe90789(0x12c),_0x46c78e={};_0x46c78e[_0xe90789(0xf5)]=_0xe90789(0xd1)+_0xe90789(0x113)+_0xe90789(0x125),_0x46c78e[_0xe90789(0xf7)]=[_0xe90789(0x10c)];const _0x268b04={};_0x268b04['versionRem'+_0xe90789(0xf3)]=[_0x46c78e];const _0xabb4fe={};_0xabb4fe['id']='CVE-2023-5'+'678',_0xabb4fe[_0xe90789(0x13a)]=_0x14f427[_0xe90789(0x116)],_0xabb4fe[_0xe90789(0x126)+'ns']=_0x268b04;const _0x2ab1c2={};_0x2ab1c2[_0xe90789(0x130)]=_0xe90789(0xc1),_0x2ab1c2[_0xe90789(0xc8)]=_0xe90789(0xe0),_0x2ab1c2[_0xe90789(0xc4)]=[_0xabb4fe];const _0x526e8b=[_0x2ab1c2],_0x18ead4={};_0x18ead4[_0xe90789(0xe8)]=_0xe90789(0xe6),_0x18ead4[_0xe90789(0x10f)]=_0xe90789(0x108),_0x18ead4['analysisId']=_0xb042ac,mockSparrowService[_0xe90789(0xe1)+'isCompleti'+'on']['mockResolv'+'edValue'](_0x18ead4),mockSparrowService[_0xe90789(0xd8)+'alysisResu'+_0xe90789(0xc5)][_0xe90789(0x122)+'edValue'](_0x526e8b);const _0x27abfe=await _0x413ba2[_0xe90789(0xee)+_0xe90789(0x111)+'s'](_0xb042ac),_0x361523=_0x27abfe[_0xe90789(0x131)][0x0]['issues'][0x0];expect(_0x361523['remediatio'+_0xe90789(0xf2)+_0xe90789(0xe7)])[_0xe90789(0x119)](_0xe90789(0xc3)+'전으로\x20업데이트하세'+'요.');}),it(_0x41713e(0xd6)+_0x41713e(0x10b)+'.VERSION.G'+'T.OR.EQUAL'+_0x41713e(0xf4)+'iple\x20versi'+_0x41713e(0xd3)+'tly',async()=>{const _0x47b768=_0x41713e,_0x13a549=_0x36c93e[_0x47b768(0xec)],_0x4d0598={};_0x4d0598['type']=_0x47b768(0xd1)+_0x47b768(0x10a)+'.EQUAL',_0x4d0598[_0x47b768(0xf7)]=[_0x47b768(0x133),_0x47b768(0xcc)];const _0x416538={};_0x416538['versionRem'+_0x47b768(0xf3)]=[_0x4d0598];const _0x4ab5a6={};_0x4ab5a6['id']=_0x47b768(0x11a)+_0x47b768(0x128),_0x4ab5a6['severity']='HIGH',_0x4ab5a6[_0x47b768(0x126)+'ns']=_0x416538;const _0x5d6d7a={};_0x5d6d7a[_0x47b768(0x130)]=_0x47b768(0xc1),_0x5d6d7a[_0x47b768(0xc8)]='1.0.0',_0x5d6d7a[_0x47b768(0xc4)]=[_0x4ab5a6];const _0x5cce0b=[_0x5d6d7a],_0x3945f4={};_0x3945f4[_0x47b768(0xe8)]='COMPLETE',_0x3945f4['result']=_0x47b768(0x108),_0x3945f4['analysisId']=_0x13a549,mockSparrowService[_0x47b768(0xe1)+_0x47b768(0x105)+'on']['mockResolv'+_0x47b768(0x114)](_0x3945f4),mockSparrowService[_0x47b768(0xd8)+_0x47b768(0xcb)+_0x47b768(0xc5)][_0x47b768(0x122)+_0x47b768(0x114)](_0x5cce0b);const _0x470cf5=await _0x413ba2['getScaAnal'+'ysisResult'+'s'](_0x13a549),_0x4e91d0=_0x470cf5[_0x47b768(0x131)][0x0]['issues'][0x0];expect(_0x4e91d0['remediatio'+_0x47b768(0xf2)+_0x47b768(0xe7)])['toBe'](_0x47b768(0x100)+_0x47b768(0xed)+_0x47b768(0xdb));}),it('should\x20for'+_0x41713e(0x10b)+'.VERSION.G'+'T.OR.EQUAL'+'\x20with\x20sing'+_0x41713e(0xf0)+_0x41713e(0xe9),async()=>{const _0x1174fd=_0x41713e,_0x1f7878=_0x14f427['hnsUe'],_0x251685={};_0x251685[_0x1174fd(0xf5)]=_0x1174fd(0xd1)+'SION.GT.OR'+'.EQUAL',_0x251685[_0x1174fd(0xf7)]=[_0x1174fd(0x112)];const _0x573d79={};_0x573d79[_0x1174fd(0xdc)+'ediations']=[_0x251685];const _0x4a6e6a={};_0x4a6e6a['id']='CVE-2023-3'+_0x1174fd(0xda),_0x4a6e6a[_0x1174fd(0x13a)]=_0x1174fd(0x138),_0x4a6e6a['remediatio'+'ns']=_0x573d79;const _0x4e09e9={};_0x4e09e9[_0x1174fd(0x130)]='test-lib',_0x4e09e9[_0x1174fd(0xc8)]=_0x1174fd(0xe0),_0x4e09e9[_0x1174fd(0xc4)]=[_0x4a6e6a];const _0x18bcdc=[_0x4e09e9],_0x25b1ec={};_0x25b1ec[_0x1174fd(0xe8)]=_0x1174fd(0xe6),_0x25b1ec[_0x1174fd(0x10f)]=_0x1174fd(0x108),_0x25b1ec[_0x1174fd(0x127)]=_0x1f7878,mockSparrowService[_0x1174fd(0xe1)+_0x1174fd(0x105)+'on'][_0x1174fd(0x122)+'edValue'](_0x25b1ec),mockSparrowService[_0x1174fd(0xd8)+_0x1174fd(0xcb)+'lts'][_0x1174fd(0x122)+_0x1174fd(0x114)](_0x18bcdc);const _0x52ac74=await _0x413ba2[_0x1174fd(0xee)+_0x1174fd(0x111)+'s'](_0x1f7878),_0x2cae37=_0x52ac74[_0x1174fd(0x131)][0x0][_0x1174fd(0xc4)][0x0];expect(_0x2cae37[_0x1174fd(0x126)+_0x1174fd(0xf2)+_0x1174fd(0xe7)])['toBe'](_0x1174fd(0x109)+_0x1174fd(0xeb)+'요.');}),it(_0x41713e(0xd6)+'mat\x20UPDATE'+'.VERSION.G'+_0x41713e(0xd2)+_0x41713e(0xca)+_0x41713e(0x136)+_0x41713e(0xc2),async()=>{const _0x4051d4=_0x41713e,_0x2402c7=_0x36c93e[_0x4051d4(0xf8)],_0x54e78f={};_0x54e78f[_0x4051d4(0xf5)]=_0x4051d4(0xd1)+_0x4051d4(0x10a)+_0x4051d4(0x11d)+_0x4051d4(0xc7)+'AL',_0x54e78f[_0x4051d4(0xf7)]=[_0x4051d4(0x106),'1.9.16'];const _0x41e919={};_0x41e919['versionRem'+_0x4051d4(0xf3)]=[_0x54e78f];const _0x3d805b={};_0x3d805b['id']=_0x4051d4(0x11a)+_0x4051d4(0x117),_0x3d805b[_0x4051d4(0x13a)]=_0x4051d4(0x138),_0x3d805b[_0x4051d4(0x126)+'ns']=_0x41e919;const _0x23bc42={};_0x23bc42[_0x4051d4(0x130)]=_0x4051d4(0xc1),_0x23bc42[_0x4051d4(0xc8)]=_0x4051d4(0xe0),_0x23bc42[_0x4051d4(0xc4)]=[_0x3d805b];const _0x2a921d=[_0x23bc42],_0x319faa={};_0x319faa['status']=_0x36c93e[_0x4051d4(0x12a)],_0x319faa['result']=_0x4051d4(0x108),_0x319faa['analysisId']=_0x2402c7,mockSparrowService['pollAnalys'+_0x4051d4(0x105)+'on'][_0x4051d4(0x122)+'edValue'](_0x319faa),mockSparrowService[_0x4051d4(0xd8)+_0x4051d4(0xcb)+'lts'][_0x4051d4(0x122)+_0x4051d4(0x114)](_0x2a921d);const _0x492cd3=await _0x413ba2[_0x4051d4(0xee)+_0x4051d4(0x111)+'s'](_0x2402c7),_0x3c2118=_0x492cd3[_0x4051d4(0x131)][0x0][_0x4051d4(0xc4)][0x0];expect(_0x3c2118[_0x4051d4(0x126)+_0x4051d4(0xf2)+'ation'])['toBe'](_0x4051d4(0xdd)+_0x4051d4(0x120)+_0x4051d4(0xef)+_0x4051d4(0xc9));}),_0x36c93e['AmMRw'](it,_0x41713e(0xc6)+_0x41713e(0x11e)+_0x41713e(0x110)+_0x41713e(0x118),async()=>{const _0x28b3ec=_0x41713e,_0x31b124=_0x28b3ec(0x12d)+_0x28b3ec(0xfd),_0x15cde5={};_0x15cde5['id']=_0x28b3ec(0x137)+_0x28b3ec(0xfe),_0x15cde5[_0x28b3ec(0x13a)]=_0x28b3ec(0x138),_0x15cde5['remediatio'+'ns']=undefined;const _0x4cd75e={};_0x4cd75e[_0x28b3ec(0x130)]=_0x36c93e[_0x28b3ec(0xce)],_0x4cd75e[_0x28b3ec(0xc8)]=_0x28b3ec(0xe0),_0x4cd75e[_0x28b3ec(0xc4)]=[_0x15cde5];const _0x45b194=[_0x4cd75e],_0x8fadc8={};_0x8fadc8[_0x28b3ec(0xe8)]=_0x36c93e[_0x28b3ec(0x12a)],_0x8fadc8[_0x28b3ec(0x10f)]=_0x28b3ec(0x108),_0x8fadc8[_0x28b3ec(0x127)]=_0x31b124,mockSparrowService[_0x28b3ec(0xe1)+'isCompleti'+'on'][_0x28b3ec(0x122)+_0x28b3ec(0x114)](_0x8fadc8),mockSparrowService[_0x28b3ec(0xd8)+_0x28b3ec(0xcb)+_0x28b3ec(0xc5)]['mockResolv'+_0x28b3ec(0x114)](_0x45b194);const _0x5f4040=await _0x413ba2[_0x28b3ec(0xee)+_0x28b3ec(0x111)+'s'](_0x31b124),_0x5e0fb1=_0x5f4040[_0x28b3ec(0x131)][0x0][_0x28b3ec(0xc4)][0x0];expect(_0x5e0fb1[_0x28b3ec(0x126)+_0x28b3ec(0xf2)+_0x28b3ec(0xe7)])[_0x28b3ec(0x107)+'ned']();}),it('should\x20han'+_0x41713e(0x12f)+_0x41713e(0xdc)+_0x41713e(0x110)+_0x41713e(0xd5)+_0x41713e(0x103),async()=>{const _0x4eb277=_0x41713e,_0x42fcb9=_0x4eb277(0x12d)+'sis-id-7',_0x56cb60={};_0x56cb60[_0x4eb277(0xdc)+_0x4eb277(0xf3)]=[];const _0x438d82={};_0x438d82['id']='CVE-2023-7'+'890',_0x438d82[_0x4eb277(0x13a)]='HIGH',_0x438d82[_0x4eb277(0x126)+'ns']=_0x56cb60;const _0x40c5a4={};_0x40c5a4[_0x4eb277(0x130)]=_0x4eb277(0xc1),_0x40c5a4[_0x4eb277(0xc8)]=_0x4eb277(0xe0),_0x40c5a4['issues']=[_0x438d82];const _0x4e17c4=[_0x40c5a4],_0x7a4d14={};_0x7a4d14['status']=_0x4eb277(0xe6),_0x7a4d14[_0x4eb277(0x10f)]=_0x4eb277(0x108),_0x7a4d14[_0x4eb277(0x127)]=_0x42fcb9,mockSparrowService['pollAnalys'+'isCompleti'+'on'][_0x4eb277(0x122)+'edValue'](_0x7a4d14),mockSparrowService[_0x4eb277(0xd8)+_0x4eb277(0xcb)+'lts'][_0x4eb277(0x122)+_0x4eb277(0x114)](_0x4e17c4);const _0x350002=await _0x413ba2[_0x4eb277(0xee)+_0x4eb277(0x111)+'s'](_0x42fcb9),_0x5bee1e=_0x350002[_0x4eb277(0x131)][0x0]['issues'][0x0];expect(_0x5bee1e[_0x4eb277(0x126)+_0x4eb277(0xf2)+_0x4eb277(0xe7)])[_0x4eb277(0x119)](_0x4eb277(0x139)+'\x20없습니다.');});});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0xec4ae0=a33_0x531f;(function(_0x5606fc,_0x29eb88){const _0x59e812=a33_0x531f,_0x4b3713=_0x5606fc();while(!![]){try{const _0x56fdd4=-parseInt(_0x59e812(0x11a))/0x1*(-parseInt(_0x59e812(0x16d))/0x2)+parseInt(_0x59e812(0x13e))/0x3+parseInt(_0x59e812(0x15c))/0x4*(parseInt(_0x59e812(0x14b))/0x5)+parseInt(_0x59e812(0x123))/0x6+parseInt(_0x59e812(0x133))/0x7+parseInt(_0x59e812(0x16c))/0x8*(-parseInt(_0x59e812(0x159))/0x9)+-parseInt(_0x59e812(0x124))/0xa;if(_0x56fdd4===_0x29eb88)break;else _0x4b3713['push'](_0x4b3713['shift']());}catch(_0x2e172a){_0x4b3713['push'](_0x4b3713['shift']());}}}(a33_0x1e01,0xa03e0));function a33_0x1e01(){const _0x132cc5=['MON.5896','.service.j','1979','High','se\x20checker','.EQUAL','.ant:ant','join','il/CVE-202','remediatio','AnalysisSe','4840bPrMMj','530pAlTnw','details','https://nv','should\x20map','existsSync','affectedVe','search','parse','1.10.9','vulnLink','vulnerabil','cwd','apply','UPDATE.VER','../checker','se\x20referen','ces\x20and\x20al','toBeGreate','find','LT.OR.EQUA','rThan','cvssScore','e/ID\x20corre','4591udCSkh','1.9.0','mponents','A\x20Parsing','xpxf-3v68','rsions','utf-8','checkerKey','erability/','7828470ancSSS','33669390LrrAai','CRITICAL','GHSA-f62v-','ation','ctly','toBe','toBeDefine','xawaQ','aliasInfos','test_resul','vulnId','1.json','should\x20gen','source','erate\x20reme','881321FUoGHb','risk','mock','diation\x20re','ectly','https://os','\x20correctly','alias','ediations','toContain','Key\x20correc','2043684cXlafs','s/logger.j','SCA.SV.COM','rating','0-11979','parseScaCo','type','nRecommend','ity','length','CVE-2020-1','d.nist.gov','1.10.8','3918675ccYTjy','constructo','ting','../sparrow','issues','(((.+)+)+)','se\x20vulnera','SION.GT.OR','severity','references','\x20CRITICAL\x20','name','tly','versions','1323PekFJc','readFileSy','bility\x20nam','4MkPGFC','should\x20par','d\x20versions','\x20risk\x205\x20to','rvice\x20-\x20SC'];a33_0x1e01=function(){return _0x132cc5;};return a33_0x1e01();}const a33_0x146cac=(function(){let _0x55d09f=!![];return function(_0x3d3792,_0x41f426){const _0x217ea5=_0x55d09f?function(){const _0x2e5665=a33_0x531f;if(_0x41f426){const _0x32eb69=_0x41f426[_0x2e5665(0x10f)](_0x3d3792,arguments);return _0x41f426=null,_0x32eb69;}}:function(){};return _0x55d09f=![],_0x217ea5;};}()),a33_0x3bd3c3=a33_0x146cac(this,function(){const _0x55e570=a33_0x531f;return a33_0x3bd3c3['toString']()[_0x55e570(0x173)]('(((.+)+)+)'+'+$')['toString']()[_0x55e570(0x14c)+'r'](a33_0x3bd3c3)['search'](_0x55e570(0x150)+'+$');});a33_0x3bd3c3();import{AnalysisService}from'../analysis.service.js';import a33_0x35cc3e from'fs';import a33_0x18732d from'path';import{jest}from'@jest/globals';function a33_0x531f(_0x322e55,_0x254e1f){_0x322e55=_0x322e55-0x10f;const _0x55a238=a33_0x1e01();let _0x3bd3c3=_0x55a238[_0x322e55];return _0x3bd3c3;}jest[a33_0xec4ae0(0x135)]('../llm.ser'+'vice.js'),jest['mock'](a33_0xec4ae0(0x14e)+a33_0xec4ae0(0x162)+'s'),jest[a33_0xec4ae0(0x135)]('../s3.serv'+'ice.js'),jest[a33_0xec4ae0(0x135)](a33_0xec4ae0(0x111)+a33_0xec4ae0(0x162)+'s'),jest[a33_0xec4ae0(0x135)]('../../util'+a33_0xec4ae0(0x13f)+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn'](),'warn':jest['fn'](),'debug':jest['fn']()}})),describe(a33_0xec4ae0(0x16b)+a33_0xec4ae0(0x160)+a33_0xec4ae0(0x11d),()=>{const _0x1e5a29=a33_0xec4ae0,_0x250774={'xawaQ':function(_0x14119a,_0x1a0e5c){return _0x14119a(_0x1a0e5c);},'mmfOz':function(_0x13e070,_0x32d7da,_0x3d2c18){return _0x13e070(_0x32d7da,_0x3d2c18);}};let _0x50c67c,_0x3a7e7e;beforeAll(()=>{const _0x1b3da1=a33_0x531f;_0x50c67c=new AnalysisService();const _0x1aa50f=a33_0x18732d[_0x1b3da1(0x168)](process[_0x1b3da1(0x178)](),_0x1b3da1(0x12d)+'ts',_0x1b3da1(0x12f));if(a33_0x35cc3e[_0x1b3da1(0x171)](_0x1aa50f)){const _0x4ad8ab=a33_0x35cc3e[_0x1b3da1(0x15a)+'nc'](_0x1aa50f,_0x1b3da1(0x120));_0x3a7e7e=JSON[_0x1b3da1(0x174)](_0x4ad8ab);}else{const _0x25bcdc={};_0x25bcdc[_0x1b3da1(0x141)]=_0x1b3da1(0x164),_0x25bcdc[_0x1b3da1(0x118)]=7.5;const _0x5ac890={};_0x5ac890[_0x1b3da1(0x13a)]=_0x1b3da1(0x126)+_0x1b3da1(0x11e),_0x5ac890['link']=_0x1b3da1(0x138)+'v.dev/vuln'+_0x1b3da1(0x122)+'GHSA-f62v-'+'xpxf-3v68';const _0x2fde2e={};_0x2fde2e[_0x1b3da1(0x12e)]=_0x1b3da1(0x148)+_0x1b3da1(0x163),_0x2fde2e['vulnName']=_0x1b3da1(0x148)+_0x1b3da1(0x163),_0x2fde2e[_0x1b3da1(0x176)]=_0x1b3da1(0x16f)+_0x1b3da1(0x149)+'/vuln/deta'+_0x1b3da1(0x169)+_0x1b3da1(0x142),_0x2fde2e['severityRa'+_0x1b3da1(0x14d)]=_0x25bcdc,_0x2fde2e[_0x1b3da1(0x12c)]=[_0x5ac890];const _0x10b719={};_0x10b719['type']=_0x1b3da1(0x110)+_0x1b3da1(0x152)+_0x1b3da1(0x166),_0x10b719[_0x1b3da1(0x158)]=[_0x1b3da1(0x175)];const _0xcbc200={};_0xcbc200['versionRem'+_0x1b3da1(0x13b)]=[_0x10b719];const _0x57e552={};_0x57e552[_0x1b3da1(0x144)]='LT.OR.EQUA'+'L',_0x57e552['versions']=[_0x1b3da1(0x14a)];const _0x2e8500={};_0x2e8500['checkerKey']=_0x1b3da1(0x140)+_0x1b3da1(0x161),_0x2e8500['risk']=0x5,_0x2e8500[_0x1b3da1(0x177)+_0x1b3da1(0x146)]=_0x2fde2e,_0x2e8500[_0x1b3da1(0x16a)+'ns']=_0xcbc200,_0x2e8500[_0x1b3da1(0x172)+'rsions']=[_0x57e552];const _0x1c6b1f={};_0x1c6b1f[_0x1b3da1(0x156)]='org.apache'+_0x1b3da1(0x167),_0x1c6b1f['version']=_0x1b3da1(0x11b),_0x1c6b1f['issues']=[_0x2e8500],_0x3a7e7e=[_0x1c6b1f];}}),it('should\x20par'+_0x1e5a29(0x165)+_0x1e5a29(0x13d)+_0x1e5a29(0x157),()=>{const _0x7bdd65=_0x1e5a29,_0x30ce66=_0x50c67c[_0x7bdd65(0x143)+_0x7bdd65(0x11c)](_0x3a7e7e),_0x53e816=_0x30ce66[0x0]['issues'][0x0];expect(_0x53e816[_0x7bdd65(0x121)])[_0x7bdd65(0x129)](_0x7bdd65(0x140)+_0x7bdd65(0x161));}),it(_0x1e5a29(0x170)+_0x1e5a29(0x15f)+_0x1e5a29(0x155)+_0x1e5a29(0x153),()=>{const _0x33b9fe=_0x1e5a29,_0x320dda=_0x50c67c[_0x33b9fe(0x143)+_0x33b9fe(0x11c)](_0x3a7e7e),_0x22f204=_0x320dda[0x0]['issues'][0x0];expect(_0x22f204[_0x33b9fe(0x134)])[_0x33b9fe(0x129)](0x5),expect(_0x22f204[_0x33b9fe(0x153)])[_0x33b9fe(0x129)](_0x33b9fe(0x125));}),it('should\x20par'+_0x1e5a29(0x151)+_0x1e5a29(0x15b)+_0x1e5a29(0x119)+_0x1e5a29(0x128),()=>{const _0x508aa3=_0x1e5a29,_0x431e47=_0x50c67c['parseScaCo'+_0x508aa3(0x11c)](_0x3a7e7e),_0x1075d7=_0x431e47[0x0][_0x508aa3(0x14f)][0x0];expect(_0x1075d7['cveId'])[_0x508aa3(0x129)]('CVE-2020-1'+'1979');}),_0x250774['mmfOz'](it,_0x1e5a29(0x15d)+'se\x20affecte'+_0x1e5a29(0x15e)+_0x1e5a29(0x139),()=>{const _0x32ac12=_0x1e5a29,_0xd36a33=_0x50c67c[_0x32ac12(0x143)+_0x32ac12(0x11c)](_0x3a7e7e),_0x172a9e=_0xd36a33[0x0][_0x32ac12(0x14f)][0x0];expect(_0x172a9e['affectedVe'+_0x32ac12(0x11f)])[_0x32ac12(0x12a)+'d'](),expect(_0x172a9e[_0x32ac12(0x172)+_0x32ac12(0x11f)][_0x32ac12(0x147)])[_0x32ac12(0x114)+'rThan'](0x0),_0x250774[_0x32ac12(0x12b)](expect,_0x172a9e[_0x32ac12(0x172)+_0x32ac12(0x11f)][0x0][_0x32ac12(0x144)])[_0x32ac12(0x129)](_0x32ac12(0x116)+'L'),expect(_0x172a9e[_0x32ac12(0x172)+_0x32ac12(0x11f)][0x0][_0x32ac12(0x158)])[_0x32ac12(0x13c)](_0x32ac12(0x14a));}),_0x250774['mmfOz'](it,_0x1e5a29(0x15d)+_0x1e5a29(0x112)+_0x1e5a29(0x113)+'iases\x20corr'+_0x1e5a29(0x137),()=>{const _0x32da5e=_0x1e5a29,_0x466a34=_0x50c67c[_0x32da5e(0x143)+_0x32da5e(0x11c)](_0x3a7e7e),_0x4e4ac2=_0x466a34[0x0][_0x32da5e(0x14f)][0x0];expect(_0x4e4ac2['references'])['toBeDefine'+'d']();const _0xf6087d=_0x4e4ac2[_0x32da5e(0x154)][_0x32da5e(0x115)](_0x2949d8=>_0x2949d8[_0x32da5e(0x144)]===_0x32da5e(0x16e));expect(_0xf6087d)[_0x32da5e(0x12a)+'d'](),expect(_0xf6087d['url'])[_0x32da5e(0x13c)]('nvd.nist.g'+'ov');const _0x1c029a=_0x4e4ac2[_0x32da5e(0x154)][_0x32da5e(0x115)](_0x4fab9b=>_0x4fab9b[_0x32da5e(0x144)]==='alias');expect(_0x1c029a)[_0x32da5e(0x12a)+'d'](),expect(_0x1c029a[_0x32da5e(0x131)])[_0x32da5e(0x129)](_0x32da5e(0x126)+'xpxf-3v68');}),it(_0x1e5a29(0x130)+_0x1e5a29(0x132)+_0x1e5a29(0x136)+'commendati'+'on',()=>{const _0x5d0c34=_0x1e5a29,_0x3044bd=_0x50c67c[_0x5d0c34(0x143)+_0x5d0c34(0x11c)](_0x3a7e7e),_0x5d51d2=_0x3044bd[0x0][_0x5d0c34(0x14f)][0x0];expect(_0x5d51d2['remediatio'+_0x5d0c34(0x145)+_0x5d0c34(0x127)])[_0x5d0c34(0x12a)+'d'](),expect(_0x5d51d2[_0x5d0c34(0x16a)+'nRecommend'+_0x5d0c34(0x127)]['length'])[_0x5d0c34(0x114)+_0x5d0c34(0x117)](0x0);});});
|