@sparrowai/sparrow-mcp 1.1.13 → 1.1.14
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.d.ts +24 -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.js +1 -1
- 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.d.ts +3 -0
- 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
|
-
const a12_0x9b1779=a12_0x1b5a;(function(_0x2590bd,_0x57d307){const _0x3cc599=a12_0x1b5a,_0x2e4c58=_0x2590bd();while(!![]){try{const _0x80d34e=parseInt(_0x3cc599(0x114))/0x1*(parseInt(_0x3cc599(0xf1))/0x2)+parseInt(_0x3cc599(0xec))/0x3+-parseInt(_0x3cc599(0x101))/0x4+parseInt(_0x3cc599(0xb3))/0x5*(parseInt(_0x3cc599(0xb4))/0x6)+-parseInt(_0x3cc599(0xe5))/0x7*(parseInt(_0x3cc599(0xf0))/0x8)+parseInt(_0x3cc599(0xde))/0x9*(parseInt(_0x3cc599(0xea))/0xa)+-parseInt(_0x3cc599(0xc0))/0xb*(parseInt(_0x3cc599(0x11a))/0xc);if(_0x80d34e===_0x57d307)break;else _0x2e4c58['push'](_0x2e4c58['shift']());}catch(_0x4f6a58){_0x2e4c58['push'](_0x2e4c58['shift']());}}}(a12_0x4c66,0x45b78));const a12_0x5ba6b3=(function(){let _0x46d0eb=!![];return function(_0x30931b,_0x50117e){const _0x160d03=_0x46d0eb?function(){const _0x137b13=a12_0x1b5a;if(_0x50117e){const _0x52510a=_0x50117e[_0x137b13(0x111)](_0x30931b,arguments);return _0x50117e=null,_0x52510a;}}:function(){};return _0x46d0eb=![],_0x160d03;};}()),a12_0x501426=a12_0x5ba6b3(this,function(){const _0x2114a6=a12_0x1b5a;return a12_0x501426[_0x2114a6(0x90)]()['search'](_0x2114a6(0xe9)+'+$')[_0x2114a6(0x90)]()[_0x2114a6(0xe3)+'r'](a12_0x501426)[_0x2114a6(0xa4)]('(((.+)+)+)'+'+$');});a12_0x501426();import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockGetAnalysisStatus=jest['fn'](),mockGetAnalysisResults=jest['fn'](),mockGetScaAnalysisResults=jest['fn']();function a12_0x1b5a(_0x50aacd,_0x21ce37){_0x50aacd=_0x50aacd-0x89;const _0x569eab=a12_0x4c66();let _0x501426=_0x569eab[_0x50aacd];return _0x501426;}jest['unstable_m'+a12_0x9b1779(0x11f)](a12_0x9b1779(0x8d)+a12_0x9b1779(0x99)+a12_0x9b1779(0x10b)+'e.js',()=>({'AnalysisService':jest['fn']()[a12_0x9b1779(0xdb)+a12_0x9b1779(0x89)](()=>({'getAnalysisStatus':mockGetAnalysisStatus,'getAnalysisResults':mockGetAnalysisResults,'getScaAnalysisResults':mockGetScaAnalysisResults}))})),jest[a12_0x9b1779(0xb6)+a12_0x9b1779(0x11f)](a12_0x9b1779(0xa9)+'s/logger.j'+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn'](),'warn':jest['fn']()}}));function a12_0x4c66(){const _0x41d3a7=['issues','mQqAU','analysisId','ntroller','COMPLETE','unt','ANALYSIS','to\x20interna','ot\x20found','1.0.0','_meta','DJpdu','error','nts\x20found','licenses','\x20component','mockImplem','nts\x20identi','highCount','9VfhccY','urn\x20analys','test-lib','Initializi','SCA\x20Briefi','constructo','DaAnq','35DzTlSK','status','mockReject','ents\x20with\x20','(((.+)+)+)','5007190XAlkNX','order','470550hJihjY','rabilities','\x20table','l/high\x20sev','634352HqXbvm','1944ZAsNJh','name','urn\x20error\x20','ound','dle\x20errors','severity','No\x20compone','overage','Status:\x20FA','is\x20not\x20fou','is\x20FAIL\x20st','analysisBr','progress','rovided','bilities\x20f','SQL_INJECT','1337140PKhFlm','test-id','Content','234','edValue','FAIL','components','l\x20error','Analysis\x20n','INIT','sis.servic','ot\x20complet','sResults','urn\x20simpli','Analyzing','SQL\x20Inject','apply','Analysis\x20c','ities','464Arktya','cveId','ts.js','e.js','vulnerabil','should\x20han','7813644GPDfha','descriptio','ted\x20SCA\x20re','fail-id','Analysis\x20f','ockModule','../analysi','result','criticalCo','lineNumber','entation','No\x20vulnera','ief','toBe','../../serv','cvssScore','omplete','toString','oiSvM','zIuQr','ykIWp','ysisResult','Safe','ion\x20found','version','n\x20progress','ices/analy','kOShr','Found\x20SQL\x20','getScaAnal','Status\x20che','mockResolv','dle\x20analys','dle\x20empty\x20','MIT','sca-id','text','search','ailed\x20due\x20','toContain','Complete','sStatus','../../util','SUCCESS','ck\x20failed','totalVulne','lowCount','VfmET','fied\x20resul','CalledWith','sisProgres','CVE-2023-1','25AbkuLC','670650uYuXid','getAnalysi','unstable_m','checkerKey','content','should\x20ret','sResults\x20c','s.controll','HIGH','ng\x20analysi','dle\x20compon','trackAnaly','11gnPWHP','1.0.1','erity\x20issu','structured','Progress\x20T','if\x20progres','sing','toHaveLeng','no\x20vulnera','toHaveBeen','clearAllMo'];a12_0x4c66=function(){return _0x41d3a7;};return a12_0x4c66();}const a12_0x4f4245={};a12_0x4f4245['id']=a12_0x9b1779(0x10a),a12_0x4f4245['name']=a12_0x9b1779(0xe1)+'ng',a12_0x4f4245[a12_0x9b1779(0x11b)+'n']='Initializi'+a12_0x9b1779(0xbd)+'s',a12_0x4f4245[a12_0x9b1779(0xeb)]=0x1,a12_0x4f4245[a12_0x9b1779(0xfd)]=0x0;const a12_0x2882e7={};a12_0x2882e7['id']='ANALYSIS',a12_0x2882e7[a12_0x9b1779(0xf2)]=a12_0x9b1779(0x10f),a12_0x2882e7[a12_0x9b1779(0x11b)+'n']='Analysis\x20i'+a12_0x9b1779(0x98),a12_0x2882e7[a12_0x9b1779(0xeb)]=0x2,a12_0x2882e7[a12_0x9b1779(0xfd)]=null;const a12_0x225899={};a12_0x225899['id']=a12_0x9b1779(0xcf),a12_0x225899[a12_0x9b1779(0xf2)]=a12_0x9b1779(0xa7),a12_0x225899[a12_0x9b1779(0x11b)+'n']=a12_0x9b1779(0x112)+a12_0x9b1779(0x8f),a12_0x225899['order']=0x3,a12_0x225899[a12_0x9b1779(0xfd)]=0x64;const a12_0x18a82e={};a12_0x18a82e[a12_0x9b1779(0x10a)]=a12_0x4f4245,a12_0x18a82e['ANALYSIS']=a12_0x2882e7,a12_0x18a82e[a12_0x9b1779(0xcf)]=a12_0x225899,jest['unstable_m'+'ockModule']('../../conf'+'ig/constan'+a12_0x9b1779(0x116),()=>({'ANALYSIS_STAGES':a12_0x18a82e}));const {AnalysisController}=await import(a12_0x9b1779(0x120)+a12_0x9b1779(0xbb)+'er.js'),{AnalysisService}=await import(a12_0x9b1779(0x8d)+'ices/analy'+a12_0x9b1779(0x10b)+a12_0x9b1779(0x117));describe('AnalysisCo'+a12_0x9b1779(0xce),()=>{const _0x13b5c3=a12_0x9b1779,_0x48e73a={'zIuQr':'SUCCESS','kOShr':function(_0x4608ff,_0x28c4eb){return _0x4608ff(_0x28c4eb);},'eCCEI':'safe-lib','ykIWp':_0x13b5c3(0x95),'lDkkN':function(_0x19c8e7,_0x5ba486){return _0x19c8e7(_0x5ba486);},'DaAnq':'No\x20critica'+_0x13b5c3(0xef)+_0x13b5c3(0xc2)+'es','oiSvM':function(_0x347f93,_0x1af1cf,_0x50563d){return _0x347f93(_0x1af1cf,_0x50563d);},'OjJeW':'fail-id','VfmET':_0x13b5c3(0x106),'DJpdu':function(_0x2e34fd,_0x13f558,_0x1fe310){return _0x2e34fd(_0x13f558,_0x1fe310);}};let _0x8d6e19,_0x44c617;beforeEach(()=>{const _0x5df119=_0x13b5c3;jest[_0x5df119(0xca)+'cks'](),_0x44c617=new AnalysisService(),_0x8d6e19=new AnalysisController(_0x44c617);}),_0x48e73a[_0x13b5c3(0xd6)](describe,_0x13b5c3(0xb5)+_0x13b5c3(0xa8),()=>{const _0x5640d4=_0x13b5c3;it(_0x5640d4(0xb9)+_0x5640d4(0xdf)+'is\x20status',async()=>{const _0x2ade22=_0x5640d4,_0x5212ea={};_0x5212ea['status']=_0x2ade22(0xd1),_0x5212ea['progress']=0x32;const _0x1bb3cc=_0x5212ea;mockGetAnalysisStatus[_0x2ade22(0x9e)+_0x2ade22(0x105)](_0x1bb3cc);const _0x4eae80={};_0x4eae80['analysisId']='test-id';const _0x1beac7=await _0x8d6e19['getAnalysi'+_0x2ade22(0xa8)](_0x4eae80);expect(mockGetAnalysisStatus)['toHaveBeen'+_0x2ade22(0xb0)](_0x2ade22(0x102)),expect(_0x1beac7[_0x2ade22(0xc3)+_0x2ade22(0x103)][_0x2ade22(0xe6)])[_0x2ade22(0x8c)]('ANALYSIS'),expect(_0x1beac7['structured'+_0x2ade22(0x103)]['progress'])['toBe'](0x32);}),it(_0x5640d4(0x119)+_0x5640d4(0xf5),async()=>{const _0x2a9037=_0x5640d4;mockGetAnalysisStatus[_0x2a9037(0xe7)+_0x2a9037(0x105)](new Error('Status\x20che'+_0x2a9037(0xab)));const _0xecb4e0={};_0xecb4e0[_0x2a9037(0xcd)]=_0x2a9037(0x102);const _0x193048=await _0x8d6e19[_0x2a9037(0xb5)+'sStatus'](_0xecb4e0);expect(_0x193048['structured'+_0x2a9037(0x103)]['error'])[_0x2a9037(0x8c)](_0x2a9037(0x9d)+_0x2a9037(0xab));});}),describe(_0x13b5c3(0xb5)+'sResults',()=>{const _0x5426b4=_0x13b5c3;it(_0x5426b4(0xb9)+_0x5426b4(0x10e)+_0x5426b4(0xaf)+'ts',async()=>{const _0x17d519=_0x5426b4,_0x1a8685={};_0x1a8685[_0x17d519(0xf6)]=_0x17d519(0xbc),_0x1a8685[_0x17d519(0xb7)]=_0x17d519(0x100)+'ION',_0x1a8685['descriptio'+'n']=_0x17d519(0x110)+_0x17d519(0x96),_0x1a8685['filePath']='/src/Login'+'.java',_0x1a8685[_0x17d519(0x123)]=0xa;const _0xadbd8b={};_0xadbd8b[_0x17d519(0xcd)]='test-id',_0xadbd8b['status']=_0x17d519(0xcf),_0xadbd8b[_0x17d519(0x121)]=_0x48e73a[_0x17d519(0x92)],_0xadbd8b[_0x17d519(0x118)+_0x17d519(0x113)]=[_0x1a8685],_0xadbd8b[_0x17d519(0xfc)+_0x17d519(0x8b)]=_0x17d519(0x9b)+'Injection';const _0x2a144d=_0xadbd8b;mockGetAnalysisResults[_0x17d519(0x9e)+_0x17d519(0x105)](_0x2a144d);const _0x4b9c32={};_0x4b9c32[_0x17d519(0xcd)]=_0x17d519(0x102);const _0x36b201=await _0x8d6e19['getAnalysi'+'sResults'](_0x4b9c32);expect(mockGetAnalysisResults)['toHaveBeen'+_0x17d519(0xb0)]('test-id'),expect(_0x36b201[_0x17d519(0xc3)+_0x17d519(0x103)]['vulnerabil'+_0x17d519(0x113)])[_0x17d519(0xc7)+'th'](0x1),expect(_0x36b201[_0x17d519(0xb8)][0x0][_0x17d519(0xa3)])['toContain'](_0x17d519(0x100)+'ION');});}),describe(_0x13b5c3(0x9c)+_0x13b5c3(0x94)+'s',()=>{const _0x1f66a2=_0x13b5c3,_0x4f33ed={};_0x4f33ed[_0x1f66a2(0xcc)]=_0x1f66a2(0x109)+'ot\x20complet'+'ed';const _0xb0e03a=_0x4f33ed;it(_0x1f66a2(0xb9)+'urn\x20format'+_0x1f66a2(0x11c)+'sults\x20with'+_0x1f66a2(0xda)+_0x1f66a2(0xee),async()=>{const _0xf3bea0=_0x1f66a2,_0x2b6cec={};_0x2b6cec['name']=_0xf3bea0(0xa1);const _0x4720a3={};_0x4720a3['severity']=_0xf3bea0(0xbc),_0x4720a3[_0xf3bea0(0x115)]='CVE-2023-1'+_0xf3bea0(0x104),_0x4720a3[_0xf3bea0(0x8e)]=7.5,_0x4720a3['fixedVersi'+'on']=_0xf3bea0(0xc1);const _0x44085a={};_0x44085a[_0xf3bea0(0xf2)]=_0xf3bea0(0xe0),_0x44085a[_0xf3bea0(0x97)]=_0xf3bea0(0xd4),_0x44085a[_0xf3bea0(0xd9)]=[_0x2b6cec],_0x44085a[_0xf3bea0(0xcb)]=[_0x4720a3];const _0x21a1bb={};_0x21a1bb['analysisId']=_0xf3bea0(0xa2),_0x21a1bb[_0xf3bea0(0xe6)]=_0xf3bea0(0xcf),_0x21a1bb[_0xf3bea0(0x121)]=_0xf3bea0(0xaa),_0x21a1bb[_0xf3bea0(0x107)]=[_0x44085a],_0x21a1bb[_0xf3bea0(0xac)+_0xf3bea0(0xed)]=0x1,_0x21a1bb['criticalCo'+_0xf3bea0(0xd0)]=0x0,_0x21a1bb['highCount']=0x1,_0x21a1bb['mediumCoun'+'t']=0x0,_0x21a1bb[_0xf3bea0(0xad)]=0x0,_0x21a1bb[_0xf3bea0(0xfc)+'ief']=_0xf3bea0(0xe2)+'ng';const _0x4681eb=_0x21a1bb;mockGetScaAnalysisResults['mockResolv'+_0xf3bea0(0x105)](_0x4681eb);const _0x1c8377={};_0x1c8377[_0xf3bea0(0xcd)]=_0xf3bea0(0xa2);const _0x46e840=await _0x8d6e19['getScaAnal'+_0xf3bea0(0x94)+'s'](_0x1c8377);expect(mockGetScaAnalysisResults)[_0xf3bea0(0xc9)+_0xf3bea0(0xb0)](_0xf3bea0(0xa2)),expect(_0x46e840[_0xf3bea0(0xc3)+_0xf3bea0(0x103)][_0xf3bea0(0x107)])[_0xf3bea0(0xc7)+'th'](0x1),expect(_0x46e840[_0xf3bea0(0xb8)][0x0][_0xf3bea0(0xa3)])['toContain']('test-lib'),expect(_0x46e840[_0xf3bea0(0xb8)][0x0][_0xf3bea0(0xa3)])['toContain'](_0xf3bea0(0xb2)+'234');}),it(_0x1f66a2(0x119)+_0x1f66a2(0x9f)+_0x1f66a2(0xfa)+'nd\x20error',async()=>{const _0x154c80=_0x1f66a2;mockGetScaAnalysisResults[_0x154c80(0xe7)+_0x154c80(0x105)](new Error(_0x154c80(0x109)+_0x154c80(0xd3)));const _0x3c7790={};_0x3c7790[_0x154c80(0xcd)]='missing-id';const _0x453c16=await _0x8d6e19['getScaAnal'+_0x154c80(0x94)+'s'](_0x3c7790);expect(_0x453c16[_0x154c80(0xc3)+'Content']['error'])['toContain'](_0x154c80(0x109)+_0x154c80(0xd3));}),it(_0x1f66a2(0x119)+_0x1f66a2(0x9f)+'is\x20not\x20com'+'pleted\x20err'+'or',async()=>{const _0x384c1e=_0x1f66a2;mockGetScaAnalysisResults[_0x384c1e(0xe7)+'edValue'](new Error(_0xb0e03a[_0x384c1e(0xcc)]));const _0x2a3e95={};_0x2a3e95[_0x384c1e(0xcd)]='pending-id';const _0x55b800=await _0x8d6e19[_0x384c1e(0x9c)+_0x384c1e(0x94)+'s'](_0x2a3e95);expect(_0x55b800[_0x384c1e(0xc3)+_0x384c1e(0x103)][_0x384c1e(0xd7)])[_0x384c1e(0xa6)]('Analysis\x20n'+_0x384c1e(0x10c)+'ed');}),_0x48e73a[_0x1f66a2(0x91)](it,'should\x20han'+_0x1f66a2(0xa0)+_0x1f66a2(0x107)+'\x20list',async()=>{const _0x1fe75f=_0x1f66a2,_0x8a6582={};_0x8a6582['analysisId']=_0x1fe75f(0xa2),_0x8a6582[_0x1fe75f(0xe6)]=_0x1fe75f(0xcf),_0x8a6582['result']=_0x1fe75f(0xaa),_0x8a6582[_0x1fe75f(0x107)]=[],_0x8a6582[_0x1fe75f(0xac)+_0x1fe75f(0xed)]=0x0,_0x8a6582[_0x1fe75f(0x122)+_0x1fe75f(0xd0)]=0x0,_0x8a6582[_0x1fe75f(0xdd)]=0x0,_0x8a6582['mediumCoun'+'t']=0x0,_0x8a6582[_0x1fe75f(0xad)]=0x0,_0x8a6582['analysisBr'+_0x1fe75f(0x8b)]=_0x1fe75f(0xf7)+_0x1fe75f(0xd8);const _0x257f34=_0x8a6582;mockGetScaAnalysisResults[_0x1fe75f(0x9e)+'edValue'](_0x257f34);const _0x4aaef6={};_0x4aaef6[_0x1fe75f(0xcd)]='sca-id';const _0x5070c9=await _0x8d6e19[_0x1fe75f(0x9c)+_0x1fe75f(0x94)+'s'](_0x4aaef6);expect(_0x5070c9[_0x1fe75f(0xc3)+_0x1fe75f(0x103)]['components'])[_0x1fe75f(0xc7)+'th'](0x0),_0x48e73a[_0x1fe75f(0x9a)](expect,_0x5070c9[_0x1fe75f(0xb8)][0x0][_0x1fe75f(0xa3)])[_0x1fe75f(0xa6)](_0x1fe75f(0xf7)+_0x1fe75f(0xdc)+'fied');}),it(_0x1f66a2(0x119)+_0x1f66a2(0xbe)+_0x1f66a2(0xe8)+_0x1f66a2(0xc8)+'bilities',async()=>{const _0xd14422=_0x1f66a2,_0x13cb91={};_0x13cb91[_0xd14422(0xf2)]=_0xd14422(0xa1);const _0x47ab43={};_0x47ab43['name']=_0x48e73a['eCCEI'],_0x47ab43[_0xd14422(0x97)]=_0xd14422(0xd4),_0x47ab43[_0xd14422(0xd9)]=[_0x13cb91],_0x47ab43[_0xd14422(0xcb)]=[];const _0x311e42={};_0x311e42[_0xd14422(0xcd)]=_0xd14422(0xa2),_0x311e42[_0xd14422(0xe6)]='COMPLETE',_0x311e42[_0xd14422(0x121)]=_0xd14422(0xaa),_0x311e42[_0xd14422(0x107)]=[_0x47ab43],_0x311e42[_0xd14422(0xac)+_0xd14422(0xed)]=0x0,_0x311e42[_0xd14422(0x122)+_0xd14422(0xd0)]=0x0,_0x311e42[_0xd14422(0xdd)]=0x0,_0x311e42['mediumCoun'+'t']=0x0,_0x311e42[_0xd14422(0xad)]=0x0,_0x311e42['analysisBr'+_0xd14422(0x8b)]=_0x48e73a[_0xd14422(0x93)];const _0x164903=_0x311e42;mockGetScaAnalysisResults['mockResolv'+_0xd14422(0x105)](_0x164903);const _0x47fdbf={};_0x47fdbf[_0xd14422(0xcd)]=_0xd14422(0xa2);const _0x47e3f8=await _0x8d6e19[_0xd14422(0x9c)+_0xd14422(0x94)+'s'](_0x47fdbf);expect(_0x47e3f8['structured'+_0xd14422(0x103)][_0xd14422(0x107)])['toHaveLeng'+'th'](0x1),expect(_0x47e3f8['content'][0x0][_0xd14422(0xa3)])['toContain'](_0xd14422(0x8a)+_0xd14422(0xff)+_0xd14422(0xf4)),_0x48e73a['lDkkN'](expect,_0x47e3f8['content'][0x0]['text'])['toContain'](_0x48e73a[_0xd14422(0xe4)]);});}),describe(_0x13b5c3(0xb5)+_0x13b5c3(0xba)+_0x13b5c3(0xf8),()=>{const _0xb6de4c=_0x13b5c3;it('should\x20han'+'dle\x20analys'+_0xb6de4c(0xfb)+'atus',async()=>{const _0x1d7093=_0xb6de4c,_0x94a99f={};_0x94a99f[_0x1d7093(0xcd)]=_0x48e73a['OjJeW'],_0x94a99f['status']=_0x1d7093(0xcf),_0x94a99f[_0x1d7093(0x121)]=_0x48e73a[_0x1d7093(0xae)],_0x94a99f[_0x1d7093(0x118)+_0x1d7093(0x113)]=[],_0x94a99f[_0x1d7093(0xfc)+_0x1d7093(0x8b)]=_0x1d7093(0x11e)+_0x1d7093(0xa5)+_0x1d7093(0xd2)+_0x1d7093(0x108);const _0x4c9150=_0x94a99f;mockGetAnalysisResults[_0x1d7093(0x9e)+'edValue'](_0x4c9150);const _0x3a80b9={};_0x3a80b9[_0x1d7093(0xcd)]=_0x1d7093(0x11d);const _0x158b57=await _0x8d6e19[_0x1d7093(0xb5)+_0x1d7093(0x10d)](_0x3a80b9);expect(_0x158b57[_0x1d7093(0xc3)+'Content'][_0x1d7093(0x121)])['toBe'](_0x1d7093(0x106)),expect(_0x158b57['content'][0x0][_0x1d7093(0xa3)])[_0x1d7093(0xa6)](_0x1d7093(0xf9)+'IL');});}),describe(_0x13b5c3(0xbf)+_0x13b5c3(0xb1)+'s',()=>{const _0x118978=_0x13b5c3;it(_0x118978(0xb9)+_0x118978(0xf3)+_0x118978(0xc5)+'sToken\x20mis'+_0x118978(0xc6),async()=>{const _0x4fa249=_0x118978,_0x435058={};_0x435058['analysisId']='test-id';const _0x2ca596={};_0x2ca596[_0x4fa249(0xd5)]={};const _0x20e658=await _0x8d6e19[_0x4fa249(0xbf)+_0x4fa249(0xb1)+'s'](_0x435058,_0x2ca596);expect(_0x20e658[_0x4fa249(0xc3)+_0x4fa249(0x103)][_0x4fa249(0xd7)])[_0x4fa249(0x8c)](_0x4fa249(0xc4)+'oken\x20not\x20p'+_0x4fa249(0xfe));});});});
|
|
1
|
+
const a12_0x571b03=a12_0x6bc2;(function(_0x46c25c,_0x22cf73){const _0x1a3e1b=a12_0x6bc2,_0x56d299=_0x46c25c();while(!![]){try{const _0x233005=-parseInt(_0x1a3e1b(0x1f2))/0x1+-parseInt(_0x1a3e1b(0x1da))/0x2+parseInt(_0x1a3e1b(0x1e2))/0x3*(-parseInt(_0x1a3e1b(0x16f))/0x4)+parseInt(_0x1a3e1b(0x17d))/0x5*(-parseInt(_0x1a3e1b(0x1df))/0x6)+-parseInt(_0x1a3e1b(0x174))/0x7*(parseInt(_0x1a3e1b(0x1dd))/0x8)+parseInt(_0x1a3e1b(0x183))/0x9+parseInt(_0x1a3e1b(0x1c9))/0xa;if(_0x233005===_0x22cf73)break;else _0x56d299['push'](_0x56d299['shift']());}catch(_0x206346){_0x56d299['push'](_0x56d299['shift']());}}}(a12_0x26e9,0xa6328));const a12_0x57ed7c=(function(){let _0x1b935c=!![];return function(_0x38de9a,_0x164403){const _0x245963=_0x1b935c?function(){const _0x45fa89=a12_0x6bc2;if(_0x164403){const _0x32c3d5=_0x164403[_0x45fa89(0x1b8)](_0x38de9a,arguments);return _0x164403=null,_0x32c3d5;}}:function(){};return _0x1b935c=![],_0x245963;};}()),a12_0x4d6ef2=a12_0x57ed7c(this,function(){const _0x5cddf8=a12_0x6bc2;return a12_0x4d6ef2['toString']()[_0x5cddf8(0x1c2)](_0x5cddf8(0x1e5)+'+$')[_0x5cddf8(0x1d5)]()['constructo'+'r'](a12_0x4d6ef2)[_0x5cddf8(0x1c2)](_0x5cddf8(0x1e5)+'+$');});function a12_0x6bc2(_0x26ec72,_0x36ffd9){_0x26ec72=_0x26ec72-0x162;const _0x30ac78=a12_0x26e9();let _0x4d6ef2=_0x30ac78[_0x26ec72];return _0x4d6ef2;}a12_0x4d6ef2();import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockGetAnalysisStatus=jest['fn'](),mockGetAnalysisResults=jest['fn'](),mockGetScaAnalysisResults=jest['fn']();jest[a12_0x571b03(0x16b)+a12_0x571b03(0x1f5)](a12_0x571b03(0x1f6)+a12_0x571b03(0x18b)+a12_0x571b03(0x1ba)+a12_0x571b03(0x1c8),()=>({'AnalysisService':jest['fn']()[a12_0x571b03(0x1a3)+a12_0x571b03(0x1aa)](()=>({'getAnalysisStatus':mockGetAnalysisStatus,'getAnalysisResults':mockGetAnalysisResults,'getScaAnalysisResults':mockGetScaAnalysisResults}))})),jest[a12_0x571b03(0x16b)+'ockModule'](a12_0x571b03(0x1a4)+'s/logger.j'+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn'](),'warn':jest['fn']()}}));const a12_0x36501e={};a12_0x36501e['id']=a12_0x571b03(0x1f0),a12_0x36501e[a12_0x571b03(0x1cb)]='Initializi'+'ng',a12_0x36501e['descriptio'+'n']='Initializi'+a12_0x571b03(0x16a)+'s',a12_0x36501e['order']=0x1,a12_0x36501e[a12_0x571b03(0x1ad)]=0x0;const a12_0xa36d89={};a12_0xa36d89['id']=a12_0x571b03(0x192),a12_0xa36d89[a12_0x571b03(0x1cb)]=a12_0x571b03(0x1f4),a12_0xa36d89[a12_0x571b03(0x16e)+'n']='Analysis\x20i'+a12_0x571b03(0x1e8),a12_0xa36d89[a12_0x571b03(0x177)]=0x2,a12_0xa36d89[a12_0x571b03(0x1ad)]=null;function a12_0x26e9(){const _0x7e8a06=['pleted\x20err','cks','should\x20ret','dle\x20compon','CVE-2023-1','apply','AnalysisCo','sis.servic','SQL_INJECT','ents\x20with\x20','sResults\x20c','omplete','analysisId','dle\x20empty\x20','fied\x20resul','search','Safe','ck\x20failed','toHaveLeng','toContain','mockResolv','e.js','38525970GqdvVn','../../conf','name','No\x20vulnera','filePath','nd\x20error','rrfMX','erity\x20issu','urn\x20error\x20','l/high\x20sev','s.controll','is\x20FAIL\x20st','toString','Analysis\x20c','error','issues','No\x20compone','1601706lGXMPN','should\x20han','ot\x20found','410744zlGjoh','is\x20status','39372OkSuOD','safe-lib','oken\x20not\x20p','627105UgcQvB','sToken\x20mis','sing','(((.+)+)+)','.java','atus','n\x20progress','analysisBr','bilities','clearAllMo','no\x20vulnera','Analysis\x20n','totalVulne','text','INIT','Progress\x20T','1031355MiSCEY','overage','Analyzing','ockModule','../../serv','mockReject','CalledWith','test-id','criticalCo','toHaveBeen','sResults','ocKKZ','rovided','mediumCoun','urn\x20simpli','/src/Login','ng\x20analysi','unstable_m','sca-id','pending-id','descriptio','4iDcWyE','fixedVersi','if\x20progres','ief','getScaAnal','133WCLEsc','licenses','nts\x20found','order','version','structured','lowCount','content','er.js','485CJCZNK','unt','ntroller','status','FAIL','urn\x20analys','4332789Krayxe','Status\x20che','COMPLETE','aBwXh','fied','SUCCESS','lineNumber','ot\x20complet','ices/analy','sStatus','ig/constan','ities','components','l\x20error','Status:\x20FA','ANALYSIS','Found\x20SQL\x20','test-lib','HIGH','nts\x20identi','\x20table','ailed\x20due\x20','1.0.0','cveId','Analysis\x20f','getAnalysi','fail-id','zFenI','result','severity','No\x20critica','ion\x20found','mockImplem','../../util','edValue','highCount','ysisResult','sisProgres','vulnerabil','entation','dle\x20analys','Content','progress','sults\x20with','rabilities','toBe','trackAnaly','\x20component'];a12_0x26e9=function(){return _0x7e8a06;};return a12_0x26e9();}const a12_0x55c1d3={};a12_0x55c1d3['id']=a12_0x571b03(0x185),a12_0x55c1d3['name']='Complete',a12_0x55c1d3[a12_0x571b03(0x16e)+'n']=a12_0x571b03(0x1d6)+a12_0x571b03(0x1be),a12_0x55c1d3[a12_0x571b03(0x177)]=0x3,a12_0x55c1d3[a12_0x571b03(0x1ad)]=0x64;const a12_0x56e5db={};a12_0x56e5db[a12_0x571b03(0x1f0)]=a12_0x36501e,a12_0x56e5db[a12_0x571b03(0x192)]=a12_0xa36d89,a12_0x56e5db['COMPLETE']=a12_0x55c1d3,jest[a12_0x571b03(0x16b)+a12_0x571b03(0x1f5)](a12_0x571b03(0x1ca)+a12_0x571b03(0x18d)+'ts.js',()=>({'ANALYSIS_STAGES':a12_0x56e5db}));const {AnalysisController}=await import('../analysi'+a12_0x571b03(0x1d3)+a12_0x571b03(0x17c)),{AnalysisService}=await import(a12_0x571b03(0x1f6)+'ices/analy'+a12_0x571b03(0x1ba)+a12_0x571b03(0x1c8));describe(a12_0x571b03(0x1b9)+a12_0x571b03(0x17f),()=>{const _0xbcd5b7=a12_0x571b03,_0x14d7a6={'rrfMX':function(_0x28fd54,_0x52cb76){return _0x28fd54(_0x52cb76);},'zFenI':_0xbcd5b7(0x184)+_0xbcd5b7(0x1c4),'ocKKZ':function(_0x1bee62,_0x2dda1b,_0x235c7c){return _0x1bee62(_0x2dda1b,_0x235c7c);},'SyNHM':_0xbcd5b7(0x185),'rvVrn':'SCA\x20Briefi'+'ng','dZWVX':_0xbcd5b7(0x1db)+_0xbcd5b7(0x1ab)+'is\x20not\x20com'+_0xbcd5b7(0x1b3)+'or','TeHjb':function(_0x5a5286,_0xd30e3,_0x24417a){return _0x5a5286(_0xd30e3,_0x24417a);},'Ruqbi':_0xbcd5b7(0x191)+'IL','rcNyT':_0xbcd5b7(0x173)+_0xbcd5b7(0x1a7)+'s'};let _0x16feda,_0x337397;beforeEach(()=>{const _0x57baac=_0xbcd5b7;jest[_0x57baac(0x1eb)+_0x57baac(0x1b4)](),_0x337397=new AnalysisService(),_0x16feda=new AnalysisController(_0x337397);}),describe(_0xbcd5b7(0x19c)+_0xbcd5b7(0x18c),()=>{const _0x17f920=_0xbcd5b7;it('should\x20ret'+_0x17f920(0x182)+_0x17f920(0x1de),async()=>{const _0x152ddf=_0x17f920,_0x32e57c={};_0x32e57c[_0x152ddf(0x180)]=_0x152ddf(0x192),_0x32e57c[_0x152ddf(0x1ad)]=0x32;const _0x1601fc=_0x32e57c;mockGetAnalysisStatus['mockResolv'+_0x152ddf(0x1a5)](_0x1601fc);const _0x24f5b0={};_0x24f5b0['analysisId']=_0x152ddf(0x1f9);const _0x49e01b=await _0x16feda[_0x152ddf(0x19c)+'sStatus'](_0x24f5b0);expect(mockGetAnalysisStatus)[_0x152ddf(0x163)+_0x152ddf(0x1f8)]('test-id'),_0x14d7a6[_0x152ddf(0x1cf)](expect,_0x49e01b[_0x152ddf(0x179)+_0x152ddf(0x1ac)][_0x152ddf(0x180)])[_0x152ddf(0x1b0)](_0x152ddf(0x192)),expect(_0x49e01b[_0x152ddf(0x179)+'Content'][_0x152ddf(0x1ad)])['toBe'](0x32);}),it(_0x17f920(0x1db)+'dle\x20errors',async()=>{const _0x176bc6=_0x17f920;mockGetAnalysisStatus[_0x176bc6(0x1f7)+_0x176bc6(0x1a5)](new Error(_0x176bc6(0x184)+_0x176bc6(0x1c4)));const _0x3ff56b={};_0x3ff56b[_0x176bc6(0x1bf)]=_0x176bc6(0x1f9);const _0x2589a8=await _0x16feda[_0x176bc6(0x19c)+_0x176bc6(0x18c)](_0x3ff56b);expect(_0x2589a8[_0x176bc6(0x179)+_0x176bc6(0x1ac)][_0x176bc6(0x1d7)])[_0x176bc6(0x1b0)](_0x14d7a6[_0x176bc6(0x19e)]);});}),describe('getAnalysi'+_0xbcd5b7(0x164),()=>{const _0x239a3f=_0xbcd5b7;_0x14d7a6[_0x239a3f(0x165)](it,_0x239a3f(0x1b5)+_0x239a3f(0x168)+_0x239a3f(0x1c1)+'ts',async()=>{const _0x3cbac6=_0x239a3f,_0x51764c={};_0x51764c[_0x3cbac6(0x1a0)]=_0x3cbac6(0x195),_0x51764c['checkerKey']=_0x3cbac6(0x1bb)+'ION',_0x51764c[_0x3cbac6(0x16e)+'n']='SQL\x20Inject'+_0x3cbac6(0x1a2),_0x51764c[_0x3cbac6(0x1cd)]=_0x3cbac6(0x169)+_0x3cbac6(0x1e6),_0x51764c[_0x3cbac6(0x189)]=0xa;const _0x46c766={};_0x46c766[_0x3cbac6(0x1bf)]=_0x3cbac6(0x1f9),_0x46c766[_0x3cbac6(0x180)]=_0x3cbac6(0x185),_0x46c766[_0x3cbac6(0x19f)]=_0x3cbac6(0x188),_0x46c766['vulnerabil'+_0x3cbac6(0x18e)]=[_0x51764c],_0x46c766[_0x3cbac6(0x1e9)+'ief']=_0x3cbac6(0x193)+'Injection';const _0x4673a5=_0x46c766;mockGetAnalysisResults[_0x3cbac6(0x1c7)+_0x3cbac6(0x1a5)](_0x4673a5);const _0x2c6907={};_0x2c6907[_0x3cbac6(0x1bf)]=_0x3cbac6(0x1f9);const _0x68bbcb=await _0x16feda[_0x3cbac6(0x19c)+_0x3cbac6(0x164)](_0x2c6907);expect(mockGetAnalysisResults)['toHaveBeen'+_0x3cbac6(0x1f8)](_0x3cbac6(0x1f9)),expect(_0x68bbcb[_0x3cbac6(0x179)+_0x3cbac6(0x1ac)][_0x3cbac6(0x1a9)+_0x3cbac6(0x18e)])['toHaveLeng'+'th'](0x1),expect(_0x68bbcb[_0x3cbac6(0x17b)][0x0][_0x3cbac6(0x1ef)])[_0x3cbac6(0x1c6)](_0x3cbac6(0x1bb)+'ION');});}),describe(_0x14d7a6['rcNyT'],()=>{const _0x445ff6=_0xbcd5b7;it(_0x445ff6(0x1b5)+'urn\x20format'+'ted\x20SCA\x20re'+_0x445ff6(0x1ae)+_0x445ff6(0x1b2)+_0x445ff6(0x197),async()=>{const _0x4a29b7=_0x445ff6,_0x4fc77d={};_0x4fc77d[_0x4a29b7(0x1cb)]='MIT';const _0x18c1d4={};_0x18c1d4[_0x4a29b7(0x1a0)]='HIGH',_0x18c1d4[_0x4a29b7(0x19a)]=_0x4a29b7(0x1b7)+'234',_0x18c1d4['cvssScore']=7.5,_0x18c1d4[_0x4a29b7(0x170)+'on']='1.0.1';const _0x99ad96={};_0x99ad96['name']=_0x4a29b7(0x194),_0x99ad96[_0x4a29b7(0x178)]=_0x4a29b7(0x199),_0x99ad96[_0x4a29b7(0x175)]=[_0x4fc77d],_0x99ad96[_0x4a29b7(0x1d8)]=[_0x18c1d4];const _0x11b4d7={};_0x11b4d7[_0x4a29b7(0x1bf)]='sca-id',_0x11b4d7['status']=_0x14d7a6['SyNHM'],_0x11b4d7[_0x4a29b7(0x19f)]=_0x4a29b7(0x188),_0x11b4d7[_0x4a29b7(0x18f)]=[_0x99ad96],_0x11b4d7[_0x4a29b7(0x1ee)+_0x4a29b7(0x1af)]=0x1,_0x11b4d7[_0x4a29b7(0x162)+_0x4a29b7(0x17e)]=0x0,_0x11b4d7[_0x4a29b7(0x1a6)]=0x1,_0x11b4d7[_0x4a29b7(0x167)+'t']=0x0,_0x11b4d7[_0x4a29b7(0x17a)]=0x0,_0x11b4d7[_0x4a29b7(0x1e9)+_0x4a29b7(0x172)]=_0x14d7a6['rvVrn'];const _0x3979e5=_0x11b4d7;mockGetScaAnalysisResults['mockResolv'+_0x4a29b7(0x1a5)](_0x3979e5);const _0x382148={};_0x382148[_0x4a29b7(0x1bf)]=_0x4a29b7(0x16c);const _0x4d4a44=await _0x16feda['getScaAnal'+'ysisResult'+'s'](_0x382148);expect(mockGetScaAnalysisResults)[_0x4a29b7(0x163)+'CalledWith'](_0x4a29b7(0x16c)),expect(_0x4d4a44[_0x4a29b7(0x179)+_0x4a29b7(0x1ac)][_0x4a29b7(0x18f)])['toHaveLeng'+'th'](0x1),expect(_0x4d4a44[_0x4a29b7(0x17b)][0x0][_0x4a29b7(0x1ef)])[_0x4a29b7(0x1c6)](_0x4a29b7(0x194)),expect(_0x4d4a44[_0x4a29b7(0x17b)][0x0][_0x4a29b7(0x1ef)])[_0x4a29b7(0x1c6)]('CVE-2023-1'+'234');}),it(_0x445ff6(0x1db)+_0x445ff6(0x1ab)+'is\x20not\x20fou'+_0x445ff6(0x1ce),async()=>{const _0x1c2e88=_0x445ff6;mockGetScaAnalysisResults[_0x1c2e88(0x1f7)+'edValue'](new Error(_0x1c2e88(0x1ed)+'ot\x20found'));const _0x2bdc7e={};_0x2bdc7e[_0x1c2e88(0x1bf)]='missing-id';const _0xef6528=await _0x16feda['getScaAnal'+_0x1c2e88(0x1a7)+'s'](_0x2bdc7e);expect(_0xef6528['structured'+_0x1c2e88(0x1ac)][_0x1c2e88(0x1d7)])['toContain'](_0x1c2e88(0x1ed)+_0x1c2e88(0x1dc));}),it(_0x14d7a6['dZWVX'],async()=>{const _0x211c96=_0x445ff6;mockGetScaAnalysisResults['mockReject'+_0x211c96(0x1a5)](new Error(_0x211c96(0x1ed)+_0x211c96(0x18a)+'ed'));const _0x54db7a={};_0x54db7a[_0x211c96(0x1bf)]=_0x211c96(0x16d);const _0x8855b9=await _0x16feda['getScaAnal'+_0x211c96(0x1a7)+'s'](_0x54db7a);expect(_0x8855b9[_0x211c96(0x179)+_0x211c96(0x1ac)][_0x211c96(0x1d7)])[_0x211c96(0x1c6)]('Analysis\x20n'+_0x211c96(0x18a)+'ed');}),_0x14d7a6['TeHjb'](it,_0x445ff6(0x1db)+_0x445ff6(0x1c0)+_0x445ff6(0x18f)+'\x20list',async()=>{const _0x4cf701=_0x445ff6,_0x198c5e={};_0x198c5e[_0x4cf701(0x1bf)]=_0x4cf701(0x16c),_0x198c5e[_0x4cf701(0x180)]=_0x4cf701(0x185),_0x198c5e[_0x4cf701(0x19f)]='SUCCESS',_0x198c5e['components']=[],_0x198c5e[_0x4cf701(0x1ee)+_0x4cf701(0x1af)]=0x0,_0x198c5e['criticalCo'+_0x4cf701(0x17e)]=0x0,_0x198c5e['highCount']=0x0,_0x198c5e[_0x4cf701(0x167)+'t']=0x0,_0x198c5e[_0x4cf701(0x17a)]=0x0,_0x198c5e['analysisBr'+_0x4cf701(0x172)]=_0x4cf701(0x1d9)+_0x4cf701(0x176);const _0x5caac2=_0x198c5e;mockGetScaAnalysisResults[_0x4cf701(0x1c7)+'edValue'](_0x5caac2);const _0x5675fb={};_0x5675fb[_0x4cf701(0x1bf)]='sca-id';const _0x185083=await _0x16feda['getScaAnal'+'ysisResult'+'s'](_0x5675fb);expect(_0x185083['structured'+_0x4cf701(0x1ac)][_0x4cf701(0x18f)])[_0x4cf701(0x1c5)+'th'](0x0),expect(_0x185083[_0x4cf701(0x17b)][0x0][_0x4cf701(0x1ef)])[_0x4cf701(0x1c6)]('No\x20compone'+_0x4cf701(0x196)+_0x4cf701(0x187));}),it(_0x445ff6(0x1db)+_0x445ff6(0x1b6)+_0x445ff6(0x1bc)+_0x445ff6(0x1ec)+_0x445ff6(0x1ea),async()=>{const _0x3ac928=_0x445ff6,_0x2fbb2f={};_0x2fbb2f[_0x3ac928(0x1cb)]='MIT';const _0x72b9f9={};_0x72b9f9[_0x3ac928(0x1cb)]=_0x3ac928(0x1e0),_0x72b9f9['version']=_0x3ac928(0x199),_0x72b9f9[_0x3ac928(0x175)]=[_0x2fbb2f],_0x72b9f9[_0x3ac928(0x1d8)]=[];const _0x4b9fd1={};_0x4b9fd1[_0x3ac928(0x1bf)]=_0x3ac928(0x16c),_0x4b9fd1[_0x3ac928(0x180)]=_0x3ac928(0x185),_0x4b9fd1[_0x3ac928(0x19f)]=_0x3ac928(0x188),_0x4b9fd1['components']=[_0x72b9f9],_0x4b9fd1[_0x3ac928(0x1ee)+'rabilities']=0x0,_0x4b9fd1[_0x3ac928(0x162)+_0x3ac928(0x17e)]=0x0,_0x4b9fd1[_0x3ac928(0x1a6)]=0x0,_0x4b9fd1[_0x3ac928(0x167)+'t']=0x0,_0x4b9fd1[_0x3ac928(0x17a)]=0x0,_0x4b9fd1[_0x3ac928(0x1e9)+_0x3ac928(0x172)]=_0x3ac928(0x1c3);const _0x320fd9=_0x4b9fd1;mockGetScaAnalysisResults[_0x3ac928(0x1c7)+_0x3ac928(0x1a5)](_0x320fd9);const _0x43adab={};_0x43adab[_0x3ac928(0x1bf)]=_0x3ac928(0x16c);const _0x3e5026=await _0x16feda[_0x3ac928(0x173)+_0x3ac928(0x1a7)+'s'](_0x43adab);expect(_0x3e5026[_0x3ac928(0x179)+_0x3ac928(0x1ac)][_0x3ac928(0x18f)])['toHaveLeng'+'th'](0x1),expect(_0x3e5026[_0x3ac928(0x17b)][0x0][_0x3ac928(0x1ef)])[_0x3ac928(0x1c6)](_0x3ac928(0x1cc)+'bilities\x20f'+'ound'),expect(_0x3e5026[_0x3ac928(0x17b)][0x0][_0x3ac928(0x1ef)])[_0x3ac928(0x1c6)](_0x3ac928(0x1a1)+_0x3ac928(0x1d2)+_0x3ac928(0x1d0)+'es');});}),describe(_0xbcd5b7(0x19c)+_0xbcd5b7(0x1bd)+_0xbcd5b7(0x1f3),()=>{const _0x58125d=_0xbcd5b7,_0x322de4={};_0x322de4['aBwXh']=_0x14d7a6['Ruqbi'];const _0xc3cfb8=_0x322de4;it(_0x58125d(0x1db)+_0x58125d(0x1ab)+_0x58125d(0x1d4)+_0x58125d(0x1e7),async()=>{const _0x30d859=_0x58125d,_0x556672={};_0x556672[_0x30d859(0x1bf)]=_0x30d859(0x19d),_0x556672[_0x30d859(0x180)]='COMPLETE',_0x556672[_0x30d859(0x19f)]=_0x30d859(0x181),_0x556672[_0x30d859(0x1a9)+_0x30d859(0x18e)]=[],_0x556672[_0x30d859(0x1e9)+'ief']=_0x30d859(0x19b)+_0x30d859(0x198)+'to\x20interna'+_0x30d859(0x190);const _0x24dca4=_0x556672;mockGetAnalysisResults[_0x30d859(0x1c7)+_0x30d859(0x1a5)](_0x24dca4);const _0x46ba53={};_0x46ba53[_0x30d859(0x1bf)]='fail-id';const _0x504dbf=await _0x16feda['getAnalysi'+'sResults'](_0x46ba53);expect(_0x504dbf['structured'+_0x30d859(0x1ac)]['result'])[_0x30d859(0x1b0)](_0x30d859(0x181)),expect(_0x504dbf[_0x30d859(0x17b)][0x0]['text'])[_0x30d859(0x1c6)](_0xc3cfb8[_0x30d859(0x186)]);});}),describe(_0xbcd5b7(0x1b1)+'sisProgres'+'s',()=>{const _0x244bbf=_0xbcd5b7;it('should\x20ret'+_0x244bbf(0x1d1)+_0x244bbf(0x171)+_0x244bbf(0x1e3)+_0x244bbf(0x1e4),async()=>{const _0x56485c=_0x244bbf,_0x589aea={};_0x589aea[_0x56485c(0x1bf)]='test-id';const _0x4fcac3={};_0x4fcac3['_meta']={};const _0x5c0f87=await _0x16feda[_0x56485c(0x1b1)+_0x56485c(0x1a8)+'s'](_0x589aea,_0x4fcac3);expect(_0x5c0f87[_0x56485c(0x179)+_0x56485c(0x1ac)][_0x56485c(0x1d7)])[_0x56485c(0x1b0)](_0x56485c(0x1f1)+_0x56485c(0x1e1)+_0x56485c(0x166));});});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a13_0x440239=a13_0x2127;(function(_0x5130cb,_0x317d56){const _0x1a92cf=a13_0x2127,_0x2a9862=_0x5130cb();while(!![]){try{const _0x517a67=-parseInt(_0x1a92cf(0xa4))/0x1+-parseInt(_0x1a92cf(0xc5))/0x2*(-parseInt(_0x1a92cf(0x91))/0x3)+-parseInt(_0x1a92cf(0x90))/0x4*(-parseInt(_0x1a92cf(0xbe))/0x5)+-parseInt(_0x1a92cf(0xb9))/0x6+-parseInt(_0x1a92cf(0xd5))/0x7*(-parseInt(_0x1a92cf(0xa8))/0x8)+-parseInt(_0x1a92cf(0x92))/0x9+-parseInt(_0x1a92cf(0xce))/0xa*(-parseInt(_0x1a92cf(0xc3))/0xb);if(_0x517a67===_0x317d56)break;else _0x2a9862['push'](_0x2a9862['shift']());}catch(_0x5ded95){_0x2a9862['push'](_0x2a9862['shift']());}}}(a13_0x4cf9,0x9c22d));function a13_0x2127(_0x4d4aa4,_0x21fd9e){_0x4d4aa4=_0x4d4aa4-0x6d;const _0xc53219=a13_0x4cf9();let _0x27d338=_0xc53219[_0x4d4aa4];return _0x27d338;}const a13_0x487fc0=(function(){let _0x4f38f5=!![];return function(_0x55e627,_0x16fdda){const _0x4188f3=_0x4f38f5?function(){const _0x338776=a13_0x2127;if(_0x16fdda){const _0x1285c1=_0x16fdda[_0x338776(0x7a)](_0x55e627,arguments);return _0x16fdda=null,_0x1285c1;}}:function(){};return _0x4f38f5=![],_0x4188f3;};}()),a13_0x27d338=a13_0x487fc0(this,function(){const _0x211993=a13_0x2127;return a13_0x27d338[_0x211993(0x6d)]()['search'](_0x211993(0xd0)+'+$')[_0x211993(0x6d)]()[_0x211993(0x7e)+'r'](a13_0x27d338)['search'](_0x211993(0xd0)+'+$');});a13_0x27d338();import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockAnalyzeFileSecurity=jest['fn'](),mockAnalyzeMultipleFilesFromPaths=jest['fn'](),mockAnalyzeFolder=jest['fn'](),mockAnalyzeZipFile=jest['fn']();jest[a13_0x440239(0xb1)+a13_0x440239(0x84)](a13_0x440239(0xcb)+a13_0x440239(0x76)+'sis.servic'+a13_0x440239(0x74),()=>({'AnalysisService':jest['fn']()['mockImplem'+a13_0x440239(0x83)](()=>({'analyzeFileSecurity':mockAnalyzeFileSecurity,'analyzeMultipleFilesFromPaths':mockAnalyzeMultipleFilesFromPaths,'analyzeFolder':mockAnalyzeFolder,'analyzeZipFile':mockAnalyzeZipFile}))})),jest[a13_0x440239(0xb1)+'ockModule']('../../util'+'s/logger.j'+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn'](),'warn':jest['fn']()}}));const {SastController}=await import(a13_0x440239(0xcc)+a13_0x440239(0xae)+'s'),{AnalysisService}=await import('../../serv'+a13_0x440239(0x76)+a13_0x440239(0x71)+a13_0x440239(0x74));describe('SastContro'+'ller',()=>{const _0x39b636=a13_0x440239,_0x2a0407={'pYIIW':function(_0x24f60e,_0x5f0958,_0x5cffb5){return _0x24f60e(_0x5f0958,_0x5cffb5);},'pNGuY':_0x39b636(0xb7)+'nt\x20cannot\x20'+_0x39b636(0xb3),'csvnG':function(_0x494eee,_0x21a323){return _0x494eee(_0x21a323);},'oyjnU':_0x39b636(0xb2),'ncdBb':_0x39b636(0xa0)+_0x39b636(0x9a)+_0x39b636(0x8a)+_0x39b636(0xcd),'mggwn':'should\x20suc'+'cessfully\x20'+_0x39b636(0x6f)+_0x39b636(0x8f)+_0x39b636(0x95),'pwrHQ':_0x39b636(0xd1)+_0x39b636(0x9f)+_0x39b636(0x99),'mXjfZ':_0x39b636(0xc7)+_0x39b636(0xd2),'tKusM':_0x39b636(0xbb)+'cessfully\x20'+_0x39b636(0xc6)+_0x39b636(0xa6)+'s','NmoSC':_0x39b636(0xd9)+'esSast'};let _0x38aad6,_0x2798ba;beforeEach(()=>{const _0x421bfc=_0x39b636;jest[_0x421bfc(0xc8)+_0x421bfc(0xb0)](),_0x2798ba=new AnalysisService(),_0x38aad6=new SastController(_0x2798ba);}),describe(_0x39b636(0xd9)+_0x39b636(0xd4),()=>{const _0x15042d=_0x39b636,_0x357799={'SSaDJ':function(_0x375104,_0x10d371){return _0x375104(_0x10d371);}};_0x2a0407['pYIIW'](it,_0x15042d(0xbb)+_0x15042d(0x9b)+_0x15042d(0x6f)+'ile\x20analys'+'is',async()=>{const _0x572e72=_0x15042d,_0x1873f7={};_0x1873f7['analysisId']=_0x572e72(0xb2),_0x1873f7[_0x572e72(0x79)]=_0x572e72(0xa3);const _0x440204=_0x1873f7;mockAnalyzeFileSecurity['mockResolv'+'edValue'](_0x440204);const _0x5b6850={};_0x5b6850[_0x572e72(0x73)+'t']=_0x572e72(0x82),_0x5b6850[_0x572e72(0x80)]=_0x572e72(0xa2);const _0x3423d3=await _0x38aad6[_0x572e72(0xd9)+_0x572e72(0xd4)](_0x5b6850),_0xb8e0ac={};_0xb8e0ac[_0x572e72(0x73)+'t']=_0x572e72(0x82),_0xb8e0ac[_0x572e72(0x80)]=_0x572e72(0xa2),_0x357799[_0x572e72(0x81)](expect,mockAnalyzeFileSecurity)[_0x572e72(0x93)+'CalledWith'](_0xb8e0ac),expect(_0x3423d3[_0x572e72(0xcf)+'Content'][_0x572e72(0xc2)])['toBe'](_0x572e72(0xb2));}),_0x2a0407['pYIIW'](it,_0x15042d(0xbd)+_0x15042d(0xb8)+_0x15042d(0xc4)+'y',async()=>{const _0x36dc4a=_0x15042d;mockAnalyzeFileSecurity['mockReject'+'edValue'](new Error(_0x36dc4a(0x8c)+_0x36dc4a(0x70)));const _0x30e494={};_0x30e494[_0x36dc4a(0x73)+'t']=_0x36dc4a(0x82),_0x30e494[_0x36dc4a(0x80)]=_0x36dc4a(0xa2);const _0x2ce8ec=await _0x38aad6['analyzeFil'+_0x36dc4a(0xd4)](_0x30e494);expect(_0x2ce8ec[_0x36dc4a(0xcf)+_0x36dc4a(0x75)][_0x36dc4a(0x98)])[_0x36dc4a(0xd8)](_0x36dc4a(0x8c)+_0x36dc4a(0x70));});}),it('should\x20han'+_0x39b636(0xaf)+_0x39b636(0xad)+'nt',async()=>{const _0xc8d9b3=_0x39b636;mockAnalyzeFileSecurity[_0xc8d9b3(0x9d)+_0xc8d9b3(0xc1)](new Error(_0x2a0407['pNGuY']));const _0xa207c7={};_0xa207c7[_0xc8d9b3(0x73)+'t']='',_0xa207c7[_0xc8d9b3(0x80)]=_0xc8d9b3(0xa2);const _0x1ebe7d=await _0x38aad6[_0xc8d9b3(0xd9)+_0xc8d9b3(0xd4)](_0xa207c7);_0x2a0407[_0xc8d9b3(0xa9)](expect,_0x1ebe7d['structured'+'Content']['error'])[_0xc8d9b3(0x7b)](_0xc8d9b3(0xb7)+_0xc8d9b3(0xc9)+'be\x20empty');}),describe(_0x2a0407[_0x39b636(0xbf)],()=>{const _0x55a71f=_0x39b636;it('should\x20suc'+_0x55a71f(0x9b)+_0x55a71f(0x8e)+_0x55a71f(0x78)+_0x55a71f(0x86),async()=>{const _0x10b06d=_0x55a71f,_0x48fe63={};_0x48fe63[_0x10b06d(0xc2)]=_0x2a0407[_0x10b06d(0x85)],_0x48fe63[_0x10b06d(0x79)]=_0x10b06d(0xa3);const _0x3fc143=_0x48fe63;mockAnalyzeMultipleFilesFromPaths[_0x10b06d(0x7d)+'edValue'](_0x3fc143);const _0x4bd4bc={};_0x4bd4bc['filePaths']=['/path/to/f'+_0x10b06d(0x72),_0x10b06d(0xb5)+_0x10b06d(0x7f)];const _0x36a2a4=await _0x38aad6[_0x10b06d(0xd9)+'esSast'](_0x4bd4bc);expect(mockAnalyzeMultipleFilesFromPaths)[_0x10b06d(0x93)+_0x10b06d(0xd7)]([_0x10b06d(0xb5)+'ile1',_0x10b06d(0xb5)+_0x10b06d(0x7f)],undefined),expect(_0x36a2a4[_0x10b06d(0xcf)+_0x10b06d(0x75)][_0x10b06d(0xc2)])[_0x10b06d(0xd8)](_0x10b06d(0xb2)),expect(_0x36a2a4[_0x10b06d(0xcf)+'Content'][_0x10b06d(0x77)+_0x10b06d(0xd3)])['toBe'](0x2);}),it(_0x2a0407[_0x55a71f(0xc0)],async()=>{const _0x3261e7=_0x55a71f,_0x485bb6={};_0x485bb6[_0x3261e7(0x96)]=[];const _0x361245=await _0x38aad6[_0x3261e7(0xd9)+_0x3261e7(0xbc)](_0x485bb6);expect(_0x361245[_0x3261e7(0xcf)+_0x3261e7(0x75)][_0x3261e7(0x98)])['toBe']('File\x20paths'+'\x20not\x20provi'+_0x3261e7(0x8d)),expect(mockAnalyzeMultipleFilesFromPaths)['not'][_0x3261e7(0x93)+'Called']();});}),describe('analyzeFol'+'derSast',()=>{const _0x5be636=_0x39b636;it(_0x2a0407[_0x5be636(0xb6)],async()=>{const _0x571462=_0x5be636,_0x2c3ec8={};_0x2c3ec8['analysisId']=_0x571462(0xb2),_0x2c3ec8[_0x571462(0x79)]=_0x571462(0xa3),_0x2c3ec8[_0x571462(0x88)+_0x571462(0x89)]=[];const _0x452ce6=_0x2c3ec8;mockAnalyzeFolder[_0x571462(0x7d)+_0x571462(0xc1)](_0x452ce6);const _0x4b2ee9={};_0x4b2ee9[_0x571462(0xa5)]='/path/to/f'+_0x571462(0xba);const _0x4726c6=await _0x38aad6['analyzeFol'+_0x571462(0xaa)](_0x4b2ee9);expect(mockAnalyzeFolder)[_0x571462(0x93)+'CalledWith'](_0x571462(0xb5)+'older',undefined),expect(_0x4726c6[_0x571462(0xcf)+_0x571462(0x75)]['analysisId'])['toBe'](_0x571462(0xb2));}),it('should\x20ret'+'urn\x20error\x20'+'if\x20folder\x20'+_0x5be636(0xab)+'ng',async()=>{const _0x5b9f05=_0x5be636,_0x2ec34d={};_0x2ec34d['folderPath']='';const _0x3a4aac=await _0x38aad6['analyzeFol'+'derSast'](_0x2ec34d);expect(_0x3a4aac['structured'+_0x5b9f05(0x75)][_0x5b9f05(0x98)])['toBe']('Folder\x20pat'+_0x5b9f05(0xca)+_0x5b9f05(0xd6)),expect(mockAnalyzeFolder)['not']['toHaveBeen'+_0x5b9f05(0xa1)]();});}),describe(_0x39b636(0xda)+_0x39b636(0x94),()=>{const _0x2d7a2c=_0x39b636,_0x4c5e27={};_0x4c5e27['LbqmF']=_0x2a0407[_0x2d7a2c(0x9e)];const _0x19b2a6=_0x4c5e27;it(_0x2a0407[_0x2d7a2c(0xb4)],async()=>{const _0x4bd42f=_0x2d7a2c,_0x530b36={};_0x530b36[_0x4bd42f(0xc2)]=_0x4bd42f(0xb2),_0x530b36[_0x4bd42f(0x79)]=_0x4bd42f(0xa3);const _0x58da4d=_0x530b36;mockAnalyzeZipFile[_0x4bd42f(0x7d)+'edValue'](_0x58da4d);const _0x272a3e={};_0x272a3e[_0x4bd42f(0x9c)+'h']='/path/to/f'+'ile.zip';const _0xf56489=await _0x38aad6[_0x4bd42f(0xda)+_0x4bd42f(0x94)](_0x272a3e);expect(mockAnalyzeZipFile)[_0x4bd42f(0x93)+_0x4bd42f(0xd7)](_0x4bd42f(0xb5)+_0x4bd42f(0xac),undefined),expect(_0xf56489[_0x4bd42f(0xcf)+_0x4bd42f(0x75)]['analysisId'])[_0x4bd42f(0xd8)](_0x4bd42f(0xb2));}),it(_0x2d7a2c(0xa0)+_0x2d7a2c(0x9a)+_0x2d7a2c(0x6e)+_0x2d7a2c(0x87),async()=>{const _0x5474d5=_0x2d7a2c,_0x285259={};_0x285259[_0x5474d5(0x9c)+'h']='';const _0x186016=await _0x38aad6[_0x5474d5(0xda)+_0x5474d5(0x94)](_0x285259);expect(_0x186016[_0x5474d5(0xcf)+_0x5474d5(0x75)]['error'])[_0x5474d5(0xd8)](_0x2a0407[_0x5474d5(0x8b)]),expect(mockAnalyzeZipFile)[_0x5474d5(0xa7)][_0x5474d5(0x93)+'Called']();}),it(_0x2d7a2c(0xbd)+'dle\x20zip\x20fi'+_0x2d7a2c(0x97),async()=>{const _0x33f71a=_0x2d7a2c;mockAnalyzeZipFile[_0x33f71a(0x9d)+_0x33f71a(0xc1)](new Error(_0x19b2a6[_0x33f71a(0x7c)]));const _0x497081={};_0x497081['zipFilePat'+'h']='corrupt.zi'+'p';const _0x2b47a5=await _0x38aad6[_0x33f71a(0xda)+_0x33f71a(0x94)](_0x497081);expect(_0x2b47a5[_0x33f71a(0xcf)+_0x33f71a(0x75)][_0x33f71a(0x98)])[_0x33f71a(0x7b)](_0x19b2a6[_0x33f71a(0x7c)]);});});});function a13_0x4cf9(){const _0x33ff8d=['cks','unstable_m','test-id','be\x20empty','tKusM','/path/to/f','mggwn','File\x20conte','dle\x20errors','3352098yInBmD','older','should\x20suc','esSast','should\x20han','2779480zSJBZl','NmoSC','ncdBb','edValue','analysisId','2541kqwrpp','\x20gracefull','285386vyLoqY','initiate\x20z','Invalid\x20ZI','clearAllMo','nt\x20cannot\x20','h\x20not\x20prov','../../serv','../sast.co','s\x20provided','68810NnvgRU','structured','(((.+)+)+)','ZIP\x20file\x20p','P\x20file','unt','eSast','5278usQLPh','ided','CalledWith','toBe','analyzeFil','analyzeZip','toString','if\x20zip\x20pat','initiate\x20f','ailed','sis.servic','ile1','fileConten','e.js','Content','ices/analy','filePathCo','ulti-file\x20','status','apply','toContain','LbqmF','mockResolv','constructo','ile2','fileName','SSaDJ','code','entation','ockModule','oyjnU','analysis','h\x20missing','skippedFol','ders','if\x20no\x20file','pwrHQ','Analysis\x20f','ded','initiate\x20m','older\x20anal','4fHycQM','12PNCcVH','3318975rBYWrT','toHaveBeen','Sast','ysis','filePaths','le\x20errors','error','ovided','urn\x20error\x20','cessfully\x20','zipFilePat','mockReject','mXjfZ','ath\x20not\x20pr','should\x20ret','Called','test.java','INIT','1234390eQAvOk','folderPath','ip\x20analysi','not','904aSzSKg','csvnG','derSast','path\x20missi','ile.zip','file\x20conte','ntroller.j','dle\x20empty\x20'];a13_0x4cf9=function(){return _0x33ff8d;};return a13_0x4cf9();}
|
|
1
|
+
function a13_0x2d5f(_0x21aba5,_0x22817f){_0x21aba5=_0x21aba5-0xd7;const _0xb03330=a13_0x2641();let _0x50eb85=_0xb03330[_0x21aba5];return _0x50eb85;}const a13_0x10516d=a13_0x2d5f;(function(_0x31c308,_0x4f7759){const _0x28f252=a13_0x2d5f,_0x131cb9=_0x31c308();while(!![]){try{const _0x1165fb=parseInt(_0x28f252(0xe8))/0x1*(-parseInt(_0x28f252(0xfb))/0x2)+-parseInt(_0x28f252(0x135))/0x3*(-parseInt(_0x28f252(0x120))/0x4)+-parseInt(_0x28f252(0xda))/0x5*(-parseInt(_0x28f252(0x109))/0x6)+parseInt(_0x28f252(0x118))/0x7*(parseInt(_0x28f252(0xfd))/0x8)+parseInt(_0x28f252(0xf2))/0x9*(parseInt(_0x28f252(0x113))/0xa)+-parseInt(_0x28f252(0x124))/0xb+parseInt(_0x28f252(0x131))/0xc*(-parseInt(_0x28f252(0x106))/0xd);if(_0x1165fb===_0x4f7759)break;else _0x131cb9['push'](_0x131cb9['shift']());}catch(_0x30b51a){_0x131cb9['push'](_0x131cb9['shift']());}}}(a13_0x2641,0xe5644));const a13_0x4db68e=(function(){let _0x44f51b=!![];return function(_0x152045,_0x36aa90){const _0x56cb44=_0x44f51b?function(){const _0x29ad12=a13_0x2d5f;if(_0x36aa90){const _0x4f36db=_0x36aa90[_0x29ad12(0x144)](_0x152045,arguments);return _0x36aa90=null,_0x4f36db;}}:function(){};return _0x44f51b=![],_0x56cb44;};}()),a13_0x50eb85=a13_0x4db68e(this,function(){const _0x4d238a=a13_0x2d5f;return a13_0x50eb85['toString']()[_0x4d238a(0xf8)](_0x4d238a(0x141)+'+$')[_0x4d238a(0x107)]()[_0x4d238a(0xf0)+'r'](a13_0x50eb85)['search']('(((.+)+)+)'+'+$');});a13_0x50eb85();function a13_0x2641(){const _0x2c3a3f=['ile2','fileName','12whUdna','s\x20provided','cessfully\x20','dle\x20errors','3857433yLVilu','toBe','eOSkZ','analysisId','toHaveBeen','e.js','zipFilePat','initiate\x20f','analysis','../../serv','Sast','test.java','(((.+)+)+)','Called','kJctj','apply','mockResolv','eSast','be\x20empty','QIbGb','8164235HzMfBp','unt','not','initiate\x20m','ile.zip','eMRAf','Analysis\x20f','ailed','skippedFol','cks','analyzeFil','Folder\x20pat','gHjJS','entation','388558wQgbUd','mockImplem','corrupt.zi','if\x20zip\x20pat','Invalid\x20ZI','clearAllMo','derSast','should\x20han','constructo','status','117sTWKEq','filePathCo','Content','\x20not\x20provi','ile\x20analys','older\x20anal','search','File\x20conte','ovided','4LgJFmK','wHUdk','196024FGdvDm','older','le\x20errors','File\x20paths','unstable_m','INIT','SastContro','file\x20conte','../../util','8470995QlkzGh','toString','ded','6NVfmwD','ller','analyzeFol','ided','CalledWith','ockModule','/path/to/f','ath\x20not\x20pr','structured','ZIP\x20file\x20p','507670xPcqgl','toContain','mockReject','should\x20ret','urn\x20error\x20','105XSrnsm','fileConten','P\x20file','edValue','code','dle\x20empty\x20','dle\x20zip\x20fi','analyzeZip','4VdjDzf','ile1','if\x20no\x20file','nt\x20cannot\x20','17356405sHYBXb','if\x20folder\x20','ices/analy','h\x20not\x20prov','error','test-id','filePaths','sis.servic','initiate\x20z','ip\x20analysi','../sast.co'];a13_0x2641=function(){return _0x2c3a3f;};return a13_0x2641();}import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockAnalyzeFileSecurity=jest['fn'](),mockAnalyzeMultipleFilesFromPaths=jest['fn'](),mockAnalyzeFolder=jest['fn'](),mockAnalyzeZipFile=jest['fn']();jest[a13_0x10516d(0x101)+a13_0x10516d(0x10e)]('../../serv'+a13_0x10516d(0x126)+a13_0x10516d(0x12b)+a13_0x10516d(0x13a),()=>({'AnalysisService':jest['fn']()[a13_0x10516d(0xe9)+a13_0x10516d(0xe7)](()=>({'analyzeFileSecurity':mockAnalyzeFileSecurity,'analyzeMultipleFilesFromPaths':mockAnalyzeMultipleFilesFromPaths,'analyzeFolder':mockAnalyzeFolder,'analyzeZipFile':mockAnalyzeZipFile}))})),jest[a13_0x10516d(0x101)+a13_0x10516d(0x10e)](a13_0x10516d(0x105)+'s/logger.j'+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn'](),'warn':jest['fn']()}}));const {SastController}=await import(a13_0x10516d(0x12e)+'ntroller.j'+'s'),{AnalysisService}=await import(a13_0x10516d(0x13e)+a13_0x10516d(0x126)+'sis.servic'+a13_0x10516d(0x13a));describe(a13_0x10516d(0x103)+a13_0x10516d(0x10a),()=>{const _0x218dec=a13_0x10516d,_0x2017fc={'JFoQQ':_0x218dec(0x140),'kJctj':function(_0x5b16ce,_0x23b87a){return _0x5b16ce(_0x23b87a);},'eMRAf':_0x218dec(0x129),'wHUdk':function(_0x21922f,_0x5e3c70){return _0x21922f(_0x5e3c70);},'gHjJS':_0x218dec(0x112)+_0x218dec(0x110)+_0x218dec(0xfa),'ACdTb':function(_0x576263,_0x4dd576,_0x437cb8){return _0x576263(_0x4dd576,_0x437cb8);},'eOSkZ':function(_0x23f617,_0x3d9105,_0xd57769){return _0x23f617(_0x3d9105,_0xd57769);}};let _0x2dc9df,_0x4ece4d;beforeEach(()=>{const _0x1631de=_0x218dec;jest[_0x1631de(0xed)+_0x1631de(0xe3)](),_0x4ece4d=new AnalysisService(),_0x2dc9df=new SastController(_0x4ece4d);}),describe('analyzeFil'+_0x218dec(0xd7),()=>{const _0x384644=_0x218dec,_0x20af2a={};_0x20af2a[_0x384644(0xd9)]=_0x384644(0x102);const _0x39cb6a=_0x20af2a;it('should\x20suc'+_0x384644(0x133)+_0x384644(0x13c)+_0x384644(0xf6)+'is',async()=>{const _0xfc886e=_0x384644,_0x456962={};_0x456962[_0xfc886e(0x138)]=_0xfc886e(0x129),_0x456962['status']=_0x39cb6a[_0xfc886e(0xd9)];const _0x3e94e2=_0x456962;mockAnalyzeFileSecurity[_0xfc886e(0x145)+_0xfc886e(0x11b)](_0x3e94e2);const _0x3f4bcf={};_0x3f4bcf[_0xfc886e(0x119)+'t']=_0xfc886e(0x11c),_0x3f4bcf[_0xfc886e(0x130)]=_0xfc886e(0x140);const _0x4766f8=await _0x2dc9df[_0xfc886e(0xe4)+_0xfc886e(0xd7)](_0x3f4bcf),_0x311e68={};_0x311e68[_0xfc886e(0x119)+'t']=_0xfc886e(0x11c),_0x311e68['fileName']=_0xfc886e(0x140),expect(mockAnalyzeFileSecurity)[_0xfc886e(0x139)+'CalledWith'](_0x311e68),expect(_0x4766f8['structured'+_0xfc886e(0xf4)][_0xfc886e(0x138)])[_0xfc886e(0x136)](_0xfc886e(0x129));}),it('should\x20han'+_0x384644(0x134)+'\x20gracefull'+'y',async()=>{const _0x22f1ab=_0x384644;mockAnalyzeFileSecurity[_0x22f1ab(0x115)+_0x22f1ab(0x11b)](new Error(_0x22f1ab(0xe0)+_0x22f1ab(0xe1)));const _0xc14c56={};_0xc14c56['fileConten'+'t']=_0x22f1ab(0x11c),_0xc14c56[_0x22f1ab(0x130)]=_0x22f1ab(0x140);const _0x36fb11=await _0x2dc9df[_0x22f1ab(0xe4)+_0x22f1ab(0xd7)](_0xc14c56);expect(_0x36fb11['structured'+_0x22f1ab(0xf4)][_0x22f1ab(0x128)])[_0x22f1ab(0x136)](_0x22f1ab(0xe0)+_0x22f1ab(0xe1));});}),_0x2017fc[_0x218dec(0x137)](it,'should\x20han'+_0x218dec(0x11d)+_0x218dec(0x104)+'nt',async()=>{const _0x2d5b07=_0x218dec;mockAnalyzeFileSecurity[_0x2d5b07(0x115)+_0x2d5b07(0x11b)](new Error(_0x2d5b07(0xf9)+_0x2d5b07(0x123)+_0x2d5b07(0xd8)));const _0x45bf06={};_0x45bf06[_0x2d5b07(0x119)+'t']='',_0x45bf06[_0x2d5b07(0x130)]=_0x2017fc['JFoQQ'];const _0x2d8b5d=await _0x2dc9df[_0x2d5b07(0xe4)+_0x2d5b07(0xd7)](_0x45bf06);_0x2017fc[_0x2d5b07(0x143)](expect,_0x2d8b5d[_0x2d5b07(0x111)+_0x2d5b07(0xf4)][_0x2d5b07(0x128)])['toContain'](_0x2d5b07(0xf9)+'nt\x20cannot\x20'+'be\x20empty');}),describe(_0x218dec(0xe4)+'esSast',()=>{const _0x3a0dc7=_0x218dec;it('should\x20suc'+_0x3a0dc7(0x133)+_0x3a0dc7(0xdd)+'ulti-file\x20'+_0x3a0dc7(0x13d),async()=>{const _0x793001=_0x3a0dc7,_0x2fdb2c={};_0x2fdb2c[_0x793001(0x138)]='test-id',_0x2fdb2c[_0x793001(0xf1)]=_0x793001(0x102);const _0x4888cf=_0x2fdb2c;mockAnalyzeMultipleFilesFromPaths[_0x793001(0x145)+_0x793001(0x11b)](_0x4888cf);const _0xfb2f5b={};_0xfb2f5b[_0x793001(0x12a)]=['/path/to/f'+_0x793001(0x121),_0x793001(0x10f)+'ile2'];const _0x36c24d=await _0x2dc9df[_0x793001(0xe4)+'esSast'](_0xfb2f5b);expect(mockAnalyzeMultipleFilesFromPaths)[_0x793001(0x139)+_0x793001(0x10d)]([_0x793001(0x10f)+'ile1',_0x793001(0x10f)+_0x793001(0x12f)],undefined),expect(_0x36c24d[_0x793001(0x111)+_0x793001(0xf4)][_0x793001(0x138)])['toBe'](_0x793001(0x129)),expect(_0x36c24d[_0x793001(0x111)+_0x793001(0xf4)][_0x793001(0xf3)+_0x793001(0xdb)])[_0x793001(0x136)](0x2);}),it(_0x3a0dc7(0x116)+_0x3a0dc7(0x117)+_0x3a0dc7(0x122)+_0x3a0dc7(0x132),async()=>{const _0x473ec3=_0x3a0dc7,_0x40acc6={};_0x40acc6[_0x473ec3(0x12a)]=[];const _0x1aaad7=await _0x2dc9df[_0x473ec3(0xe4)+'esSast'](_0x40acc6);expect(_0x1aaad7[_0x473ec3(0x111)+_0x473ec3(0xf4)][_0x473ec3(0x128)])[_0x473ec3(0x136)](_0x473ec3(0x100)+_0x473ec3(0xf5)+_0x473ec3(0x108)),expect(mockAnalyzeMultipleFilesFromPaths)['not'][_0x473ec3(0x139)+_0x473ec3(0x142)]();});}),describe(_0x218dec(0x10b)+_0x218dec(0xee),()=>{const _0x5cfd51=_0x218dec;it('should\x20suc'+_0x5cfd51(0x133)+'initiate\x20f'+_0x5cfd51(0xf7)+'ysis',async()=>{const _0x1f184d=_0x5cfd51,_0x573c0b={};_0x573c0b[_0x1f184d(0x138)]=_0x2017fc[_0x1f184d(0xdf)],_0x573c0b['status']=_0x1f184d(0x102),_0x573c0b[_0x1f184d(0xe2)+'ders']=[];const _0x20c565=_0x573c0b;mockAnalyzeFolder[_0x1f184d(0x145)+_0x1f184d(0x11b)](_0x20c565);const _0x3258ce={};_0x3258ce['folderPath']='/path/to/f'+_0x1f184d(0xfe);const _0x12a01d=await _0x2dc9df[_0x1f184d(0x10b)+_0x1f184d(0xee)](_0x3258ce);expect(mockAnalyzeFolder)[_0x1f184d(0x139)+_0x1f184d(0x10d)](_0x1f184d(0x10f)+'older',undefined),_0x2017fc[_0x1f184d(0xfc)](expect,_0x12a01d[_0x1f184d(0x111)+_0x1f184d(0xf4)][_0x1f184d(0x138)])[_0x1f184d(0x136)](_0x1f184d(0x129));}),it(_0x5cfd51(0x116)+_0x5cfd51(0x117)+_0x5cfd51(0x125)+'path\x20missi'+'ng',async()=>{const _0x20af25=_0x5cfd51,_0x5a1bf1={};_0x5a1bf1['folderPath']='';const _0x3066ca=await _0x2dc9df[_0x20af25(0x10b)+_0x20af25(0xee)](_0x5a1bf1);expect(_0x3066ca[_0x20af25(0x111)+_0x20af25(0xf4)]['error'])[_0x20af25(0x136)](_0x20af25(0xe5)+_0x20af25(0x127)+_0x20af25(0x10c)),expect(mockAnalyzeFolder)[_0x20af25(0xdc)]['toHaveBeen'+_0x20af25(0x142)]();});}),describe(_0x218dec(0x11f)+'Sast',()=>{const _0xca20d1=_0x218dec;it('should\x20suc'+_0xca20d1(0x133)+_0xca20d1(0x12c)+_0xca20d1(0x12d)+'s',async()=>{const _0x2c7ff7=_0xca20d1,_0x26e191={};_0x26e191['analysisId']=_0x2c7ff7(0x129),_0x26e191[_0x2c7ff7(0xf1)]=_0x2c7ff7(0x102);const _0x1d5db7=_0x26e191;mockAnalyzeZipFile[_0x2c7ff7(0x145)+_0x2c7ff7(0x11b)](_0x1d5db7);const _0xd9b0fa={};_0xd9b0fa[_0x2c7ff7(0x13b)+'h']=_0x2c7ff7(0x10f)+_0x2c7ff7(0xde);const _0x53aee8=await _0x2dc9df['analyzeZip'+_0x2c7ff7(0x13f)](_0xd9b0fa);expect(mockAnalyzeZipFile)[_0x2c7ff7(0x139)+_0x2c7ff7(0x10d)](_0x2c7ff7(0x10f)+'ile.zip',undefined),expect(_0x53aee8[_0x2c7ff7(0x111)+_0x2c7ff7(0xf4)][_0x2c7ff7(0x138)])['toBe'](_0x2c7ff7(0x129));}),_0x2017fc['ACdTb'](it,_0xca20d1(0x116)+'urn\x20error\x20'+_0xca20d1(0xeb)+'h\x20missing',async()=>{const _0x56dec7=_0xca20d1,_0xce690d={};_0xce690d[_0x56dec7(0x13b)+'h']='';const _0x5098e0=await _0x2dc9df[_0x56dec7(0x11f)+_0x56dec7(0x13f)](_0xce690d);expect(_0x5098e0[_0x56dec7(0x111)+_0x56dec7(0xf4)][_0x56dec7(0x128)])[_0x56dec7(0x136)](_0x2017fc[_0x56dec7(0xe6)]),expect(mockAnalyzeZipFile)[_0x56dec7(0xdc)][_0x56dec7(0x139)+_0x56dec7(0x142)]();}),it(_0xca20d1(0xef)+_0xca20d1(0x11e)+_0xca20d1(0xff),async()=>{const _0xdd30d2=_0xca20d1;mockAnalyzeZipFile[_0xdd30d2(0x115)+_0xdd30d2(0x11b)](new Error('Invalid\x20ZI'+'P\x20file'));const _0x45717f={};_0x45717f[_0xdd30d2(0x13b)+'h']=_0xdd30d2(0xea)+'p';const _0x1f9883=await _0x2dc9df['analyzeZip'+_0xdd30d2(0x13f)](_0x45717f);expect(_0x1f9883[_0xdd30d2(0x111)+_0xdd30d2(0xf4)]['error'])[_0xdd30d2(0x114)](_0xdd30d2(0xec)+_0xdd30d2(0x11a));});});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x132a62=a14_0x2111;(function(_0x32e031,_0x590770){const _0x2e3ab8=a14_0x2111,_0x4d29bc=_0x32e031();while(!![]){try{const _0x186c13=parseInt(_0x2e3ab8(0x162))/0x1*(parseInt(_0x2e3ab8(0x186))/0x2)+-parseInt(_0x2e3ab8(0x15c))/0x3+-parseInt(_0x2e3ab8(0x172))/0x4+parseInt(_0x2e3ab8(0x184))/0x5+-parseInt(_0x2e3ab8(0x177))/0x6+-parseInt(_0x2e3ab8(0x1a9))/0x7*(-parseInt(_0x2e3ab8(0x182))/0x8)+parseInt(_0x2e3ab8(0x16e))/0x9;if(_0x186c13===_0x590770)break;else _0x4d29bc['push'](_0x4d29bc['shift']());}catch(_0x3666c5){_0x4d29bc['push'](_0x4d29bc['shift']());}}}(a14_0x1cb6,0x85c1e));const a14_0x40946b=(function(){let _0x3bf14f=!![];return function(_0x17dbcc,_0x34b77c){const _0x40717e=_0x3bf14f?function(){const _0xb29a91=a14_0x2111;if(_0x34b77c){const _0x51cdb5=_0x34b77c[_0xb29a91(0x194)](_0x17dbcc,arguments);return _0x34b77c=null,_0x51cdb5;}}:function(){};return _0x3bf14f=![],_0x40717e;};}()),a14_0x1ca1d8=a14_0x40946b(this,function(){const _0x4c0858=a14_0x2111;return a14_0x1ca1d8[_0x4c0858(0x168)]()['search'](_0x4c0858(0x166)+'+$')['toString']()[_0x4c0858(0x15f)+'r'](a14_0x1ca1d8)[_0x4c0858(0x183)](_0x4c0858(0x166)+'+$');});a14_0x1ca1d8();import{jest,describe,it,expect,beforeEach}from'@jest/globals';const mockAnalyzeFileSca=jest['fn'](),mockAnalyzeFilesSca=jest['fn'](),mockAnalyzeFolderSca=jest['fn'](),mockAnalyzeZipSca=jest['fn']();function a14_0x1cb6(){const _0x426f59=['zipFilePat','initiate\x20z','h\x20missing','filePaths','File\x20path\x20','if\x20zip\x20pat','ices/analy','ackage.jso','apply','File\x20paths','ip\x20analysi','/path/to/p','unstable_m','edValue','derSca','../sca.con','Iqkik','urn\x20error\x20','test-id','should\x20ret','Content','analyzeFol','1.json','SCA','analyzeZip','ded','\x20not\x20provi','troller.js','Folder\x20pat','24129WgLcdU','analysisTy','ScaControl','analyzeFil','3161973NrwmPN','esSca','path\x20missi','constructo','clearAllMo','s\x20provided','3JcODyK','status','Sca','CalledWith','(((.+)+)+)','th\x20missing','toString','ided','ile.zip','older\x20anal','skippedFol','../../util','8462016EoRfch','2.json','toHaveBeen','error','1740704FxpUca','/path/to/f','should\x20suc','if\x20file\x20pa','cessfully\x20','552444HYLNpi','initiate\x20f','toBe','if\x20no\x20file','e.js','analysisId','mockResolv','ler','Called','not','folderPath','1784xRRmlY','search','1294330HXIUFo','s/logger.j','107560jsAoqw','eSca','structured','filePath','cks','INIT'];a14_0x1cb6=function(){return _0x426f59;};return a14_0x1cb6();}jest[a14_0x132a62(0x198)+'ockModule']('../../serv'+a14_0x132a62(0x192)+'sis.servic'+a14_0x132a62(0x17b),()=>({'AnalysisService':jest['fn']()['mockImplem'+'entation'](()=>({'analyzeFileSca':mockAnalyzeFileSca,'analyzeFilesSca':mockAnalyzeFilesSca,'analyzeFolderSca':mockAnalyzeFolderSca,'analyzeZipSca':mockAnalyzeZipSca}))})),jest['unstable_m'+'ockModule'](a14_0x132a62(0x16d)+a14_0x132a62(0x185)+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn']()}}));function a14_0x2111(_0x550988,_0x5e7686){_0x550988=_0x550988-0x15b;const _0x39eb51=a14_0x1cb6();let _0x1ca1d8=_0x39eb51[_0x550988];return _0x1ca1d8;}const {ScaController}=await import(a14_0x132a62(0x19b)+a14_0x132a62(0x1a7)),{AnalysisService}=await import('../../serv'+a14_0x132a62(0x192)+'sis.servic'+a14_0x132a62(0x17b));describe(a14_0x132a62(0x1ab)+a14_0x132a62(0x17e),()=>{const _0x49ba4b=a14_0x132a62,_0x4862d0={'Iqkik':function(_0x4330bc,_0x42a385,_0xf7a455){return _0x4330bc(_0x42a385,_0xf7a455);}};let _0x392c83,_0x43bb81;beforeEach(()=>{const _0x32783d=a14_0x2111;jest[_0x32783d(0x160)+_0x32783d(0x18a)](),_0x43bb81=new AnalysisService(),_0x392c83=new ScaController(_0x43bb81);}),describe(_0x49ba4b(0x15b)+'eSca',()=>{const _0x342198=_0x49ba4b;it(_0x342198(0x174)+'cessfully\x20'+_0x342198(0x178)+'ile\x20analys'+'is',async()=>{const _0x3f70b5=_0x342198,_0x36d3d8={};_0x36d3d8[_0x3f70b5(0x17c)]='test-id',_0x36d3d8['status']=_0x3f70b5(0x18b),_0x36d3d8[_0x3f70b5(0x1aa)+'pe']=_0x3f70b5(0x1a3);const _0x343b13=_0x36d3d8;mockAnalyzeFileSca[_0x3f70b5(0x17d)+_0x3f70b5(0x199)](_0x343b13);const _0x23ea43={};_0x23ea43[_0x3f70b5(0x189)]=_0x3f70b5(0x197)+'ackage.jso'+'n';const _0x287e5f=await _0x392c83[_0x3f70b5(0x15b)+_0x3f70b5(0x187)](_0x23ea43);expect(mockAnalyzeFileSca)[_0x3f70b5(0x170)+_0x3f70b5(0x165)]('/path/to/p'+_0x3f70b5(0x193)+'n',undefined),expect(_0x287e5f[_0x3f70b5(0x188)+_0x3f70b5(0x1a0)][_0x3f70b5(0x17c)])[_0x3f70b5(0x179)](_0x3f70b5(0x19e));}),it(_0x342198(0x19f)+_0x342198(0x19d)+_0x342198(0x175)+_0x342198(0x167),async()=>{const _0x5864bf=_0x342198,_0xf7cfb7={};_0xf7cfb7[_0x5864bf(0x189)]='';const _0x12a8a3=await _0x392c83[_0x5864bf(0x15b)+_0x5864bf(0x187)](_0xf7cfb7);expect(_0x12a8a3['structured'+_0x5864bf(0x1a0)]['error'])[_0x5864bf(0x179)](_0x5864bf(0x190)+'not\x20provid'+'ed'),expect(mockAnalyzeFileSca)[_0x5864bf(0x180)]['toHaveBeen'+_0x5864bf(0x17f)]();});}),describe('analyzeFil'+_0x49ba4b(0x15d),()=>{const _0x10eefa=_0x49ba4b;it(_0x10eefa(0x174)+_0x10eefa(0x176)+'initiate\x20m'+'ulti-file\x20'+'analysis',async()=>{const _0xb9f97f=_0x10eefa,_0x117e38={};_0x117e38[_0xb9f97f(0x17c)]=_0xb9f97f(0x19e),_0x117e38[_0xb9f97f(0x163)]=_0xb9f97f(0x18b),_0x117e38[_0xb9f97f(0x1aa)+'pe']='SCA';const _0x38f0a7=_0x117e38;mockAnalyzeFilesSca[_0xb9f97f(0x17d)+_0xb9f97f(0x199)](_0x38f0a7);const _0x2a921d={};_0x2a921d['filePaths']=[_0xb9f97f(0x197)+_0xb9f97f(0x1a2),'/path/to/p'+'2.json'];const _0x4adde8=await _0x392c83[_0xb9f97f(0x15b)+_0xb9f97f(0x15d)](_0x2a921d);expect(mockAnalyzeFilesSca)[_0xb9f97f(0x170)+_0xb9f97f(0x165)]([_0xb9f97f(0x197)+_0xb9f97f(0x1a2),_0xb9f97f(0x197)+_0xb9f97f(0x16f)],undefined),expect(_0x4adde8['structured'+'Content'][_0xb9f97f(0x17c)])[_0xb9f97f(0x179)]('test-id');}),it('should\x20ret'+'urn\x20error\x20'+_0x10eefa(0x17a)+_0x10eefa(0x161),async()=>{const _0x1234e0=_0x10eefa,_0x30220e={};_0x30220e[_0x1234e0(0x18f)]=[];const _0x25b5d6=await _0x392c83[_0x1234e0(0x15b)+'esSca'](_0x30220e);expect(_0x25b5d6[_0x1234e0(0x188)+'Content'][_0x1234e0(0x171)])[_0x1234e0(0x179)](_0x1234e0(0x195)+_0x1234e0(0x1a6)+_0x1234e0(0x1a5)),expect(mockAnalyzeFilesSca)[_0x1234e0(0x180)]['toHaveBeen'+'Called']();});}),describe('analyzeFol'+'derSca',()=>{const _0x1290aa=_0x49ba4b;_0x4862d0[_0x1290aa(0x19c)](it,_0x1290aa(0x174)+'cessfully\x20'+_0x1290aa(0x178)+_0x1290aa(0x16b)+'ysis',async()=>{const _0x414331=_0x1290aa,_0x49db82={};_0x49db82['analysisId']='test-id',_0x49db82[_0x414331(0x163)]=_0x414331(0x18b),_0x49db82['analysisTy'+'pe']=_0x414331(0x1a3),_0x49db82[_0x414331(0x16c)+'ders']=[];const _0x469359=_0x49db82;mockAnalyzeFolderSca['mockResolv'+_0x414331(0x199)](_0x469359);const _0x5402b4={};_0x5402b4[_0x414331(0x181)]='/path/to/f'+'older';const _0xb3f988=await _0x392c83['analyzeFol'+'derSca'](_0x5402b4);expect(mockAnalyzeFolderSca)[_0x414331(0x170)+_0x414331(0x165)](_0x414331(0x173)+'older',undefined),expect(_0xb3f988[_0x414331(0x188)+'Content'][_0x414331(0x17c)])[_0x414331(0x179)](_0x414331(0x19e));}),it(_0x1290aa(0x19f)+_0x1290aa(0x19d)+'if\x20folder\x20'+_0x1290aa(0x15e)+'ng',async()=>{const _0x5cab5a=_0x1290aa,_0x21c8e4={};_0x21c8e4[_0x5cab5a(0x181)]='';const _0x426faf=await _0x392c83[_0x5cab5a(0x1a1)+_0x5cab5a(0x19a)](_0x21c8e4);expect(_0x426faf['structured'+_0x5cab5a(0x1a0)]['error'])['toBe'](_0x5cab5a(0x1a8)+'h\x20not\x20prov'+_0x5cab5a(0x169)),expect(mockAnalyzeFolderSca)[_0x5cab5a(0x180)][_0x5cab5a(0x170)+_0x5cab5a(0x17f)]();});}),describe(_0x49ba4b(0x1a4)+_0x49ba4b(0x164),()=>{const _0x5afb2b=_0x49ba4b;it(_0x5afb2b(0x174)+_0x5afb2b(0x176)+_0x5afb2b(0x18d)+_0x5afb2b(0x196)+'s',async()=>{const _0x5a89c7=_0x5afb2b,_0x2c1a77={};_0x2c1a77[_0x5a89c7(0x17c)]=_0x5a89c7(0x19e),_0x2c1a77[_0x5a89c7(0x163)]=_0x5a89c7(0x18b),_0x2c1a77[_0x5a89c7(0x1aa)+'pe']=_0x5a89c7(0x1a3);const _0x51488b=_0x2c1a77;mockAnalyzeZipSca[_0x5a89c7(0x17d)+_0x5a89c7(0x199)](_0x51488b);const _0x18e6f6={};_0x18e6f6[_0x5a89c7(0x18c)+'h']='/path/to/f'+_0x5a89c7(0x16a);const _0x2b2e30=await _0x392c83[_0x5a89c7(0x1a4)+_0x5a89c7(0x164)](_0x18e6f6);expect(mockAnalyzeZipSca)[_0x5a89c7(0x170)+_0x5a89c7(0x165)](_0x5a89c7(0x173)+_0x5a89c7(0x16a),undefined),expect(_0x2b2e30[_0x5a89c7(0x188)+'Content'][_0x5a89c7(0x17c)])[_0x5a89c7(0x179)](_0x5a89c7(0x19e));}),it(_0x5afb2b(0x19f)+'urn\x20error\x20'+_0x5afb2b(0x191)+_0x5afb2b(0x18e),async()=>{const _0x35d236=_0x5afb2b,_0x4fed9c={};_0x4fed9c['zipFilePat'+'h']='';const _0xebed54=await _0x392c83[_0x35d236(0x1a4)+_0x35d236(0x164)](_0x4fed9c);expect(_0xebed54[_0x35d236(0x188)+_0x35d236(0x1a0)][_0x35d236(0x171)])[_0x35d236(0x179)]('ZIP\x20file\x20p'+'ath\x20not\x20pr'+'ovided'),expect(mockAnalyzeZipSca)['not'][_0x35d236(0x170)+_0x35d236(0x17f)]();});});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x5bf3e8=a15_0x1436;(function(_0x19dc8f,_0x17deaf){const _0x2acb8e=a15_0x1436,_0x5b04f2=_0x19dc8f();while(!![]){try{const _0x5da4bb=-parseInt(_0x2acb8e(0xab))/0x1*(-parseInt(_0x2acb8e(0x90))/0x2)+-parseInt(_0x2acb8e(0x82))/0x3+parseInt(_0x2acb8e(0x7b))/0x4+-parseInt(_0x2acb8e(0xb6))/0x5*(parseInt(_0x2acb8e(0xa6))/0x6)+-parseInt(_0x2acb8e(0x79))/0x7+parseInt(_0x2acb8e(0xa3))/0x8*(-parseInt(_0x2acb8e(0xac))/0x9)+parseInt(_0x2acb8e(0x85))/0xa*(parseInt(_0x2acb8e(0x78))/0xb);if(_0x5da4bb===_0x17deaf)break;else _0x5b04f2['push'](_0x5b04f2['shift']());}catch(_0x440fcb){_0x5b04f2['push'](_0x5b04f2['shift']());}}}(a15_0x2ec5,0x6aa76));const a15_0x31de5c=(function(){let _0x5c6945=!![];return function(_0x28a2b6,_0x47cb00){const _0x496d8f=_0x5c6945?function(){const _0x434ab5=a15_0x1436;if(_0x47cb00){const _0x54df78=_0x47cb00[_0x434ab5(0x9b)](_0x28a2b6,arguments);return _0x47cb00=null,_0x54df78;}}:function(){};return _0x5c6945=![],_0x496d8f;};}()),a15_0x5c2f34=a15_0x31de5c(this,function(){const _0x472fd0=a15_0x1436,_0x5a4da0={};_0x5a4da0[_0x472fd0(0x88)]=_0x472fd0(0x87)+'+$';const _0x9be942=_0x5a4da0;return a15_0x5c2f34[_0x472fd0(0x7a)]()[_0x472fd0(0x92)](_0x472fd0(0x87)+'+$')[_0x472fd0(0x7a)]()[_0x472fd0(0x7e)+'r'](a15_0x5c2f34)[_0x472fd0(0x92)](_0x9be942[_0x472fd0(0x88)]);});function a15_0x1436(_0x4de242,_0x368468){_0x4de242=_0x4de242-0x77;const _0x1901f2=a15_0x2ec5();let _0x5c2f34=_0x1901f2[_0x4de242];return _0x5c2f34;}a15_0x5c2f34();import{jest,describe,it,expect,beforeEach}from'@jest/globals';function a15_0x2ec5(){const _0x1fa8a3=['should\x20ret','generateSe','1913004KDnIiK','test-id','brief','ntroller','ode','660893bYeUyR','1819062MxbvwR','unstable_m','../../serv','er.js','code','mockReject','Generation','cureCode','secure\x20cod','sis.servic','5jnHglY','edValue','12677731AEWzZu','1429897tdKzDG','toString','26280iluEmr','SecurityCo','should\x20han','constructo','reTun','secureCode','\x20code\x20and\x20','1973721lDYPLm','../../util','dle\x20errors','10lsXByl','ure','(((.+)+)+)','YOyZE','diff','e.js','entation','original\x20c','rvice\x20fail','structured','ices/analy','2LDBnIw','../securit','search','e\x20generati','Brief','fileConten','mockResolv','\x20failed','toBe','error','s/logger.j','apply','ockModule','Secure\x20cod','dle\x20LLM\x20se','clearAllMo','analysisId','Content','y.controll','8DlVocl'];a15_0x2ec5=function(){return _0x1fa8a3;};return a15_0x2ec5();}const mockGenerateSecureCodeFromAnalysis=jest['fn']();jest[a15_0x5bf3e8(0xad)+a15_0x5bf3e8(0x9c)](a15_0x5bf3e8(0xae)+a15_0x5bf3e8(0x8f)+a15_0x5bf3e8(0xb5)+a15_0x5bf3e8(0x8a),()=>({'AnalysisService':jest['fn']()['mockImplem'+a15_0x5bf3e8(0x8b)](()=>({'generateSecureCodeFromAnalysis':mockGenerateSecureCodeFromAnalysis}))})),jest[a15_0x5bf3e8(0xad)+a15_0x5bf3e8(0x9c)](a15_0x5bf3e8(0x83)+a15_0x5bf3e8(0x9a)+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn']()}}));const {SecurityController}=await import(a15_0x5bf3e8(0x91)+a15_0x5bf3e8(0xa2)+a15_0x5bf3e8(0xaf)),{AnalysisService}=await import(a15_0x5bf3e8(0xae)+'ices/analy'+a15_0x5bf3e8(0xb5)+a15_0x5bf3e8(0x8a));describe(a15_0x5bf3e8(0x7c)+a15_0x5bf3e8(0xa9),()=>{const _0x3c0f01=a15_0x5bf3e8,_0x36bebf={};_0x36bebf[_0x3c0f01(0x7f)]=_0x3c0f01(0xb0);const _0x170166=_0x36bebf;let _0x35dc18,_0x3cc590;beforeEach(()=>{const _0xb30be9=_0x3c0f01;jest[_0xb30be9(0x9f)+'cks'](),_0x3cc590=new AnalysisService(),_0x35dc18=new SecurityController(_0x3cc590);}),describe(_0x3c0f01(0xa5)+_0x3c0f01(0xb3),()=>{const _0x30cdd3=_0x3c0f01;it(_0x30cdd3(0xa4)+'urn\x20secure'+_0x30cdd3(0x81)+_0x30cdd3(0x89),async()=>{const _0x3006e7=_0x30cdd3,_0xa95dbd={};_0xa95dbd['secureCode']=_0x3006e7(0xb4)+'e',_0xa95dbd[_0x3006e7(0x80)+_0x3006e7(0x94)]=_0x3006e7(0xa8),_0xa95dbd[_0x3006e7(0x89)]=_0x3006e7(0x89);const _0xf86d32=_0xa95dbd;mockGenerateSecureCodeFromAnalysis[_0x3006e7(0x96)+_0x3006e7(0x77)](_0xf86d32);const _0x1de5b4={};_0x1de5b4[_0x3006e7(0xa0)]=_0x3006e7(0xa7),_0x1de5b4['fileConten'+'t']=_0x3006e7(0x8c)+'ode';const _0x5a21b1=await _0x35dc18[_0x3006e7(0xa5)+_0x3006e7(0xb3)](_0x1de5b4);expect(mockGenerateSecureCodeFromAnalysis)['toHaveBeen'+'CalledWith'](_0x3006e7(0xa7),_0x3006e7(0x8c)+_0x3006e7(0xaa)),expect(_0x5a21b1['structured'+_0x3006e7(0xa1)][_0x3006e7(0x80)])[_0x3006e7(0x98)](_0x3006e7(0xb4)+'e'),expect(_0x5a21b1[_0x3006e7(0x8e)+_0x3006e7(0xa1)][_0x3006e7(0x89)])[_0x3006e7(0x98)]('diff');}),it(_0x30cdd3(0x7d)+_0x30cdd3(0x84),async()=>{const _0x21d945=_0x30cdd3;mockGenerateSecureCodeFromAnalysis['mockReject'+'edValue'](new Error(_0x21d945(0xb2)+_0x21d945(0x97)));const _0x20f238={};_0x20f238[_0x21d945(0xa0)]=_0x21d945(0xa7),_0x20f238[_0x21d945(0x95)+'t']=_0x170166[_0x21d945(0x7f)];const _0x4ea1a8=await _0x35dc18[_0x21d945(0xa5)+_0x21d945(0xb3)](_0x20f238);expect(_0x4ea1a8[_0x21d945(0x8e)+_0x21d945(0xa1)][_0x21d945(0x99)])[_0x21d945(0x98)](_0x21d945(0xb2)+'\x20failed');});}),it('should\x20han'+_0x3c0f01(0x9e)+_0x3c0f01(0x8d)+_0x3c0f01(0x86),async()=>{const _0x365ccc=_0x3c0f01;mockGenerateSecureCodeFromAnalysis[_0x365ccc(0xb1)+_0x365ccc(0x77)](new Error('Secure\x20cod'+_0x365ccc(0x93)+'on\x20failed'));const _0x4386cc={};_0x4386cc[_0x365ccc(0xa0)]=_0x365ccc(0xa7),_0x4386cc[_0x365ccc(0x95)+'t']=_0x365ccc(0xb0);const _0xf23323=await _0x35dc18[_0x365ccc(0xa5)+_0x365ccc(0xb3)](_0x4386cc);expect(_0xf23323[_0x365ccc(0x8e)+'Content'][_0x365ccc(0x99)])['toContain'](_0x365ccc(0x9d)+_0x365ccc(0x93)+'on\x20failed');});});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a16_0x1aca2c=a16_0x43b2;(function(_0x3ec41e,_0x1c76a2){const _0x31b79e=a16_0x43b2,_0x3906e2=_0x3ec41e();while(!![]){try{const _0x31b7e6=parseInt(_0x31b79e(0x7a))/0x1+-parseInt(_0x31b79e(0x6e))/0x2+parseInt(_0x31b79e(0x7c))/0x3*(-parseInt(_0x31b79e(0x7d))/0x4)+-parseInt(_0x31b79e(0x6d))/0x5*(-parseInt(_0x31b79e(0x71))/0x6)+-parseInt(_0x31b79e(0x80))/0x7*(-parseInt(_0x31b79e(0x73))/0x8)+-parseInt(_0x31b79e(0x6f))/0x9+parseInt(_0x31b79e(0x79))/0xa;if(_0x31b7e6===_0x1c76a2)break;else _0x3906e2['push'](_0x3906e2['shift']());}catch(_0x4cc330){_0x3906e2['push'](_0x3906e2['shift']());}}}(a16_0x53fa,0x773d4));function a16_0x43b2(_0x38bf0d,_0x35853e){_0x38bf0d=_0x38bf0d-0x68;const _0x41ea73=a16_0x53fa();let _0x1d780f=_0x41ea73[_0x38bf0d];return _0x1d780f;}const a16_0x4e0f4b=(function(){let _0x2a229e=!![];return function(_0x335a28,_0x18c0ee){const _0x1432d3=_0x2a229e?function(){const _0x1ff4e2=a16_0x43b2;if(_0x18c0ee){const _0xff8df0=_0x18c0ee[_0x1ff4e2(0x75)](_0x335a28,arguments);return _0x18c0ee=null,_0xff8df0;}}:function(){};return _0x2a229e=![],_0x1432d3;};}()),a16_0x1d780f=a16_0x4e0f4b(this,function(){const _0x117109=a16_0x43b2;return a16_0x1d780f[_0x117109(0x6a)]()[_0x117109(0x68)](_0x117109(0x70)+'+$')[_0x117109(0x6a)]()['constructo'+'r'](a16_0x1d780f)[_0x117109(0x68)](_0x117109(0x70)+'+$');});function a16_0x53fa(){const _0x968998=['ockModule','toString','instantiab','SystemCont','1090WwwWAp','168216aJbXEU','2383929SJkGEx','(((.+)+)+)','1284VrsHHs','unstable_m','2442032SndRLg','../../util','apply','cks','controller','.js','3106940KRNIrU','271937hVtzWs','clearAllMo','6978FAymFw','692LhOfbS','toBeInstan','roller','14mbORps','search'];a16_0x53fa=function(){return _0x968998;};return a16_0x53fa();}a16_0x1d780f();import{jest,describe,it,expect,beforeEach}from'@jest/globals';jest[a16_0x1aca2c(0x72)+a16_0x1aca2c(0x69)](a16_0x1aca2c(0x74)+'s/logger.j'+'s',()=>({'logger':{'info':jest['fn'](),'error':jest['fn']()}}));const {SystemController}=await import('../system.'+a16_0x1aca2c(0x77)+a16_0x1aca2c(0x78));describe(a16_0x1aca2c(0x6c)+a16_0x1aca2c(0x7f),()=>{const _0x17bda3=a16_0x1aca2c;let _0x55ab2c;beforeEach(()=>{const _0x58511d=a16_0x43b2;jest[_0x58511d(0x7b)+_0x58511d(0x76)](),_0x55ab2c=new SystemController();}),it('should\x20be\x20'+_0x17bda3(0x6b)+'le',()=>{const _0x4972b7=_0x17bda3;expect(_0x55ab2c)[_0x4972b7(0x7e)+'ceOf'](SystemController);});});
|
|
@@ -38,7 +38,18 @@ export declare class AnalysisController {
|
|
|
38
38
|
type: "text";
|
|
39
39
|
text: string;
|
|
40
40
|
}[];
|
|
41
|
-
structuredContent:
|
|
41
|
+
structuredContent: {
|
|
42
|
+
analysisId: string;
|
|
43
|
+
status: "completed" | "failed" | "SUCCESS" | "FAIL" | "STOP";
|
|
44
|
+
result: "SUCCESS" | "FAIL" | "STOP";
|
|
45
|
+
components: import("../types/types.js").ScaComponent[];
|
|
46
|
+
totalVulnerabilities: number;
|
|
47
|
+
criticalCount: number;
|
|
48
|
+
highCount: number;
|
|
49
|
+
mediumCount: number;
|
|
50
|
+
lowCount: number;
|
|
51
|
+
analysisBrief: string;
|
|
52
|
+
};
|
|
42
53
|
isError?: undefined;
|
|
43
54
|
} | {
|
|
44
55
|
content: {
|
|
@@ -49,6 +60,18 @@ export declare class AnalysisController {
|
|
|
49
60
|
error: string;
|
|
50
61
|
};
|
|
51
62
|
isError: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
content: {
|
|
65
|
+
type: "text";
|
|
66
|
+
text: string;
|
|
67
|
+
}[];
|
|
68
|
+
structuredContent: {
|
|
69
|
+
analysisId: string;
|
|
70
|
+
status: "completed" | "failed" | "SUCCESS" | "FAIL" | "STOP";
|
|
71
|
+
result: "SUCCESS" | "FAIL" | "STOP";
|
|
72
|
+
vulnerabilities: any;
|
|
73
|
+
analysisBrief: string;
|
|
74
|
+
};
|
|
52
75
|
}>;
|
|
53
76
|
getScaAnalysisResults({ analysisId }: {
|
|
54
77
|
analysisId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a7_0x383507=a7_0xd6ef;(function(_0x2d6c4b,_0x5ab206){const _0x2043ab=a7_0xd6ef,_0x1f2ecc=_0x2d6c4b();while(!![]){try{const _0x28915d=parseInt(_0x2043ab(0x192))/0x1*(-parseInt(_0x2043ab(0x124))/0x2)+parseInt(_0x2043ab(0xd0))/0x3+parseInt(_0x2043ab(0x1c6))/0x4+parseInt(_0x2043ab(0x1ef))/0x5*(-parseInt(_0x2043ab(0x1c9))/0x6)+parseInt(_0x2043ab(0x1d0))/0x7+-parseInt(_0x2043ab(0x1e2))/0x8+parseInt(_0x2043ab(0x1e5))/0x9*(parseInt(_0x2043ab(0x108))/0xa);if(_0x28915d===_0x5ab206)break;else _0x1f2ecc['push'](_0x1f2ecc['shift']());}catch(_0x491a25){_0x1f2ecc['push'](_0x1f2ecc['shift']());}}}(a7_0x24ff,0xf278a));function a7_0xd6ef(_0x433de9,_0x25b241){_0x433de9=_0x433de9-0xcb;const _0x50c34b=a7_0x24ff();let _0x1e5df8=_0x50c34b[_0x433de9];return _0x1e5df8;}const a7_0x4778fd=(function(){let _0x4d2354=!![];return function(_0x48f262,_0x580cac){const _0x529b26=_0x4d2354?function(){const _0x466b73=a7_0xd6ef;if(_0x580cac){const _0xb21abe=_0x580cac[_0x466b73(0x15b)](_0x48f262,arguments);return _0x580cac=null,_0xb21abe;}}:function(){};return _0x4d2354=![],_0x529b26;};}()),a7_0x1e5df8=a7_0x4778fd(this,function(){const _0x4ade64=a7_0xd6ef;return a7_0x1e5df8['toString']()[_0x4ade64(0x19f)]('(((.+)+)+)'+'+$')[_0x4ade64(0xef)]()[_0x4ade64(0x1e3)+'r'](a7_0x1e5df8)['search'](_0x4ade64(0x1f6)+'+$');});a7_0x1e5df8();import{logger}from'../utils/logger.js';import{ANALYSIS_STAGES}from'../config/constants.js';export class AnalysisController{[a7_0x383507(0x1da)+a7_0x383507(0x12c)];constructor(_0xeead0a){const _0x2d0dcf=a7_0x383507;this[_0x2d0dcf(0x1da)+_0x2d0dcf(0x12c)]=_0xeead0a;}async[a7_0x383507(0x13f)+a7_0x383507(0xf9)]({analysisId:_0x4c8912}){const _0x158341=a7_0x383507,_0x1e98ef={};_0x1e98ef[_0x158341(0x150)]=function(_0x5ba4fe,_0x53075d){return _0x5ba4fe instanceof _0x53075d;};const _0x3bb637=_0x1e98ef;try{logger[_0x158341(0x14e)](_0x158341(0x1c0)+'tatus\x20requ'+_0x158341(0x174)+_0x4c8912);const _0x493d04=await this[_0x158341(0x1da)+_0x158341(0x12c)][_0x158341(0x13f)+_0x158341(0xf9)](_0x4c8912),_0x299862=_0x493d04['status']==='COMPLETE'&&_0x493d04[_0x158341(0x14f)]?_0x493d04[_0x158341(0x14f)]:_0x493d04[_0x158341(0x139)],_0x40d3e7={};_0x40d3e7[_0x158341(0x12b)]='text',_0x40d3e7[_0x158341(0x10f)]=_0x158341(0x135)+_0x158341(0x197)+_0x299862+(_0x158341(0x1c7)+'\x20')+(_0x493d04[_0x158341(0xdd)]||0x0)+(_0x158341(0x1b2)+'\x20')+(_0x493d04['message']||_0x158341(0xcb));const _0x33e749={};_0x33e749['analysisId']=_0x4c8912,_0x33e749[_0x158341(0x139)]=_0x299862,_0x33e749['result']=_0x493d04['result'],_0x33e749[_0x158341(0xdd)]=_0x493d04[_0x158341(0xdd)],_0x33e749['message']=_0x493d04[_0x158341(0x1e8)];const _0x2c47f5={};return _0x2c47f5[_0x158341(0x14b)]=[_0x40d3e7],_0x2c47f5[_0x158341(0x117)+'Content']=_0x33e749,_0x2c47f5;}catch(_0x51ef3a){return logger[_0x158341(0x169)](_0x158341(0x1c0)+_0x158341(0x186)+_0x158341(0x13a),_0x51ef3a),{'content':[{'type':'text','text':_0x158341(0xfc)+_0x158341(0x145)+_0x158341(0x1d1)+'\x20'+(_0x3bb637[_0x158341(0x150)](_0x51ef3a,Error)?_0x51ef3a['message']:_0x158341(0xdf)+_0x158341(0x143))}],'structuredContent':{'error':_0x51ef3a instanceof Error?_0x51ef3a[_0x158341(0x1e8)]:'Unknown\x20er'+_0x158341(0x143)}};}}async[a7_0x383507(0x13f)+'sResults']({analysisId:_0x19b95e}){const _0x3910e4=a7_0x383507,_0x8c459e={'Fkwcr':function(_0x1b91a4,_0x365845){return _0x1b91a4+_0x365845;},'Zwrnw':function(_0x58ed28,_0x4f1f28){return _0x58ed28>_0x4f1f28;},'RizWl':_0x3910e4(0xec)+_0x3910e4(0x133)+_0x3910e4(0xd1),'WKXmT':function(_0x3a82db,_0x4d9fb7){return _0x3a82db||_0x4d9fb7;},'ZjrXy':function(_0x22a1ab,_0xf61897,_0x3908ed){return _0x22a1ab(_0xf61897,_0x3908ed);},'gbcqB':function(_0x3917b6,_0x3d78ad){return _0x3917b6 instanceof _0x3d78ad;},'UQfFG':'text'};try{logger['info'](_0x3910e4(0x131)+_0x3910e4(0xd3)+'uested:\x20'+_0x19b95e);const _0x4537b4=await this[_0x3910e4(0x1da)+'rvice'][_0x3910e4(0x13f)+_0x3910e4(0x1b8)](_0x19b95e),_0x310def=_0x4537b4[_0x3910e4(0x14f)]??_0x4537b4[_0x3910e4(0x139)];if(_0x4537b4[_0x3910e4(0x104)]===_0x3910e4(0xf7)){const _0x54ea5e=_0x4537b4,_0x5790ef=_0x3910e4(0x1a1)+_0x3910e4(0xda)+_0x3910e4(0x122)+'e\x20|\x20Vulner'+_0x3910e4(0x1ce)+_0x3910e4(0x17e)+_0x3910e4(0x168)+_0x3910e4(0x1f5)+_0x3910e4(0x1f5)+_0x3910e4(0x1f5)+_0x3910e4(0x165)+'----------'+_0x3910e4(0x1c4),_0x17c15d=_0x54ea5e[_0x3910e4(0x10d)][_0x3910e4(0x132)](_0x31897b=>{const _0x3c7b1d=_0x3910e4,_0x1d3fa8=_0x31897b[_0x3c7b1d(0xea)][_0x3c7b1d(0x129)]>0x0?_0x31897b[_0x3c7b1d(0xea)][_0x3c7b1d(0x132)](_0xb42b84=>_0xb42b84[_0x3c7b1d(0x176)])[_0x3c7b1d(0x120)](',\x20'):_0x3c7b1d(0x102),_0x14a7fd=_0x31897b[_0x3c7b1d(0x1ed)][_0x3c7b1d(0x12f)](_0x5f0d08=>_0x5f0d08[_0x3c7b1d(0x1c1)]===_0x3c7b1d(0x119))[_0x3c7b1d(0x129)],_0x44d022=_0x31897b[_0x3c7b1d(0x1ed)][_0x3c7b1d(0x12f)](_0x3f5900=>_0x3f5900[_0x3c7b1d(0x1c1)]==='HIGH')[_0x3c7b1d(0x129)],_0x535330=_0x31897b[_0x3c7b1d(0x1ed)][_0x3c7b1d(0x12f)](_0x53f524=>_0x53f524[_0x3c7b1d(0x1c1)]==='MEDIUM')[_0x3c7b1d(0x129)],_0x21728e=_0x31897b[_0x3c7b1d(0x1ed)][_0x3c7b1d(0x12f)](_0x517576=>_0x517576['severity']===_0x3c7b1d(0x178))['length'],_0x3421ba=_0x8c459e['Fkwcr'](_0x14a7fd+_0x44d022,_0x535330)+_0x21728e+'\x20('+_0x14a7fd+'/'+_0x44d022+'/'+_0x535330+'/'+_0x21728e+')';return'|\x20'+_0x31897b['name']+_0x3c7b1d(0x134)+_0x31897b[_0x3c7b1d(0x136)]+_0x3c7b1d(0x134)+_0x1d3fa8+_0x3c7b1d(0x134)+_0x3421ba+'\x20|';})[_0x3910e4(0x120)]('\x0a'),_0x1b65d3=_0x8c459e[_0x3910e4(0x19a)](_0x54ea5e[_0x3910e4(0x10d)][_0x3910e4(0x129)],0x0)?_0x5790ef+'\x0a'+_0x17c15d:_0x8c459e['RizWl'],_0x2be3e1=_0x54ea5e[_0x3910e4(0x10d)][_0x3910e4(0x12f)](_0x35ea52=>_0x35ea52['issues']['length']>0x0)[_0x3910e4(0x132)](_0x2f623a=>{const _0x3af7a7=_0x3910e4,_0x5197cf=_0x2f623a[_0x3af7a7(0x1ed)][_0x3af7a7(0x132)]((_0x3cf530,_0x3b4e98)=>{const _0xae8570=_0x3af7a7;let _0x50b898=_0xae8570(0x1ab)+(_0x3b4e98+0x1)+_0xae8570(0x109)+_0x3cf530[_0xae8570(0x1c1)]+_0xae8570(0x126)+_0x3cf530[_0xae8570(0x1a0)]+'**';if(_0x3cf530[_0xae8570(0x1de)])_0x50b898+=_0xae8570(0x1ee)+_0x3cf530[_0xae8570(0x1de)]+')';if(_0x3cf530[_0xae8570(0x1ac)+'n'])_0x50b898+=_0xae8570(0xd8)+_0x3cf530[_0xae8570(0x1ac)+'n'];if(_0x3cf530['fixedVersi'+'on'])_0x50b898+='\x0a\x20\x20\x20\x20\x20\x20-\x20F'+_0xae8570(0x1bc)+_0x3cf530[_0xae8570(0x181)+'on'];return _0x50b898;})[_0x3af7a7(0x120)]('\x0a');return _0x3af7a7(0x144)+_0x2f623a[_0x3af7a7(0x176)]+'@'+_0x2f623a[_0x3af7a7(0x136)]+'\x0a'+_0x5197cf;})[_0x3910e4(0x120)]('\x0a\x0a'),_0x39dd42=('\x0a#\x20SCA\x20Ana'+'lysis\x20Repo'+_0x3910e4(0x17f)+'etected)\x0a\x0a'+_0x3910e4(0x1ea)+_0x3910e4(0x10b)+'|\x20Value\x20|\x0a'+_0x3910e4(0x18b)+'-------|\x0a|'+_0x3910e4(0x1d8)+_0x3910e4(0x191)+_0x54ea5e[_0x3910e4(0x1ec)]+(_0x3910e4(0x166)+_0x3910e4(0x138))+_0x310def+(_0x3910e4(0x17a)+_0x3910e4(0x153))+_0x54ea5e[_0x3910e4(0x10d)][_0x3910e4(0x129)]+('\x20|\x0a|\x20Total'+_0x3910e4(0x164)+'lities\x20|\x20')+_0x54ea5e[_0x3910e4(0x1d2)+_0x3910e4(0x113)]+(_0x3910e4(0xd2)+'cal\x20|\x20')+_0x54ea5e[_0x3910e4(0x1f3)+_0x3910e4(0x183)]+(_0x3910e4(0x1cb)+'|\x20')+_0x54ea5e[_0x3910e4(0x111)]+(_0x3910e4(0x116)+_0x3910e4(0xdc))+_0x54ea5e['mediumCoun'+'t']+(_0x3910e4(0x162)+'\x20')+_0x54ea5e[_0x3910e4(0x163)]+(_0x3910e4(0x1e4)+_0x3910e4(0x130)+_0x3910e4(0x1e7))+_0x54ea5e['analysisBr'+_0x3910e4(0x1e0)]+(_0x3910e4(0xed)+_0x3910e4(0x158)+_0x3910e4(0x12d))+_0x1b65d3+(_0x3910e4(0x112)+_0x3910e4(0x18d)+_0x3910e4(0x16b))+_0x8c459e[_0x3910e4(0x1cc)](_0x2be3e1,_0x3910e4(0x148)+_0x3910e4(0x203)+_0x3910e4(0x100))+'\x0a')[_0x3910e4(0x189)](),_0x46b1f5={};_0x46b1f5[_0x3910e4(0x12b)]=_0x3910e4(0x10f),_0x46b1f5[_0x3910e4(0x10f)]=_0x39dd42;const _0x2f1cf8={};return _0x2f1cf8['content']=[_0x46b1f5],_0x2f1cf8[_0x3910e4(0x117)+_0x3910e4(0x106)]=_0x54ea5e,_0x2f1cf8;}const _0x34afc5=0x7a120,_0x1efab8=(_0x44ff61,_0x2030ec)=>{const _0x32e539=_0x3910e4;if(_0x44ff61['length']<=_0x2030ec)return _0x44ff61;return _0x44ff61[_0x32e539(0xfa)](0x0,_0x2030ec)+(_0x32e539(0x170)+_0x32e539(0x1bf)+_0x2030ec+_0x32e539(0x19b)+_0x44ff61['length']+(_0x32e539(0x195)+'s)'));},_0x1b051c=_0x4537b4[_0x3910e4(0xe2)+'ities'][_0x3910e4(0x132)]((_0x351745,_0x8cbdd8)=>{const _0x9535d2=_0x3910e4,_0x56731a=_0x351745[_0x9535d2(0xe1)+'o']?.[_0x9535d2(0x176)]||_0x351745[_0x9535d2(0x1b0)],_0x3e1922=_0x351745[_0x9535d2(0xe1)+'o']?.[_0x9535d2(0x1ac)+'n']||_0x351745['descriptio'+'n'],_0x4b8467=_0x351745[_0x9535d2(0xe1)+'o']?.[_0x9535d2(0x175)]&&_0x351745[_0x9535d2(0xe1)+'o'][_0x9535d2(0x175)]['length']>0x0?'\x0a\x20\x20\x20-\x20컴플라이'+_0x9535d2(0x152)+_0x351745[_0x9535d2(0xe1)+'o'][_0x9535d2(0x175)][_0x9535d2(0x132)](_0x59786d=>''+_0x59786d['reference'][_0x9535d2(0x176)]+(_0x59786d[_0x9535d2(0xf5)]['version']?'\x20('+_0x59786d['reference'][_0x9535d2(0x136)]+')':''))['join'](',\x20'):'';return _0x8cbdd8+0x1+_0x9535d2(0x109)+_0x351745[_0x9535d2(0x1c1)]+_0x9535d2(0x126)+_0x56731a+_0x9535d2(0xfb)+_0x351745[_0x9535d2(0x1b0)]+(_0x9535d2(0x1ae)+'\x20')+_0x3e1922+(_0x351745[_0x9535d2(0x147)]?_0x9535d2(0x141)+_0x351745[_0x9535d2(0x147)]+(_0x351745[_0x9535d2(0x103)]?':'+_0x351745[_0x9535d2(0x103)]:''):'')+_0x4b8467;})[_0x3910e4(0x120)]('\x0a\x0a'),_0x4fe3f0=(_0x3910e4(0x159)+_0x3910e4(0x1fe)+'\x20Results\x0a\x0a'+_0x3910e4(0x1c3)+_0x3910e4(0x1ba)+_0x3910e4(0x127)+'s\x20ID:\x20'+_0x4537b4[_0x3910e4(0x1ec)]+(_0x3910e4(0xf3)+'\x20')+_0x310def+(_0x3910e4(0x172)+'\x20')+(_0x4537b4[_0x3910e4(0x14f)]||_0x3910e4(0xcb))+(_0x3910e4(0x140)+'bilities\x20F'+_0x3910e4(0x1a4))+_0x4537b4[_0x3910e4(0xe2)+'ities'][_0x3910e4(0x129)]+('\x0a\x0a##\x20Analy'+_0x3910e4(0x12e)+_0x3910e4(0x13b))+_0x8c459e[_0x3910e4(0x184)](_0x1efab8,_0x4537b4[_0x3910e4(0xf2)+'ief']||'',_0x34afc5)+(_0x3910e4(0x1ca)+_0x3910e4(0x114)+_0x3910e4(0x202)+'s\x0a')+_0x1efab8(_0x1b051c,_0x34afc5)+_0x3910e4(0x1a2))[_0x3910e4(0x189)](),_0x5d92cf={'analysisId':_0x4537b4['analysisId'],'status':_0x310def,'result':_0x4537b4[_0x3910e4(0x14f)],'vulnerabilities':_0x4537b4['vulnerabil'+_0x3910e4(0x123)],'analysisBrief':_0x4537b4[_0x3910e4(0xf2)+_0x3910e4(0x1e0)]?_0x1efab8(_0x4537b4['analysisBr'+_0x3910e4(0x1e0)],_0x34afc5):''},_0x4ee509={};_0x4ee509[_0x3910e4(0x12b)]='text',_0x4ee509['text']=_0x4fe3f0;const _0x2841e9={};return _0x2841e9[_0x3910e4(0x14b)]=[_0x4ee509],_0x2841e9['structured'+'Content']=_0x5d92cf,_0x2841e9;}catch(_0x5bdbf4){logger[_0x3910e4(0x169)]('Failed\x20to\x20'+'get\x20analys'+'is\x20results'+':',_0x5bdbf4);const _0xc3a00d=_0x8c459e[_0x3910e4(0x1db)](_0x5bdbf4,Error)?_0x5bdbf4[_0x3910e4(0x1e8)]:_0x3910e4(0xdf)+_0x3910e4(0x143),_0x24ab26={};_0x24ab26[_0x3910e4(0x12b)]=_0x8c459e[_0x3910e4(0x1cf)],_0x24ab26['text']='Failed\x20to\x20'+'get\x20analys'+'is\x20results'+':\x20'+_0xc3a00d;const _0x3d5b4b={};_0x3d5b4b[_0x3910e4(0x169)]=_0xc3a00d;const _0x1d7776={};return _0x1d7776[_0x3910e4(0x14b)]=[_0x24ab26],_0x1d7776['structured'+'Content']=_0x3d5b4b,_0x1d7776[_0x3910e4(0x161)]=!![],_0x1d7776;}}async[a7_0x383507(0x1d4)+a7_0x383507(0x1e9)+'s']({analysisId:_0x2a490d}){const _0xb885a0=a7_0x383507,_0x411f84={};_0x411f84[_0xb885a0(0x1bb)]='Unknown\x20er'+'ror';const _0x227920=_0x411f84;try{logger[_0xb885a0(0x14e)]('SCA\x20analys'+_0xb885a0(0x1aa)+_0xb885a0(0x14a)+':\x20'+_0x2a490d);const _0xbc3be5=await this[_0xb885a0(0x1da)+_0xb885a0(0x12c)][_0xb885a0(0x1d4)+'ysisResult'+'s'](_0x2a490d),_0x435be8=_0xbc3be5[_0xb885a0(0x14f)]??_0xbc3be5[_0xb885a0(0x139)],_0x3a6304=_0xb885a0(0x1a1)+_0xb885a0(0xda)+_0xb885a0(0x122)+'e\x20|\x20Vulner'+_0xb885a0(0x1ce)+'(C/H/M/L/T'+_0xb885a0(0x146)+'------|---'+_0xb885a0(0xee)+_0xb885a0(0xee)+_0xb885a0(0x165)+_0xb885a0(0x165)+_0xb885a0(0x180),_0x1953e6=_0xbc3be5['components'][_0xb885a0(0x132)](_0x55bca7=>{const _0x33a9f2=_0xb885a0,_0x4cbfbd=_0x55bca7[_0x33a9f2(0xea)][_0x33a9f2(0x129)]>0x0?_0x55bca7['licenses'][_0x33a9f2(0x132)](_0x33726e=>_0x33726e[_0x33a9f2(0x176)])[_0x33a9f2(0x120)](',\x20'):_0x33a9f2(0x102),_0xbcb107=_0x55bca7[_0x33a9f2(0x1ed)][_0x33a9f2(0x12f)](_0x59da5=>_0x59da5['severity']==='CRITICAL')[_0x33a9f2(0x129)],_0x285a23=_0x55bca7['issues'][_0x33a9f2(0x12f)](_0x53e2ea=>_0x53e2ea[_0x33a9f2(0x1c1)]==='HIGH')[_0x33a9f2(0x129)],_0x504d2f=_0x55bca7[_0x33a9f2(0x1ed)][_0x33a9f2(0x12f)](_0x422c26=>_0x422c26[_0x33a9f2(0x1c1)]===_0x33a9f2(0xfe))['length'],_0x86c47f=_0x55bca7[_0x33a9f2(0x1ed)]['filter'](_0xc65e45=>_0xc65e45[_0x33a9f2(0x1c1)]===_0x33a9f2(0x178))['length'],_0x1a0bd7=_0x55bca7[_0x33a9f2(0x1ed)]['filter'](_0x467885=>_0x467885[_0x33a9f2(0x1c1)]===_0x33a9f2(0xce))[_0x33a9f2(0x129)],_0x49e5c2=_0xbcb107+_0x285a23+_0x504d2f+_0x86c47f+_0x1a0bd7+'\x20('+_0xbcb107+'/'+_0x285a23+'/'+_0x504d2f+'/'+_0x86c47f+'/'+_0x1a0bd7+')';return'|\x20'+_0x55bca7['name']+_0x33a9f2(0x134)+_0x55bca7[_0x33a9f2(0x136)]+_0x33a9f2(0x134)+_0x4cbfbd+'\x20|\x20'+_0x49e5c2+'\x20|';})[_0xb885a0(0x120)]('\x0a'),_0x128ac5=_0xbc3be5[_0xb885a0(0x10d)]['length']>0x0?_0x3a6304+'\x0a'+_0x1953e6:_0xb885a0(0xec)+_0xb885a0(0x133)+_0xb885a0(0xd1),_0x5348a4=_0xbc3be5['components'][_0xb885a0(0x12f)](_0x29b021=>_0x29b021[_0xb885a0(0x1ed)][_0xb885a0(0x129)]>0x0)[_0xb885a0(0x132)](_0x517ffa=>{const _0x47ebf4=_0xb885a0,_0x213844=_0x517ffa[_0x47ebf4(0x1ed)][_0x47ebf4(0x132)]((_0x11d19d,_0x8fcf24)=>{const _0x295140=_0x47ebf4;let _0x4fdba7=_0x295140(0x1ab)+(_0x8fcf24+0x1)+_0x295140(0x109)+_0x11d19d[_0x295140(0x1c1)]+_0x295140(0x126)+_0x11d19d[_0x295140(0x1a0)]+'**';if(_0x11d19d[_0x295140(0x1de)])_0x4fdba7+=_0x295140(0x1ee)+_0x11d19d[_0x295140(0x1de)]+')';if(_0x11d19d[_0x295140(0x1ac)+'n'])_0x4fdba7+=_0x295140(0xd8)+_0x11d19d[_0x295140(0x1ac)+'n'];if(_0x11d19d['fixedVersi'+'on'])_0x4fdba7+=_0x295140(0xf6)+'ixed\x20in:\x20'+_0x11d19d[_0x295140(0x181)+'on'];return _0x4fdba7;})['join']('\x0a');return _0x47ebf4(0x144)+_0x517ffa[_0x47ebf4(0x176)]+'@'+_0x517ffa[_0x47ebf4(0x136)]+'\x0a'+_0x213844;})[_0xb885a0(0x120)]('\x0a\x0a'),_0x145da0=_0xbc3be5[_0xb885a0(0x10d)][_0xb885a0(0x12f)](_0x25011d=>_0x25011d[_0xb885a0(0x1ed)][_0xb885a0(0x1b7)](_0x190468=>_0x190468['severity']==='CRITICAL'||_0x190468[_0xb885a0(0x1c1)]===_0xb885a0(0xcf)))[_0xb885a0(0x132)](_0x3919b6=>{const _0x37a8ae=_0xb885a0,_0x2145db=_0x3919b6[_0x37a8ae(0x1ed)][_0x37a8ae(0x11e)](_0x50f373=>_0x50f373['severity']===_0x37a8ae(0x119)||_0x50f373[_0x37a8ae(0x1c1)]==='HIGH'),_0x383bc6=_0x2145db?.['fixedVersi'+'on']||_0x37a8ae(0xf4);return _0x37a8ae(0x1fc)+_0x3919b6['name']+(_0x37a8ae(0x188)+'\x20from\x20`')+_0x3919b6[_0x37a8ae(0x136)]+'`\x20to\x20`'+_0x383bc6+'`';})['join']('\x0a'),_0x5bf36d=(_0xb885a0(0x1e1)+'lysis\x20Repo'+_0xb885a0(0x156)+_0xb885a0(0x1cd)+_0xb885a0(0x157)+'e\x20|\x0a|-----'+_0xb885a0(0x17b)+'-|\x0a|\x20Analy'+_0xb885a0(0x15e)+_0xbc3be5[_0xb885a0(0x1ec)]+(_0xb885a0(0x166)+_0xb885a0(0x138))+_0x435be8+(_0xb885a0(0x17a)+_0xb885a0(0x153))+_0xbc3be5['components'][_0xb885a0(0x129)]+(_0xb885a0(0x193)+_0xb885a0(0x164)+_0xb885a0(0xf8))+_0xbc3be5['totalVulne'+_0xb885a0(0x113)]+('\x20|\x0a|\x20Criti'+_0xb885a0(0x1a9))+_0xbc3be5[_0xb885a0(0x1f3)+_0xb885a0(0x183)]+(_0xb885a0(0x1cb)+'|\x20')+_0xbc3be5[_0xb885a0(0x111)]+(_0xb885a0(0x116)+_0xb885a0(0xdc))+_0xbc3be5[_0xb885a0(0x1b9)+'t']+(_0xb885a0(0x1c8)+'Low\x20|\x20')+_0xbc3be5[_0xb885a0(0x163)]+(_0xb885a0(0x1dc)+_0xb885a0(0x1b3))+(_0xbc3be5[_0xb885a0(0x1d9)+'nt']||0x0)+(_0xb885a0(0x1e4)+_0xb885a0(0x130)+_0xb885a0(0x1e7))+_0xbc3be5[_0xb885a0(0xf2)+_0xb885a0(0x1e0)]+(_0xb885a0(0xed)+_0xb885a0(0x158)+_0xb885a0(0x12d))+_0x128ac5+('\x0a\x0a##\x20Vulne'+_0xb885a0(0x18d)+_0xb885a0(0x16b))+(_0x5348a4||_0xb885a0(0x148)+_0xb885a0(0x203)+_0xb885a0(0x100))+('\x0a\x0a##\x20Remed'+'iation\x20Gui'+_0xb885a0(0x171))+(_0x145da0||_0xb885a0(0xe5)+'l/high\x20sev'+_0xb885a0(0x1b5)+'es\x20requiri'+_0xb885a0(0xd7)+_0xb885a0(0x13c))+_0xb885a0(0x1a2))[_0xb885a0(0x189)](),_0x456176={};_0x456176['analysisId']=_0xbc3be5[_0xb885a0(0x1ec)],_0x456176[_0xb885a0(0x139)]=_0x435be8,_0x456176[_0xb885a0(0x14f)]=_0xbc3be5[_0xb885a0(0x14f)],_0x456176[_0xb885a0(0x10d)]=_0xbc3be5['components'],_0x456176[_0xb885a0(0x1d2)+_0xb885a0(0x113)]=_0xbc3be5[_0xb885a0(0x1d2)+'rabilities'],_0x456176['criticalCo'+'unt']=_0xbc3be5['criticalCo'+'unt'],_0x456176[_0xb885a0(0x111)]=_0xbc3be5['highCount'],_0x456176[_0xb885a0(0x1b9)+'t']=_0xbc3be5[_0xb885a0(0x1b9)+'t'],_0x456176[_0xb885a0(0x163)]=_0xbc3be5['lowCount'],_0x456176[_0xb885a0(0xf2)+_0xb885a0(0x1e0)]=_0xbc3be5[_0xb885a0(0xf2)+_0xb885a0(0x1e0)];const _0x9629e4=_0x456176,_0x4a2d69={};_0x4a2d69[_0xb885a0(0x12b)]=_0xb885a0(0x10f),_0x4a2d69[_0xb885a0(0x10f)]=_0x5bf36d;const _0xfb07c1={};return _0xfb07c1[_0xb885a0(0x14b)]=[_0x4a2d69],_0xfb07c1[_0xb885a0(0x117)+_0xb885a0(0x106)]=_0x9629e4,_0xfb07c1;}catch(_0x5e9ea0){logger[_0xb885a0(0x169)](_0xb885a0(0xfc)+'get\x20SCA\x20an'+_0xb885a0(0x149)+_0xb885a0(0x19e),_0x5e9ea0);const _0x135f8a=_0x5e9ea0 instanceof Error?_0x5e9ea0['message']:_0x227920[_0xb885a0(0x1bb)],_0x5cb54a={};_0x5cb54a['type']=_0xb885a0(0x10f),_0x5cb54a[_0xb885a0(0x10f)]='Failed\x20to\x20'+_0xb885a0(0x15d)+_0xb885a0(0x149)+_0xb885a0(0x110)+_0x135f8a;const _0x390bed={};_0x390bed[_0xb885a0(0x169)]=_0x135f8a;const _0x5a3708={};return _0x5a3708['content']=[_0x5cb54a],_0x5a3708[_0xb885a0(0x117)+_0xb885a0(0x106)]=_0x390bed,_0x5a3708[_0xb885a0(0x161)]=!![],_0x5a3708;}}async[a7_0x383507(0x18f)+a7_0x383507(0x16a)+'s']({analysisId:_0x52b8a1,intervalMs:intervalMs=0xbb8,maxWaitMs:maxWaitMs=0x7530},_0x223535){const _0x26f092=a7_0x383507,_0xddf1d3={};_0xddf1d3['bJLbV']=function(_0x5b3a28,_0x1f29ce){return _0x5b3a28 instanceof _0x1f29ce;},_0xddf1d3['qFEzJ']=_0x26f092(0x185),_0xddf1d3['GkdZJ']=_0x26f092(0x14d)+_0x26f092(0x1d8)+'completed.',_0xddf1d3['mEjFZ']=function(_0x4e7384,_0x5dccc0){return _0x4e7384===_0x5dccc0;},_0xddf1d3[_0x26f092(0x19d)]=_0x26f092(0x16c),_0xddf1d3[_0x26f092(0x1f1)]=function(_0x203809,_0x12f83a){return _0x203809!==_0x12f83a;},_0xddf1d3['VAatK']=_0x26f092(0x10f),_0xddf1d3[_0x26f092(0x15f)]=_0x26f092(0x1f9)+_0x26f092(0x15c)+_0x26f092(0x1bd)+_0x26f092(0x201);const _0x128e85=_0xddf1d3;try{const _0x424fb7=_0x223535[_0x26f092(0x1f4)]?.[_0x26f092(0x13e)+_0x26f092(0x15a)];if(!_0x424fb7){const _0x377a11={};_0x377a11[_0x26f092(0x12b)]=_0x26f092(0x10f),_0x377a11[_0x26f092(0x10f)]=_0x26f092(0x10e)+_0x26f092(0x115)+_0x26f092(0xe6)+'he\x20client\x20'+_0x26f092(0xeb)+'rt\x20progres'+'s\x20tracking'+'.';const _0x257dee={};_0x257dee[_0x26f092(0x169)]=_0x26f092(0x10e)+_0x26f092(0x115)+'rovided';const _0x435e60={};return _0x435e60[_0x26f092(0x14b)]=[_0x377a11],_0x435e60[_0x26f092(0x117)+_0x26f092(0x106)]=_0x257dee,_0x435e60;}logger[_0x26f092(0x14e)]('Analysis\x20p'+_0x26f092(0x15c)+'acking\x20sta'+'rted:\x20'+_0x52b8a1);const _0x112718=ANALYSIS_STAGES;let _0x30856d=Object[_0x26f092(0x11c)](_0x112718)[_0x26f092(0x129)],_0x3fe983=null,_0x1b3127=0x0,_0x209ed6=!![];const _0x4446b5=Date[_0x26f092(0xff)](),_0x69c5a2=async _0x47fe41=>{const _0x4bc4cb=_0x26f092;if(!_0x209ed6)return![];try{return await _0x223535[_0x4bc4cb(0x11a)+_0x4bc4cb(0xf0)](_0x47fe41),!![];}catch(_0x2604d9){const _0x5692bf=_0x128e85[_0x4bc4cb(0x11b)](_0x2604d9,Error)?_0x2604d9['message']:_0x4bc4cb(0xdf)+_0x4bc4cb(0x143);return _0x5692bf[_0x4bc4cb(0x199)](_0x4bc4cb(0x137)+_0x4bc4cb(0x15a))||_0x5692bf[_0x4bc4cb(0x199)](_0x4bc4cb(0x177)+_0x4bc4cb(0x15a))||_0x5692bf['includes'](_0x4bc4cb(0x190)+_0x4bc4cb(0x15a))||_0x5692bf[_0x4bc4cb(0x1af)+'e']()[_0x4bc4cb(0x199)](_0x4bc4cb(0x105))?(_0x209ed6=![],logger[_0x4bc4cb(0x1b4)](_0x4bc4cb(0x125)+_0x4bc4cb(0x1d6)+'\x20longer\x20va'+_0x4bc4cb(0x1a6)+_0x4bc4cb(0x18a)+_0x4bc4cb(0x198)+_0x4bc4cb(0x1dd)+_0x5692bf)):logger[_0x4bc4cb(0x1b4)](_0x4bc4cb(0x11d)+_0x4bc4cb(0xcd)+'n\x20failed\x20('+_0x4bc4cb(0x154)+_0x4bc4cb(0x1b1)+_0x5692bf),![];}};while(!![]){try{const _0x23259b=await this[_0x26f092(0x1da)+_0x26f092(0x12c)][_0x26f092(0x13f)+_0x26f092(0xf9)](_0x52b8a1),_0x48f98c=String(_0x23259b[_0x26f092(0x139)])['toUpperCas'+'e'](),_0x1cb108=String(_0x23259b['status'])['toUpperCas'+'e'](),_0xab68a7=_0x1cb108==='COMPLETE'&&_0x23259b[_0x26f092(0x14f)]?String(_0x23259b['result'])[_0x26f092(0x16f)+'e']():_0x48f98c;if(_0x3fe983!==_0x48f98c){_0x3fe983=_0x48f98c;if(_0x1cb108===_0x26f092(0x16c)||_0x48f98c===_0x26f092(0x1e6)||_0x48f98c===_0x128e85['qFEzJ']){let _0x438f6e,_0x18db55;if(_0x1cb108==='COMPLETE'){const _0x115382=_0x23259b['result']?String(_0x23259b[_0x26f092(0x14f)])['toUpperCas'+'e']():undefined;_0x18db55=_0x115382||_0x26f092(0x16c);if(_0x115382==='SUCCESS')_0x438f6e=_0x26f092(0x160)+_0x26f092(0xe4)+'ompleted\x20s'+_0x26f092(0x196)+'y.';else{if(_0x115382===_0x26f092(0x1e6))_0x438f6e=_0x26f092(0x1a5)+_0x26f092(0x18e)+_0x26f092(0x187)+_0x26f092(0xf1)+_0x26f092(0xd6);else _0x115382===_0x26f092(0x1a7)?_0x438f6e=_0x26f092(0x1ad)+'lysis\x20was\x20'+_0x26f092(0x128)+_0x26f092(0xe7):(_0x438f6e=_0x128e85[_0x26f092(0x142)],_0x18db55=_0x26f092(0x16c));}}else _0x438f6e='['+_0x48f98c+(_0x26f092(0x121)+_0x26f092(0x1b6)),_0x18db55=_0x48f98c;const _0x59401a={'method':_0x26f092(0xd5)+_0x26f092(0x12a)+'ss','params':{'progressToken':_0x128e85[_0x26f092(0x1a8)](typeof _0x424fb7,_0x26f092(0x151))?_0x424fb7:String(_0x424fb7),'progress':_0x48f98c===_0x26f092(0x16c)?0x64:0x0,'message':_0x438f6e,'total':0x64}};await _0x69c5a2(_0x59401a);_0x1cb108===_0x128e85['NFkOV']?logger[_0x26f092(0x14e)](_0x26f092(0xe3)+_0x26f092(0x182)+_0x26f092(0x194)+'\x20'+_0x18db55):logger[_0x26f092(0x14e)]('Analysis\x20f'+'ailed\x20with'+_0x26f092(0x1be)+_0x18db55);const _0x537886={};_0x537886[_0x26f092(0x12b)]=_0x26f092(0x10f),_0x537886[_0x26f092(0x10f)]='Analysis\x20c'+'ompleted.\x0a'+_0x26f092(0x1f8)+_0x26f092(0x1ff)+_0x52b8a1+(_0x26f092(0x1d5)+_0x26f092(0x1c2))+_0x18db55;const _0x2f595b={};_0x2f595b[_0x26f092(0x1ec)]=_0x52b8a1,_0x2f595b['status']=_0x18db55,_0x2f595b[_0x26f092(0x14f)]=_0x23259b[_0x26f092(0x14f)],_0x2f595b[_0x26f092(0xdb)]=!![];const _0x1366f1={};return _0x1366f1[_0x26f092(0x14b)]=[_0x537886],_0x1366f1[_0x26f092(0x117)+_0x26f092(0x106)]=_0x2f595b,_0x1366f1;}const _0x24fcdb=_0x112718[_0x48f98c];if(_0x24fcdb){const _0x343e83={};_0x343e83[_0x26f092(0x17c)]=0x64;const _0x407f6d={'method':_0x26f092(0xd5)+_0x26f092(0x12a)+'ss','params':{'progressToken':typeof _0x424fb7==='string'?_0x424fb7:String(_0x424fb7),'progress':_0x24fcdb[_0x26f092(0xdd)]!==null?_0x24fcdb[_0x26f092(0xdd)]:_0x48f98c===_0x26f092(0x16d)?_0x1b3127:_0x24fcdb[_0x26f092(0x155)],'message':'['+_0x24fcdb['id']+']\x20'+_0x24fcdb[_0x26f092(0x1ac)+'n'],'total':_0x30856d,..._0x24fcdb[_0x26f092(0xdd)]!==null&&_0x48f98c===_0x26f092(0x16d)&&_0x343e83}};await _0x69c5a2(_0x407f6d),_0x209ed6&&logger[_0x26f092(0x14e)]('Analysis\x20s'+_0x26f092(0x1df)+_0x26f092(0x1fa)+_0x24fcdb['id']+'\x20('+_0x24fcdb[_0x26f092(0x176)]+')');}else{const _0x38876e={'method':_0x26f092(0xd5)+_0x26f092(0x12a)+'ss','params':{'progressToken':typeof _0x424fb7===_0x26f092(0x151)?_0x424fb7:String(_0x424fb7),'progress':0x1,'total':0x1,'message':'['+_0x48f98c+(_0x26f092(0x121)+_0x26f092(0x1d7)+'ss...')}};await _0x69c5a2(_0x38876e);}}else{if(_0x48f98c===_0x26f092(0x16d)){if(_0x128e85['FKBoz'](_0x23259b[_0x26f092(0xdd)],undefined)&&_0x23259b[_0x26f092(0xdd)]!==null){_0x1b3127=_0x23259b[_0x26f092(0xdd)];const _0x121fdb=_0x112718[_0x48f98c],_0x378b34={'method':_0x26f092(0xd5)+'ons/progre'+'ss','params':{'progressToken':typeof _0x424fb7===_0x26f092(0x151)?_0x424fb7:String(_0x424fb7),'progress':_0x121fdb[_0x26f092(0x155)],'total':_0x30856d,'message':_0x26f092(0xe0)+_0x26f092(0x1d8)+_0x26f092(0x167)+_0x26f092(0x1f2)+_0x1b3127+'%'}};await _0x69c5a2(_0x378b34);}}}!_0x209ed6&&logger[_0x26f092(0x14e)](_0x26f092(0x125)+'oken\x20is\x20in'+_0x26f092(0x1eb)+_0x26f092(0x200)+_0x26f092(0x1c5)+_0x26f092(0x107)+_0x26f092(0xd5)+_0x26f092(0x1fd));await new Promise(_0x166c5a=>setTimeout(_0x166c5a,intervalMs));const _0x4976bd=Date[_0x26f092(0xff)]()-_0x4446b5;if(_0x4976bd>=maxWaitMs){logger['info'](_0x26f092(0x1f9)+'rogress\x20tr'+'acking\x20rea'+_0x26f092(0x10c)+_0x26f092(0x118)+maxWaitMs+_0x26f092(0x1a3)+_0x52b8a1);const _0x3d6a6c={'method':_0x26f092(0xd5)+_0x26f092(0x12a)+'ss','params':{'progressToken':typeof _0x424fb7===_0x26f092(0x151)?_0x424fb7:String(_0x424fb7),'progress':_0x1b3127||0x1,'total':0x64,'message':'['+(_0x3fe983||_0x26f092(0x16e)+'S')+(_0x26f092(0xe9)+_0x26f092(0x173)+_0x26f092(0x10a))+Math[_0x26f092(0x14c)](_0x4976bd/0x3e8)+(_0x26f092(0x1f0)+'s\x20is\x20still'+_0x26f092(0x1d7)+_0x26f092(0xde))}};return await _0x69c5a2(_0x3d6a6c),{'content':[{'type':_0x128e85['VAatK'],'text':'Analysis\x20i'+'s\x20still\x20in'+'\x20progress\x20'+_0x26f092(0x13d)+_0x3fe983+(_0x26f092(0xd9)+_0x26f092(0x11f)+_0x26f092(0xcc))+Math[_0x26f092(0x14c)](_0x4976bd/0x3e8)+(_0x26f092(0x1fb)+_0x26f092(0x17d)+_0x26f092(0x101)+_0x26f092(0x1d3)+_0x26f092(0x18c)+_0x26f092(0x1f7)+_0x26f092(0xe8)+_0x26f092(0xd4))}],'structuredContent':{'analysisId':_0x52b8a1,'status':_0x3fe983,'completed':![],'elapsedMs':_0x4976bd}};}}catch(_0x5f013a){logger['error']('Error\x20chec'+_0x26f092(0x19c)+_0x26f092(0x179)+'\x20('+_0x52b8a1+'):',_0x5f013a),await new Promise(_0x567409=>setTimeout(_0x567409,intervalMs));}}}catch(_0x14d652){logger[_0x26f092(0x169)](_0x128e85[_0x26f092(0x15f)],_0x14d652);const _0x331607={};return _0x331607[_0x26f092(0x12b)]=_0x26f092(0x10f),_0x331607[_0x26f092(0x10f)]='Analysis\x20p'+_0x26f092(0x15c)+_0x26f092(0x1bd)+_0x26f092(0xfd)+(_0x14d652 instanceof Error?_0x14d652[_0x26f092(0x1e8)]:_0x26f092(0xdf)+_0x26f092(0x143)),{'content':[_0x331607],'structuredContent':{'error':_0x128e85[_0x26f092(0x11b)](_0x14d652,Error)?_0x14d652[_0x26f092(0x1e8)]:'Unknown\x20er'+_0x26f092(0x143)},'isError':!![]};}}}function a7_0x24ff(){const _0x139480=['lete\x20prope','analysisBr','\x0a-\x20Status:','latest','reference','\x0a\x20\x20\x20\x20\x20\x20-\x20F','SCA','lities\x20|\x20','sStatus','substring','**\x20(','Failed\x20to\x20','led:\x20','MEDIUM','now','ound.','_analysis_','Unknown','lineNumber','toolType','token','Content','s\x20without\x20','490030tEHGVG','.\x20[','ter\x20','\x0a|\x20Metric\x20','ched\x20maxWa','components','Progress\x20T','text','ults:\x20','highCount','\x0a\x0a##\x20Vulne','rabilities','vered\x20Vuln','oken\x20not\x20p','\x20|\x0a|\x20Mediu','structured','itMs\x20(','CRITICAL','sendNotifi','bJLbV','keys','Progress\x20n','find','g\x20paused\x20a','join',']\x20Analysis','n\x20|\x20Licens','ities','36NDndMx','Progress\x20t',']\x20**','\x0a-\x20Analysi','stopped\x20by','length','ons/progre','type','rvice','ls\x0a','sis\x20Briefi','filter','lysis\x20Brie','Analysis\x20r','map','nts\x20identi','\x20|\x20','Analysis\x20S','version','unknown\x20to','s\x20|\x20','status','k\x20failed:','ng\x0a','te\x20action.','(Status:\x20','progressTo','getAnalysi','\x0a-\x20Vulnera','\x0a\x20\x20\x20-\x20파일:\x20','GkdZJ','ror','###\x20','get\x20analys',')\x20|\x0a|-----','filePath','No\x20vulnera','alysis\x20res','\x20requested','content','round','[COMPLETE]','info','result','EamsT','string','언스:\x20','nents\x20|\x20','will\x20retry','order','rt\x0a\x0a##\x20Sum','ric\x20|\x20Valu','nent\x20Detai','\x0a#\x20Securit','ken','apply','rogress\x20tr','get\x20SCA\x20an','sis\x20ID\x20|\x20','NuVeq','[SUCCESS]\x20','isError','\x20|\x0a|\x20Low\x20|','lowCount','\x20Vulnerabi','----------','\x20|\x0a|\x20Statu','in\x20progres','|\x0a|-------','error','sisProgres','etails\x0a','COMPLETE','ANALYSIS','IN_PROGRES','toUpperCas','\x0a\x0a...\x20(Sho','de\x0a','\x0a-\x20Result:','\x20paused\x20af','ested:\x20','compliance','name','invalid\x20to','LOW','sis\x20status','\x20|\x0a|\x20Compo','---|------','total','call\x20track','(C/H/M/L)\x20','rt\x20(Auto-D','------|','fixedVersi','ysis\x20statu','unt','ZjrXy','FAILED','tatus\x20chec','ed\x20to\x20comp','**:\x20Update','trim','ing\x20progre','|--------|','gain\x20to\x20co','rability\x20D','lysis\x20fail','trackAnaly','expired\x20to','ID\x20|\x20','98666WOhlmW','\x20|\x0a|\x20Total','s\x20updated:','\x20character','uccessfull','tatus:\x20','ss\x20notific','includes','Zwrnw','\x20of\x20','king\x20analy','NFkOV','ults:','search','cveId','|\x20Componen','\x0a\x20\x20\x20\x20\x20\x20','ms):\x20','ound:\x20','[FAIL]\x20Ana','lid,\x20stopp','STOP','mEjFZ','cal\x20|\x20','is\x20results','\x20\x20\x20','descriptio','[STOP]\x20Ana',')\x0a\x20\x20\x20-\x20설명:','toLowerCas','checkerKey','):\x20','%\x0aMessage:','Trivial\x20|\x20','warn','erity\x20issu','\x20failed.','some','sResults','mediumCoun','s\x20Overview','gspdc','ixed\x20in:\x20','acking\x20fai','\x20status:\x20','wing\x20','Analysis\x20s','severity','tus:\x20','##\x20Analysi','--|','atus\x20check','7475508mvQxEz','\x0aProgress:','\x20|\x0a265:\x20|\x20','1734OFvfYK','\x0a\x0a##\x20Disco','\x20|\x0a|\x20High\x20','WKXmT','mary\x0a|\x20Met','abilities\x20','UQfFG','10754674UoPSRp','is\x20status:','totalVulne','progress\x20a','getScaAnal','\x0aFinal\x20Sta','oken\x20is\x20no','\x20in\x20progre','\x20Analysis\x20','trivialCou','analysisSe','gbcqB','\x20|\x0a266:\x20|\x20','ations:\x20','cvssScore','tatus\x20upda','ief','\x0a#\x20SCA\x20Ana','3801696TOeKXl','constructo','\x20|\x0a\x0a##\x20Ana','9vWaHXb','FAIL','fing\x0a','message','ysisResult','##\x20Summary','valid,\x20con','analysisId','issues','\x20(CVSS:\x20','8975LhgUTT','s.\x20Analysi','FKBoz','s:\x20','criticalCo','_meta','----|-----','(((.+)+)+)','ntinue\x20mon','Analysis\x20I','Analysis\x20p','ted:\x20','s.\x0aPlease\x20','-\x20**','ons','y\x20Analysis','D:\x20','tinuing\x20st','led:','erabilitie','bilities\x20f','N/A','fter\x20','otificatio','TRIVIAL','HIGH','926565mYLaYd','fied.','\x20|\x0a|\x20Criti','esults\x20req','\x20needed.','notificati','rly.','ng\x20immedia','\x0a\x20\x20\x20\x20\x20\x20-\x20',').\x0aTrackin','t\x20|\x20Versio','completed','m\x20|\x20','progress','ss.','Unknown\x20er','[ANALYSIS]','checkerInf','vulnerabil','Final\x20anal','Analysis\x20c','No\x20critica','rovided.\x20T','\x20request.','itoring\x20if',']\x20Tracking','licenses','must\x20suppo','No\x20compone','\x0a\x0a##\x20Compo','------|---','toString','cation'];a7_0x24ff=function(){return _0x139480;};return a7_0x24ff();}
|
|
1
|
+
const a7_0x2e29df=a7_0x1434;(function(_0x5e88df,_0x54624f){const _0x4d3bce=a7_0x1434,_0x5b1327=_0x5e88df();while(!![]){try{const _0x5a4eed=parseInt(_0x4d3bce(0x2ba))/0x1+-parseInt(_0x4d3bce(0x261))/0x2+-parseInt(_0x4d3bce(0x1e6))/0x3*(parseInt(_0x4d3bce(0x211))/0x4)+-parseInt(_0x4d3bce(0x1ee))/0x5*(parseInt(_0x4d3bce(0x201))/0x6)+-parseInt(_0x4d3bce(0x21d))/0x7+-parseInt(_0x4d3bce(0x2d4))/0x8*(-parseInt(_0x4d3bce(0x23e))/0x9)+-parseInt(_0x4d3bce(0x253))/0xa*(-parseInt(_0x4d3bce(0x2c5))/0xb);if(_0x5a4eed===_0x54624f)break;else _0x5b1327['push'](_0x5b1327['shift']());}catch(_0xebbea7){_0x5b1327['push'](_0x5b1327['shift']());}}}(a7_0x54c0,0xb9dda));const a7_0x42397f=(function(){let _0x3a1cc0=!![];return function(_0x259717,_0x5c1a68){const _0x49adbe=_0x3a1cc0?function(){const _0x31d3a7=a7_0x1434;if(_0x5c1a68){const _0x421e5c=_0x5c1a68[_0x31d3a7(0x27c)](_0x259717,arguments);return _0x5c1a68=null,_0x421e5c;}}:function(){};return _0x3a1cc0=![],_0x49adbe;};}()),a7_0x13470b=a7_0x42397f(this,function(){const _0x282fce=a7_0x1434,_0x597579={};_0x597579[_0x282fce(0x206)]=_0x282fce(0x23b)+'+$';const _0x3f1b3a=_0x597579;return a7_0x13470b[_0x282fce(0x20b)]()[_0x282fce(0x295)](_0x3f1b3a['FXjoy'])['toString']()[_0x282fce(0x278)+'r'](a7_0x13470b)[_0x282fce(0x295)](_0x282fce(0x23b)+'+$');});a7_0x13470b();import{logger}from'../utils/logger.js';function a7_0x1434(_0x26e814,_0x36f15b){_0x26e814=_0x26e814-0x1b5;const _0x3cb636=a7_0x54c0();let _0x13470b=_0x3cb636[_0x26e814];return _0x13470b;}function a7_0x54c0(){const _0x5eb8a1=['n\x20|\x20Licens','\x20|\x0a|\x20High\x20','bilities\x20f','completed','otificatio','ched\x20maxWa','\x20character','<br>','Jjqzl','ANALYSIS','is\x20status:','MEDIUM','ons/progre','join','fied.','ror','ability\x20|\x20','Analysis\x20i','Analysis\x20s','ations:\x20','rvice','toUpperCas','unt','must\x20suppo','analysisId','---|------','in\x20progres','s\x20updated:','get\x20analys','Descriptio','e\x20|\x0a|-----','abilities\x20','uccessfull','notificati','727493QBexZh','map','N/A','structured','[FAIL]\x20Ana','...','\x0a\x20\x20\x20-\x20컴플라이','mary\x0a|\x20Met','sis\x20Briefi','CGXuU','tatus\x20upda','11xsCiwU','\x20|\x0a265:\x20|\x20','\x0a-\x20Status:','\x20|\x0a|\x20Statu','CRITICAL','ss...','|\x20Componen','Failed\x20to\x20','remediatio','ound:\x20',')\x0a\x20\x20\x20-\x20설명:','ls\x0a','Anjpf','------|','Progress\x20t','240DMZqoG','lysis\x20fail','s.\x20Analysi','mediumCoun','nRecommend','_analysis_','s.\x0aPlease\x20','cal\x20|\x20','bilities\x20F','ediations','completed.','ief','checkerKey','name','------|---','\x0a-\x20Vulnera','\x20in\x20progre','\x20Analysis\x20','sis\x20status','lysis\x20was\x20','oYeaR','trim','progressTo','sisProgres','\x20|\x0a\x0a##\x20Ana','content','reference','\x0a\x0a...\x20(Sho','rovided.\x20T','[STOP]\x20Ana','ed\x20to\x20comp','is\x20results','\x20|\x0a|\x20Mediu','Error\x20chec','round','\x20failed.','\x20Results\x0a\x0a','rabilities','lysis\x20Brie','kQRME','Content','lineNumber','Analysis\x20p','Progress\x20n','t\x20|\x20Versio','alysis\x20res','\x20|\x0a266:\x20|\x20','ysis\x20statu','criticalCo','sStatus','bMsSA','getScaAnal','FlsMK','invalid\x20to','24UtyKcI','text','\x20longer\x20va','ric\x20|\x20Valu','ompleted\x20s','he\x20client\x20','sResults','descriptio','20INSmBk','rogress\x20tr','type','.\x20[','stopped\x20by','unknown\x20to','FAILED','flatMap','[COMPLETE]','components','[SUCCESS]\x20','ation','issues','%\x0aMessage:','filter','--------|','Ihcaa','ults:\x20','\x0a\x0a##\x20Detai','1195164mPsVWC','IN_PROGRES','언스:\x20','Update\x20to\x20','\x0a\x0a##\x20Analy','FXjoy','oken\x20not\x20p','ted:\x20','led\x20Issue\x20','s\x20is\x20still','toString','includes','get\x20SCA\x20an','List\x0a','ng\x0a','\x20of\x20','289580ZMqKTm','SCA\x20analys','analysisBr','status','acking\x20fai','-------|--','##\x20Analysi','vered\x20Vuln','\x20|\x0a|\x20Compo','\x20paused\x20af','ound.','fing\x0a','8854979DyTCyQ',')\x20|\x0a|-----','sendNotifi','now','LVRMd','itMs\x20(','ysisResult','cation','cvssScore','LOW','progress','valid,\x20con','version','versionRem','uested:\x20','UPQLI','Low\x20|\x20','\x0a\x20\x20\x20-\x20파일:\x20',']\x20Analysis','\x0a-\x20Result:','k\x20failed:','getAnalysi','\x20|\x0a|\x20Total','wing\x20','ken','tatus\x20requ','n\x20|\x20Vulner','\x20|\x20','fZweO','No\x20vulnera','(((.+)+)+)','message','lid,\x20stopp','397044KZpSom','ities','order',').\x0aTrackin','sOeJB','ons','\x20progress\x20','(Status:\x20','isError','vulnerabil','checkerInf','Unknown\x20er','Unknown','[ANALYSIS]','info','rted:\x20','FAIL','mnqIt','tatus:\x20','Analysis\x20c','trackAnaly','25705700hRxgUP','versions','SCA','ntinue\x20mon','COMPLETE','ss.','ing\x20progre','acking\x20rea',']\x20Tracking','rt\x0a\x0a##\x20Sum','AXDfv','s\x20still\x20in','lysis\x20Repo','trivialCou','2438608sBuUXU','\x0a-\x20Analysi','lowCount','gain\x20to\x20co','Trivial\x20|\x20','(C/H/M/L/T','ter\x20','m\x20|\x20','\x0a#\x20Securit','substring','atus\x20check','esults\x20req','SUCCESS','replace','error','\x0a\x20\x20\x20\x20\x20\x20','compliance','result','Analysis\x20r','length','ailed\x20with','HIGH','licenses','constructo','fixedVersi','):\x20','EqRHZ','apply','EvcYc','severity','string','Progress\x20T','keys','nts\x20identi','analysisSe','D:\x20','ompleted.\x0a','led:','fter\x20','highCount','cveId','No\x20compone','Final\x20anal','----------','itoring\x20if','totalVulne','\x0a#\x20SCA\x20Ana','ested:\x20','\x0aFinal\x20Sta','tatus\x20chec','oken\x20is\x20in','\x20needed.','search','onhuW','s\x20|\x20'];a7_0x54c0=function(){return _0x5eb8a1;};return a7_0x54c0();}import{ANALYSIS_STAGES}from'../config/constants.js';export class AnalysisController{[a7_0x2e29df(0x283)+a7_0x2e29df(0x2ac)];constructor(_0x91f65a){this['analysisSe'+'rvice']=_0x91f65a;}async[a7_0x2e29df(0x232)+a7_0x2e29df(0x1e1)]({analysisId:_0x3aaae8}){const _0x4fc293=a7_0x2e29df,_0x2e21d8={};_0x2e21d8[_0x4fc293(0x24f)]=_0x4fc293(0x257),_0x2e21d8[_0x4fc293(0x25d)]=_0x4fc293(0x1e7);const _0x98377e=_0x2e21d8;try{logger[_0x4fc293(0x24c)]('Analysis\x20s'+_0x4fc293(0x236)+_0x4fc293(0x290)+_0x3aaae8);const _0x2011c9=await this['analysisSe'+_0x4fc293(0x2ac)][_0x4fc293(0x232)+_0x4fc293(0x1e1)](_0x3aaae8),_0xa13a8d=_0x2011c9[_0x4fc293(0x214)]===_0x98377e['mnqIt']&&_0x2011c9[_0x4fc293(0x272)]?_0x2011c9[_0x4fc293(0x272)]:_0x2011c9['status'],_0x5ba476={};_0x5ba476[_0x4fc293(0x1f0)]='text',_0x5ba476['text']='Analysis\x20S'+_0x4fc293(0x250)+_0xa13a8d+('\x0aProgress:'+'\x20')+(_0x2011c9[_0x4fc293(0x227)]||0x0)+(_0x4fc293(0x1fb)+'\x20')+(_0x2011c9[_0x4fc293(0x23c)]||'N/A');const _0x3fdab0={};_0x3fdab0[_0x4fc293(0x2b0)]=_0x3aaae8,_0x3fdab0[_0x4fc293(0x214)]=_0xa13a8d,_0x3fdab0[_0x4fc293(0x272)]=_0x2011c9['result'],_0x3fdab0[_0x4fc293(0x227)]=_0x2011c9[_0x4fc293(0x227)],_0x3fdab0[_0x4fc293(0x23c)]=_0x2011c9[_0x4fc293(0x23c)];const _0x2d4f19={};return _0x2d4f19['content']=[_0x5ba476],_0x2d4f19['structured'+'Content']=_0x3fdab0,_0x2d4f19;}catch(_0x582dfa){logger[_0x4fc293(0x26f)](_0x4fc293(0x2aa)+_0x4fc293(0x292)+_0x4fc293(0x231),_0x582dfa);const _0x51ae9c={};_0x51ae9c['type']=_0x98377e[_0x4fc293(0x25d)],_0x51ae9c[_0x4fc293(0x1e7)]=_0x4fc293(0x2cc)+_0x4fc293(0x2b4)+_0x4fc293(0x2a2)+'\x20'+(_0x582dfa instanceof Error?_0x582dfa['message']:_0x4fc293(0x249)+'ror');const _0x161b97={};_0x161b97['error']=_0x582dfa instanceof Error?_0x582dfa['message']:_0x4fc293(0x249)+'ror';const _0x39fe75={};return _0x39fe75[_0x4fc293(0x1c9)]=[_0x51ae9c],_0x39fe75[_0x4fc293(0x2bd)+_0x4fc293(0x1d8)]=_0x161b97,_0x39fe75;}}async['getAnalysi'+'sResults']({analysisId:_0x1fa84c}){const _0x5d5177=a7_0x2e29df,_0x5e1f1a={};_0x5e1f1a[_0x5d5177(0x22c)]=_0x5d5177(0x1e7);const _0x309765=_0x5e1f1a;try{logger['info'](_0x5d5177(0x273)+_0x5d5177(0x26c)+_0x5d5177(0x22b)+_0x1fa84c);const _0x97dc41=await this['analysisSe'+_0x5d5177(0x2ac)]['getAnalysi'+_0x5d5177(0x1ec)](_0x1fa84c),_0x40e6e9=_0x97dc41[_0x5d5177(0x272)]??_0x97dc41[_0x5d5177(0x214)];if(_0x97dc41['toolType']===_0x5d5177(0x255)){const _0x44146a={};return _0x44146a[_0x5d5177(0x2b0)]=_0x1fa84c,this['getScaAnal'+'ysisResult'+'s'](_0x44146a);}const _0x4a9297=0x7a120,_0x4f1a4e=(_0x44b856,_0x58352c)=>{const _0x4d5601=_0x5d5177;if(_0x44b856[_0x4d5601(0x274)]<=_0x58352c)return _0x44b856;return _0x44b856[_0x4d5601(0x26a)](0x0,_0x58352c)+(_0x4d5601(0x1cb)+_0x4d5601(0x234)+_0x58352c+_0x4d5601(0x210)+_0x44b856[_0x4d5601(0x274)]+(_0x4d5601(0x29e)+'s)'));},_0x345693=_0x97dc41[_0x5d5177(0x247)+_0x5d5177(0x23f)][_0x5d5177(0x2bb)]((_0x5b4d14,_0x4bf5b3)=>{const _0x4ce0c6=_0x5d5177,_0x2a9189=_0x5b4d14['checkerInf'+'o']?.[_0x4ce0c6(0x1bd)]||_0x5b4d14[_0x4ce0c6(0x1bc)],_0x102a15=_0x5b4d14['checkerInf'+'o']?.[_0x4ce0c6(0x1ed)+'n']||_0x5b4d14[_0x4ce0c6(0x1ed)+'n'],_0x10faa5=_0x5b4d14[_0x4ce0c6(0x248)+'o']?.[_0x4ce0c6(0x271)]&&_0x5b4d14[_0x4ce0c6(0x248)+'o']['compliance'][_0x4ce0c6(0x274)]>0x0?_0x4ce0c6(0x2c0)+_0x4ce0c6(0x203)+_0x5b4d14['checkerInf'+'o']['compliance'][_0x4ce0c6(0x2bb)](_0x47e3bb=>''+_0x47e3bb[_0x4ce0c6(0x1ca)]['name']+(_0x47e3bb['reference']['version']?'\x20('+_0x47e3bb[_0x4ce0c6(0x1ca)][_0x4ce0c6(0x229)]+')':''))['join'](',\x20'):'';return _0x4bf5b3+0x1+_0x4ce0c6(0x1f1)+_0x5b4d14[_0x4ce0c6(0x27e)]+']\x20**'+_0x2a9189+'**\x20('+_0x5b4d14[_0x4ce0c6(0x1bc)]+(_0x4ce0c6(0x2cf)+'\x20')+_0x102a15+(_0x5b4d14['filePath']?_0x4ce0c6(0x22e)+_0x5b4d14['filePath']+(_0x5b4d14[_0x4ce0c6(0x1d9)]?':'+_0x5b4d14[_0x4ce0c6(0x1d9)]:''):'')+_0x10faa5;})[_0x5d5177(0x2a5)]('\x0a\x0a'),_0x11f8ec=(_0x5d5177(0x269)+'y\x20Analysis'+_0x5d5177(0x1d4)+_0x5d5177(0x217)+'s\x20Overview'+_0x5d5177(0x262)+'s\x20ID:\x20'+_0x97dc41[_0x5d5177(0x2b0)]+(_0x5d5177(0x2c7)+'\x20')+_0x40e6e9+(_0x5d5177(0x230)+'\x20')+(_0x97dc41['result']||_0x5d5177(0x2bc))+(_0x5d5177(0x1bf)+_0x5d5177(0x1b8)+_0x5d5177(0x2ce))+_0x97dc41[_0x5d5177(0x247)+_0x5d5177(0x23f)][_0x5d5177(0x274)]+(_0x5d5177(0x205)+_0x5d5177(0x2c2)+_0x5d5177(0x20f))+_0x4f1a4e(_0x97dc41[_0x5d5177(0x213)+_0x5d5177(0x1bb)]||'',_0x4a9297)+('\x0a\x0a##\x20Disco'+_0x5d5177(0x218)+'erabilitie'+'s\x0a')+_0x4f1a4e(_0x345693,_0x4a9297)+'\x0a\x20\x20\x20\x20\x20\x20')[_0x5d5177(0x1c5)](),_0x26ade4={'analysisId':_0x97dc41[_0x5d5177(0x2b0)],'status':_0x40e6e9,'result':_0x97dc41['result'],'vulnerabilities':_0x97dc41['vulnerabil'+'ities'],'analysisBrief':_0x97dc41[_0x5d5177(0x213)+_0x5d5177(0x1bb)]?_0x4f1a4e(_0x97dc41[_0x5d5177(0x213)+_0x5d5177(0x1bb)],_0x4a9297):''},_0x123325={};_0x123325[_0x5d5177(0x1f0)]=_0x5d5177(0x1e7),_0x123325[_0x5d5177(0x1e7)]=_0x11f8ec;const _0x269d28={};return _0x269d28[_0x5d5177(0x1c9)]=[_0x123325],_0x269d28[_0x5d5177(0x2bd)+'Content']=_0x26ade4,_0x269d28;}catch(_0x198950){logger[_0x5d5177(0x26f)]('Failed\x20to\x20'+_0x5d5177(0x2b4)+_0x5d5177(0x1cf)+':',_0x198950);const _0xc7c135=_0x198950 instanceof Error?_0x198950[_0x5d5177(0x23c)]:_0x5d5177(0x249)+_0x5d5177(0x2a7),_0x23a0f9={};_0x23a0f9[_0x5d5177(0x1f0)]=_0x309765[_0x5d5177(0x22c)],_0x23a0f9[_0x5d5177(0x1e7)]=_0x5d5177(0x2cc)+_0x5d5177(0x2b4)+_0x5d5177(0x1cf)+':\x20'+_0xc7c135;const _0x48f55f={};_0x48f55f[_0x5d5177(0x26f)]=_0xc7c135;const _0x3963a2={};return _0x3963a2[_0x5d5177(0x1c9)]=[_0x23a0f9],_0x3963a2[_0x5d5177(0x2bd)+'Content']=_0x48f55f,_0x3963a2['isError']=!![],_0x3963a2;}}async[a7_0x2e29df(0x1e3)+a7_0x2e29df(0x223)+'s']({analysisId:_0x2cd30b}){const _0x2958b0=a7_0x2e29df,_0x1b8db1={};_0x1b8db1[_0x2958b0(0x2c3)]=function(_0x420bcd,_0x344e00){return _0x420bcd+_0x344e00;},_0x1b8db1[_0x2958b0(0x296)]=_0x2958b0(0x249)+_0x2958b0(0x2a7);const _0x1f9229=_0x1b8db1;try{logger['info'](_0x2958b0(0x212)+'is\x20results'+'\x20requested'+':\x20'+_0x2cd30b);const _0x21b8db=await this[_0x2958b0(0x283)+_0x2958b0(0x2ac)]['getScaAnal'+_0x2958b0(0x223)+'s'](_0x2cd30b),_0x1c8e7c=_0x21b8db[_0x2958b0(0x272)]??_0x21b8db[_0x2958b0(0x214)],_0x476bfc=_0x2958b0(0x2cb)+'t\x20|\x20Versio'+_0x2958b0(0x298)+'e\x20|\x20Vulner'+_0x2958b0(0x2b7)+_0x2958b0(0x266)+_0x2958b0(0x21e)+'------|---'+_0x2958b0(0x1be)+_0x2958b0(0x1be)+_0x2958b0(0x28c)+_0x2958b0(0x28c)+_0x2958b0(0x2d2),_0x16ef18=_0x21b8db[_0x2958b0(0x1f7)]['map'](_0x4fa14f=>{const _0x48d766=_0x2958b0,_0x49dd5d=_0x4fa14f['licenses'][_0x48d766(0x274)]>0x0?_0x4fa14f[_0x48d766(0x277)][_0x48d766(0x2bb)](_0x2a117a=>_0x2a117a['name'])[_0x48d766(0x2a5)](',\x20'):_0x48d766(0x24a),_0x3b196a=_0x4fa14f['issues']['filter'](_0x5dca3f=>_0x5dca3f[_0x48d766(0x27e)]===_0x48d766(0x2c9))[_0x48d766(0x274)],_0x973303=_0x4fa14f[_0x48d766(0x1fa)][_0x48d766(0x1fc)](_0x545c2d=>_0x545c2d['severity']===_0x48d766(0x276))['length'],_0x415f27=_0x4fa14f[_0x48d766(0x1fa)][_0x48d766(0x1fc)](_0x2d2fc7=>_0x2d2fc7[_0x48d766(0x27e)]===_0x48d766(0x2a3))['length'],_0x34ab09=_0x4fa14f[_0x48d766(0x1fa)][_0x48d766(0x1fc)](_0x27646c=>_0x27646c['severity']===_0x48d766(0x226))[_0x48d766(0x274)],_0x20a3da=_0x4fa14f['issues']['filter'](_0x12ee88=>_0x12ee88[_0x48d766(0x27e)]==='TRIVIAL')[_0x48d766(0x274)],_0x4f5afd=_0x1f9229[_0x48d766(0x2c3)](_0x3b196a+_0x973303+_0x415f27,_0x34ab09)+_0x20a3da+'\x20('+_0x3b196a+'/'+_0x973303+'/'+_0x415f27+'/'+_0x34ab09+'/'+_0x20a3da+')';return'|\x20'+_0x4fa14f[_0x48d766(0x1bd)]+'\x20|\x20'+_0x4fa14f[_0x48d766(0x229)]+'\x20|\x20'+_0x49dd5d+'\x20|\x20'+_0x4f5afd+'\x20|';})['join']('\x0a'),_0x4a676d=_0x21b8db['components'][_0x2958b0(0x274)]>0x0?_0x476bfc+'\x0a'+_0x16ef18:_0x2958b0(0x28a)+_0x2958b0(0x282)+_0x2958b0(0x2a6),_0x595d96=_0x2958b0(0x2cb)+_0x2958b0(0x1dc)+_0x2958b0(0x237)+_0x2958b0(0x2a8)+_0x2958b0(0x2b5)+'n\x20|\x20CVSS\x20|'+'\x20Remediati'+'on\x20|\x0a|----'+_0x2958b0(0x216)+'-------|--'+_0x2958b0(0x28c)+_0x2958b0(0x2b1)+_0x2958b0(0x216)+'----|-----'+_0x2958b0(0x1fd),_0x492802=_0x21b8db['components'][_0x2958b0(0x1fc)](_0x11eb2d=>_0x11eb2d[_0x2958b0(0x1fa)]['length']>0x0)[_0x2958b0(0x1f5)](_0x18093c=>{const _0x560cca=_0x2958b0,_0xa5a6c7={'WvGNC':function(_0x15c7b6,_0x5f2455){return _0x15c7b6(_0x5f2455);}};return _0x18093c[_0x560cca(0x1fa)][_0x560cca(0x2bb)](_0x2454fe=>{const _0xaf0505=_0x560cca,_0x3e61ff=_0x18093c[_0xaf0505(0x1bd)],_0x1853b3=_0x18093c[_0xaf0505(0x229)],_0xa31ac9='['+_0x2454fe[_0xaf0505(0x27e)]+']\x20'+_0x2454fe[_0xaf0505(0x289)];let _0x1f92c8=_0x2454fe['descriptio'+'n']||'N/A';_0x1f92c8[_0xaf0505(0x274)]>0x64&&(_0x1f92c8=_0x1f92c8[_0xaf0505(0x26a)](0x0,0x61)+_0xaf0505(0x2bf));_0x1f92c8=_0x1f92c8['replace'](/(\r\n|\n|\r)/gm,'\x20');const _0x20a260=_0x2454fe[_0xaf0505(0x225)]?_0xa5a6c7['WvGNC'](String,_0x2454fe[_0xaf0505(0x225)]):'-';let _0x21bd58='-';if(_0x2454fe['remediatio'+'ns']?.['versionRem'+'ediations']&&_0x2454fe[_0xaf0505(0x2cd)+'ns'][_0xaf0505(0x22a)+_0xaf0505(0x1b9)][_0xaf0505(0x274)]>0x0){const _0x246d5f=_0x2454fe['remediatio'+'ns'][_0xaf0505(0x22a)+_0xaf0505(0x1b9)]['map'](_0x20fe32=>{const _0x4a7382=_0xaf0505;if(_0x20fe32[_0x4a7382(0x254)]&&_0x20fe32[_0x4a7382(0x254)][_0x4a7382(0x274)]>0x0)return'Update\x20to\x20'+_0x20fe32[_0x4a7382(0x254)][_0x4a7382(0x2a5)](',\x20');return null;})['filter'](Boolean);_0x246d5f[_0xaf0505(0x274)]>0x0&&(_0x21bd58=_0x246d5f[_0xaf0505(0x2a5)](_0xaf0505(0x29f)));}else{if(_0x2454fe[_0xaf0505(0x279)+'on'])_0x21bd58=_0xaf0505(0x204)+_0x2454fe[_0xaf0505(0x279)+'on'];else _0x2454fe[_0xaf0505(0x2cd)+'nRecommend'+_0xaf0505(0x1f9)]&&(_0x21bd58=_0x2454fe[_0xaf0505(0x2cd)+_0xaf0505(0x2d8)+_0xaf0505(0x1f9)][_0xaf0505(0x26e)](/(\r\n|\n|\r)/gm,'\x20'),_0x21bd58[_0xaf0505(0x274)]>0x32&&(_0x21bd58=_0x21bd58[_0xaf0505(0x26a)](0x0,0x2f)+_0xaf0505(0x2bf)));}return'|\x20'+_0x3e61ff+'\x20|\x20'+_0x1853b3+_0xaf0505(0x238)+_0xa31ac9+'\x20|\x20'+_0x1f92c8+_0xaf0505(0x238)+_0x20a260+_0xaf0505(0x238)+_0x21bd58+'\x20|';});})[_0x2958b0(0x2a5)]('\x0a'),_0x38c250=_0x21b8db[_0x2958b0(0x1f7)]['some'](_0x7a8b5a=>_0x7a8b5a[_0x2958b0(0x1fa)]['length']>0x0)?_0x595d96+'\x0a'+_0x492802:_0x2958b0(0x23a)+_0x2958b0(0x29a)+_0x2958b0(0x21b),_0x40045e=(_0x2958b0(0x28f)+_0x2958b0(0x25f)+_0x2958b0(0x25c)+_0x2958b0(0x2c1)+_0x2958b0(0x1e9)+_0x2958b0(0x2b6)+_0x2958b0(0x2b1)+'-|\x0a|\x20Analy'+'sis\x20ID\x20|\x20'+_0x21b8db['analysisId']+(_0x2958b0(0x2c8)+_0x2958b0(0x297))+_0x1c8e7c+(_0x2958b0(0x219)+'nents\x20|\x20')+_0x21b8db['components'][_0x2958b0(0x274)]+(_0x2958b0(0x233)+'\x20Vulnerabi'+'lities\x20|\x20')+_0x21b8db[_0x2958b0(0x28e)+_0x2958b0(0x1d5)]+('\x20|\x0a|\x20Criti'+_0x2958b0(0x1b7))+_0x21b8db[_0x2958b0(0x1e0)+'unt']+(_0x2958b0(0x299)+'|\x20')+_0x21b8db[_0x2958b0(0x288)]+(_0x2958b0(0x1d0)+_0x2958b0(0x268))+_0x21b8db[_0x2958b0(0x2d7)+'t']+(_0x2958b0(0x2c6)+_0x2958b0(0x22d))+_0x21b8db['lowCount']+(_0x2958b0(0x1de)+_0x2958b0(0x265))+(_0x21b8db[_0x2958b0(0x260)+'nt']||0x0)+(_0x2958b0(0x1c8)+_0x2958b0(0x1d6)+_0x2958b0(0x21c))+_0x21b8db[_0x2958b0(0x213)+'ief']+('\x0a\x0a##\x20Compo'+'nent\x20Detai'+_0x2958b0(0x2d0))+_0x4a676d+(_0x2958b0(0x200)+_0x2958b0(0x209)+_0x2958b0(0x20e))+_0x38c250+_0x2958b0(0x270))[_0x2958b0(0x1c5)](),_0x325470={};_0x325470[_0x2958b0(0x2b0)]=_0x21b8db[_0x2958b0(0x2b0)],_0x325470[_0x2958b0(0x214)]=_0x1c8e7c,_0x325470['result']=_0x21b8db['result'],_0x325470[_0x2958b0(0x1f7)]=_0x21b8db[_0x2958b0(0x1f7)],_0x325470['totalVulne'+'rabilities']=_0x21b8db[_0x2958b0(0x28e)+_0x2958b0(0x1d5)],_0x325470[_0x2958b0(0x1e0)+_0x2958b0(0x2ae)]=_0x21b8db[_0x2958b0(0x1e0)+_0x2958b0(0x2ae)],_0x325470[_0x2958b0(0x288)]=_0x21b8db[_0x2958b0(0x288)],_0x325470[_0x2958b0(0x2d7)+'t']=_0x21b8db[_0x2958b0(0x2d7)+'t'],_0x325470['lowCount']=_0x21b8db[_0x2958b0(0x263)],_0x325470[_0x2958b0(0x213)+_0x2958b0(0x1bb)]=_0x21b8db[_0x2958b0(0x213)+'ief'];const _0x36edf9=_0x325470,_0x4de027={};_0x4de027[_0x2958b0(0x1f0)]='text',_0x4de027[_0x2958b0(0x1e7)]=_0x40045e;const _0x4501da={};return _0x4501da[_0x2958b0(0x1c9)]=[_0x4de027],_0x4501da[_0x2958b0(0x2bd)+_0x2958b0(0x1d8)]=_0x36edf9,_0x4501da;}catch(_0x7e87e3){logger[_0x2958b0(0x26f)](_0x2958b0(0x2cc)+_0x2958b0(0x20d)+_0x2958b0(0x1dd)+'ults:',_0x7e87e3);const _0x3c17e7=_0x7e87e3 instanceof Error?_0x7e87e3['message']:_0x1f9229['onhuW'],_0x18c9c6={};_0x18c9c6['type']=_0x2958b0(0x1e7),_0x18c9c6[_0x2958b0(0x1e7)]=_0x2958b0(0x2cc)+_0x2958b0(0x20d)+_0x2958b0(0x1dd)+_0x2958b0(0x1ff)+_0x3c17e7;const _0xe84847={};_0xe84847['error']=_0x3c17e7;const _0x53a9ec={};return _0x53a9ec[_0x2958b0(0x1c9)]=[_0x18c9c6],_0x53a9ec[_0x2958b0(0x2bd)+'Content']=_0xe84847,_0x53a9ec[_0x2958b0(0x246)]=!![],_0x53a9ec;}}async[a7_0x2e29df(0x252)+a7_0x2e29df(0x1c7)+'s']({analysisId:_0x7e42ed,intervalMs:intervalMs=0xbb8,maxWaitMs:maxWaitMs=0x7530},_0x555b3f){const _0x9e7752=a7_0x2e29df,_0x424059={'fZweO':_0x9e7752(0x257),'Anjpf':_0x9e7752(0x24e),'FlsMK':function(_0x32e269,_0x5c7e9f){return _0x32e269(_0x5c7e9f);},'oYeaR':function(_0x38e160,_0x4f12bc){return _0x38e160||_0x4f12bc;},'Ihcaa':function(_0x20d86e,_0x69e8af){return _0x20d86e===_0x69e8af;},'Jjqzl':_0x9e7752(0x1f8)+_0x9e7752(0x251)+_0x9e7752(0x1ea)+_0x9e7752(0x2b8)+'y.','fimgJ':_0x9e7752(0x1cd)+_0x9e7752(0x1c3)+_0x9e7752(0x1f2)+'\x20request.','zEnwD':_0x9e7752(0x1e7),'ralDf':function(_0x1d88cc,_0x31dd6a){return _0x1d88cc!==_0x31dd6a;},'bMsSA':_0x9e7752(0x2a1),'hXznY':function(_0x34cfa7,_0x387625){return _0x34cfa7===_0x387625;},'LVRMd':function(_0x11a6f0,_0x1b1cce){return _0x11a6f0-_0x1b1cce;},'sOeJB':_0x9e7752(0x27f),'kQRME':function(_0x647445,_0x17db28){return _0x647445/_0x17db28;},'EvcYc':'Unknown\x20er'+_0x9e7752(0x2a7)};try{const _0x4339f7=_0x555b3f['_meta']?.[_0x9e7752(0x1c6)+'ken'];if(!_0x4339f7){const _0x114741={};_0x114741[_0x9e7752(0x1f0)]='text',_0x114741[_0x9e7752(0x1e7)]=_0x9e7752(0x280)+_0x9e7752(0x207)+_0x9e7752(0x1cc)+_0x9e7752(0x1eb)+_0x9e7752(0x2af)+'rt\x20progres'+'s\x20tracking'+'.';const _0x3dd863={};_0x3dd863[_0x9e7752(0x26f)]=_0x9e7752(0x280)+_0x9e7752(0x207)+'rovided';const _0x1a74eb={};return _0x1a74eb[_0x9e7752(0x1c9)]=[_0x114741],_0x1a74eb[_0x9e7752(0x2bd)+_0x9e7752(0x1d8)]=_0x3dd863,_0x1a74eb;}logger[_0x9e7752(0x24c)](_0x9e7752(0x1da)+_0x9e7752(0x1ef)+'acking\x20sta'+_0x9e7752(0x24d)+_0x7e42ed);const _0x4ce696=ANALYSIS_STAGES;let _0x31e2a0=Object[_0x9e7752(0x281)](_0x4ce696)[_0x9e7752(0x274)],_0x9d224f=null,_0x28ca42=0x0,_0x22df53=!![];const _0x24f636=Date[_0x9e7752(0x220)](),_0x5e892b=async _0x1f28e8=>{const _0x294a06=_0x9e7752;if(_0x294a06(0x27b)===_0x294a06(0x27b)){if(!_0x22df53)return![];try{return await _0x555b3f[_0x294a06(0x21f)+_0x294a06(0x224)](_0x1f28e8),!![];}catch(_0x28d00a){const _0x4a74a4=_0x28d00a instanceof Error?_0x28d00a[_0x294a06(0x23c)]:_0x294a06(0x249)+_0x294a06(0x2a7);return _0x4a74a4[_0x294a06(0x20c)](_0x294a06(0x1f3)+'ken')||_0x4a74a4[_0x294a06(0x20c)](_0x294a06(0x1e5)+_0x294a06(0x235))||_0x4a74a4[_0x294a06(0x20c)]('expired\x20to'+_0x294a06(0x235))||_0x4a74a4['toLowerCas'+'e']()[_0x294a06(0x20c)]('token')?(_0x22df53=![],logger['warn'](_0x294a06(0x2d3)+'oken\x20is\x20no'+_0x294a06(0x1e8)+_0x294a06(0x23d)+_0x294a06(0x259)+'ss\x20notific'+_0x294a06(0x2ab)+_0x4a74a4)):logger['warn'](_0x294a06(0x1db)+_0x294a06(0x29c)+'n\x20failed\x20('+'will\x20retry'+_0x294a06(0x27a)+_0x4a74a4),![];}}else _0x426c30=_0x294a06(0x1f6)+_0x294a06(0x1c1)+_0x294a06(0x1ba),_0x392ec2='COMPLETE';};while(!![]){try{const _0x56f436=await this[_0x9e7752(0x283)+_0x9e7752(0x2ac)][_0x9e7752(0x232)+_0x9e7752(0x1e1)](_0x7e42ed),_0x473a42=String(_0x56f436[_0x9e7752(0x214)])['toUpperCas'+'e'](),_0xccffdf=String(_0x56f436[_0x9e7752(0x214)])['toUpperCas'+'e'](),_0x510a72=_0xccffdf===_0x9e7752(0x257)&&_0x56f436[_0x9e7752(0x272)]?String(_0x56f436[_0x9e7752(0x272)])[_0x9e7752(0x2ad)+'e']():_0x473a42;if(_0x9d224f!==_0x473a42){_0x9d224f=_0x473a42;if(_0xccffdf===_0x424059[_0x9e7752(0x239)]||_0x473a42===_0x424059[_0x9e7752(0x2d1)]||_0x473a42===_0x9e7752(0x1f4)){let _0x357322,_0x33c79a;if(_0xccffdf===_0x9e7752(0x257)){const _0xf2d621=_0x56f436[_0x9e7752(0x272)]?_0x424059[_0x9e7752(0x1e4)](String,_0x56f436[_0x9e7752(0x272)])[_0x9e7752(0x2ad)+'e']():undefined;_0x33c79a=_0x424059[_0x9e7752(0x1c4)](_0xf2d621,_0x9e7752(0x257));if(_0x424059[_0x9e7752(0x1fe)](_0xf2d621,_0x9e7752(0x26d)))_0x357322=_0x424059[_0x9e7752(0x2a0)];else{if(_0xf2d621===_0x9e7752(0x24e))_0x357322=_0x9e7752(0x2be)+_0x9e7752(0x2d5)+_0x9e7752(0x1ce)+'lete\x20prope'+'rly.';else _0xf2d621==='STOP'?_0x357322=_0x424059['fimgJ']:(_0x357322=_0x9e7752(0x1f6)+'\x20Analysis\x20'+_0x9e7752(0x1ba),_0x33c79a=_0x424059[_0x9e7752(0x239)]);}}else _0x357322='['+_0x473a42+(_0x9e7752(0x22f)+_0x9e7752(0x1d3)),_0x33c79a=_0x473a42;const _0x1de559={'method':_0x9e7752(0x2b9)+_0x9e7752(0x2a4)+'ss','params':{'progressToken':typeof _0x4339f7===_0x9e7752(0x27f)?_0x4339f7:String(_0x4339f7),'progress':_0x473a42==='COMPLETE'?0x64:0x0,'message':_0x357322,'total':0x64}};await _0x5e892b(_0x1de559);_0xccffdf===_0x424059[_0x9e7752(0x239)]?logger[_0x9e7752(0x24c)](_0x9e7752(0x28b)+_0x9e7752(0x1df)+_0x9e7752(0x2b3)+'\x20'+_0x33c79a):logger[_0x9e7752(0x24c)]('Analysis\x20f'+_0x9e7752(0x275)+'\x20status:\x20'+_0x33c79a);const _0x696f1d={};_0x696f1d[_0x9e7752(0x1f0)]=_0x424059['zEnwD'],_0x696f1d[_0x9e7752(0x1e7)]='Analysis\x20c'+_0x9e7752(0x285)+'Analysis\x20I'+_0x9e7752(0x284)+_0x7e42ed+(_0x9e7752(0x291)+'tus:\x20')+_0x33c79a;const _0xe488b2={};_0xe488b2[_0x9e7752(0x2b0)]=_0x7e42ed,_0xe488b2[_0x9e7752(0x214)]=_0x33c79a,_0xe488b2[_0x9e7752(0x272)]=_0x56f436[_0x9e7752(0x272)],_0xe488b2[_0x9e7752(0x29b)]=!![];const _0x1e0aeb={};return _0x1e0aeb['content']=[_0x696f1d],_0x1e0aeb[_0x9e7752(0x2bd)+'Content']=_0xe488b2,_0x1e0aeb;}const _0x5ab666=_0x4ce696[_0x473a42];if(_0x5ab666){const _0x43dc92={};_0x43dc92['total']=0x64;const _0x105f8b={'method':'notificati'+_0x9e7752(0x2a4)+'ss','params':{'progressToken':typeof _0x4339f7===_0x9e7752(0x27f)?_0x4339f7:String(_0x4339f7),'progress':_0x424059['ralDf'](_0x5ab666['progress'],null)?_0x5ab666[_0x9e7752(0x227)]:_0x473a42===_0x9e7752(0x2a1)?_0x28ca42:_0x5ab666[_0x9e7752(0x240)],'message':'['+_0x5ab666['id']+']\x20'+_0x5ab666[_0x9e7752(0x1ed)+'n'],'total':_0x31e2a0,..._0x5ab666['progress']!==null&&_0x473a42===_0x9e7752(0x2a1)&&_0x43dc92}};await _0x5e892b(_0x105f8b),_0x22df53&&logger[_0x9e7752(0x24c)](_0x9e7752(0x2aa)+_0x9e7752(0x2c4)+_0x9e7752(0x208)+_0x5ab666['id']+'\x20('+_0x5ab666[_0x9e7752(0x1bd)]+')');}else{const _0x83c2ab={'method':_0x9e7752(0x2b9)+_0x9e7752(0x2a4)+'ss','params':{'progressToken':typeof _0x4339f7==='string'?_0x4339f7:String(_0x4339f7),'progress':0x1,'total':0x1,'message':'['+_0x473a42+(_0x9e7752(0x22f)+_0x9e7752(0x1c0)+_0x9e7752(0x2ca))}};await _0x5e892b(_0x83c2ab);}}else{if(_0x473a42===_0x424059[_0x9e7752(0x1e2)]){if(_0x56f436[_0x9e7752(0x227)]!==undefined&&_0x56f436[_0x9e7752(0x227)]!==null){_0x28ca42=_0x56f436[_0x9e7752(0x227)];const _0x59a6c6=_0x4ce696[_0x473a42],_0x3a6a12={'method':'notificati'+_0x9e7752(0x2a4)+'ss','params':{'progressToken':_0x424059['hXznY'](typeof _0x4339f7,'string')?_0x4339f7:String(_0x4339f7),'progress':_0x59a6c6['order'],'total':_0x31e2a0,'message':_0x9e7752(0x24b)+_0x9e7752(0x1c1)+_0x9e7752(0x2b2)+'s:\x20'+_0x28ca42+'%'}};await _0x5e892b(_0x3a6a12);}}}!_0x22df53&&logger[_0x9e7752(0x24c)](_0x9e7752(0x2d3)+_0x9e7752(0x293)+_0x9e7752(0x228)+'tinuing\x20st'+_0x9e7752(0x26b)+'s\x20without\x20'+_0x9e7752(0x2b9)+_0x9e7752(0x243));await new Promise(_0x1361fb=>setTimeout(_0x1361fb,intervalMs));const _0x276ca1=_0x424059[_0x9e7752(0x221)](Date[_0x9e7752(0x220)](),_0x24f636);if(_0x276ca1>=maxWaitMs){logger[_0x9e7752(0x24c)](_0x9e7752(0x1da)+_0x9e7752(0x1ef)+_0x9e7752(0x25a)+_0x9e7752(0x29d)+_0x9e7752(0x222)+maxWaitMs+'ms):\x20'+_0x7e42ed);const _0x54fda5={'method':_0x9e7752(0x2b9)+'ons/progre'+'ss','params':{'progressToken':typeof _0x4339f7===_0x424059[_0x9e7752(0x242)]?_0x4339f7:String(_0x4339f7),'progress':_0x28ca42||0x1,'total':0x64,'message':'['+(_0x9d224f||_0x9e7752(0x202)+'S')+(_0x9e7752(0x25b)+_0x9e7752(0x21a)+_0x9e7752(0x267))+Math[_0x9e7752(0x1d2)](_0x424059[_0x9e7752(0x1d7)](_0x276ca1,0x3e8))+(_0x9e7752(0x2d6)+_0x9e7752(0x20a)+_0x9e7752(0x1c0)+_0x9e7752(0x258))}};return await _0x5e892b(_0x54fda5),{'content':[{'type':_0x9e7752(0x1e7),'text':_0x9e7752(0x2a9)+_0x9e7752(0x25e)+_0x9e7752(0x244)+_0x9e7752(0x245)+_0x9d224f+(_0x9e7752(0x241)+'g\x20paused\x20a'+_0x9e7752(0x287))+Math[_0x9e7752(0x1d2)](_0x276ca1/0x3e8)+(_0x9e7752(0x1b6)+'call\x20track'+_0x9e7752(0x1b5)+'progress\x20a'+_0x9e7752(0x264)+_0x9e7752(0x256)+_0x9e7752(0x28d)+_0x9e7752(0x294))}],'structuredContent':{'analysisId':_0x7e42ed,'status':_0x9d224f,'completed':![],'elapsedMs':_0x276ca1}};}}catch(_0x3aa2b3){logger[_0x9e7752(0x26f)](_0x9e7752(0x1d1)+'king\x20analy'+_0x9e7752(0x1c2)+'\x20('+_0x7e42ed+'):',_0x3aa2b3),await new Promise(_0xb2dc15=>setTimeout(_0xb2dc15,intervalMs));}}}catch(_0x583083){logger[_0x9e7752(0x26f)](_0x9e7752(0x1da)+_0x9e7752(0x1ef)+_0x9e7752(0x215)+_0x9e7752(0x286),_0x583083);const _0x505139={};_0x505139[_0x9e7752(0x1f0)]=_0x9e7752(0x1e7),_0x505139[_0x9e7752(0x1e7)]='Analysis\x20p'+'rogress\x20tr'+_0x9e7752(0x215)+'led:\x20'+(_0x583083 instanceof Error?_0x583083[_0x9e7752(0x23c)]:_0x424059[_0x9e7752(0x27d)]);const _0x1cb461={};_0x1cb461[_0x9e7752(0x26f)]=_0x583083 instanceof Error?_0x583083[_0x9e7752(0x23c)]:_0x424059['EvcYc'];const _0xbad66c={};return _0xbad66c[_0x9e7752(0x1c9)]=[_0x505139],_0xbad66c[_0x9e7752(0x2bd)+_0x9e7752(0x1d8)]=_0x1cb461,_0xbad66c[_0x9e7752(0x246)]=!![],_0xbad66c;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a8_0xf103(_0x21939,_0x4f28d4){_0x21939=_0x21939-0x1b6;const _0x2c65ad=a8_0x208c();let _0x2656ba=_0x2c65ad[_0x21939];return _0x2656ba;}const a8_0x1cf2fd=a8_0xf103;(function(_0x13dda6,_0x14f8ea){const _0x179d5d=a8_0xf103,_0x433a7b=_0x13dda6();while(!![]){try{const _0x1b784d=parseInt(_0x179d5d(0x1fc))/0x1+-parseInt(_0x179d5d(0x1ce))/0x2+-parseInt(_0x179d5d(0x1dc))/0x3+parseInt(_0x179d5d(0x1f6))/0x4*(parseInt(_0x179d5d(0x21f))/0x5)+parseInt(_0x179d5d(0x210))/0x6*(parseInt(_0x179d5d(0x21a))/0x7)+-parseInt(_0x179d5d(0x1da))/0x8*(parseInt(_0x179d5d(0x1e0))/0x9)+parseInt(_0x179d5d(0x1f1))/0xa;if(_0x1b784d===_0x14f8ea)break;else _0x433a7b['push'](_0x433a7b['shift']());}catch(_0x331d4b){_0x433a7b['push'](_0x433a7b['shift']());}}}(a8_0x208c,0x4c7e5));const a8_0x157e0b=(function(){let _0x403902=!![];return function(_0x2a599b,_0x252ffa){const _0x3847e0=_0x403902?function(){const _0x37e773=a8_0xf103;if(_0x252ffa){const _0x12772d=_0x252ffa[_0x37e773(0x21c)](_0x2a599b,arguments);return _0x252ffa=null,_0x12772d;}}:function(){};return _0x403902=![],_0x3847e0;};}()),a8_0x2656ba=a8_0x157e0b(this,function(){const _0x252f5e=a8_0xf103;return a8_0x2656ba[_0x252f5e(0x212)]()[_0x252f5e(0x1d4)](_0x252f5e(0x1fb)+'+$')[_0x252f5e(0x212)]()['constructo'+'r'](a8_0x2656ba)[_0x252f5e(0x1d4)]('(((.+)+)+)'+'+$');});a8_0x2656ba();import{logger}from'../utils/logger.js';export class SastController{[a8_0x1cf2fd(0x1de)+a8_0x1cf2fd(0x1ba)];constructor(_0x2032f5){const _0x8ea76b=a8_0x1cf2fd;this[_0x8ea76b(0x1de)+_0x8ea76b(0x1ba)]=_0x2032f5;}async['analyzeFil'+'eSast']({fileContent:_0x29798a,fileName:_0x1e5ff8,memo:_0x595716}){const _0x5b2c73=a8_0x1cf2fd,_0x2b2f72={};_0x2b2f72[_0x5b2c73(0x1d5)]='Empty\x20file'+_0x5b2c73(0x219)+_0x5b2c73(0x1f0)+_0x5b2c73(0x20b),_0x2b2f72['TXFJe']=function(_0x15b376,_0x5191b4){return _0x15b376 instanceof _0x5191b4;};const _0x7eb4a2=_0x2b2f72;try{logger[_0x5b2c73(0x1f4)](_0x5b2c73(0x221)+_0x5b2c73(0x1cf)+'quested:\x20'+_0x1e5ff8);if(!_0x29798a||_0x29798a[_0x5b2c73(0x1d3)]()[_0x5b2c73(0x217)]===0x0){const _0x1077b3={};_0x1077b3['type']='text',_0x1077b3[_0x5b2c73(0x1cd)]=_0x5b2c73(0x205)+_0x5b2c73(0x1e4)+_0x5b2c73(0x1d2);const _0x4396d8={};_0x4396d8['error']=_0x7eb4a2[_0x5b2c73(0x1d5)];const _0x34e6e3={};return _0x34e6e3[_0x5b2c73(0x21e)]=[_0x1077b3],_0x34e6e3[_0x5b2c73(0x200)+_0x5b2c73(0x1ea)]=_0x4396d8,_0x34e6e3;}const _0x2cbe04=_0x1e5ff8['match'](/\.([^.]+)$/);if(!_0x2cbe04||_0x2cbe04[0x1][_0x5b2c73(0x217)]===0x0){const _0x2a37dc={};_0x2a37dc[_0x5b2c73(0x203)]='text',_0x2a37dc[_0x5b2c73(0x1cd)]='파일\x20확장자가\x20없습'+_0x5b2c73(0x1c2)+_0x5b2c73(0x208)+_0x5b2c73(0x1e7)+'.';const _0x35a41d={};_0x35a41d[_0x5b2c73(0x207)]='File\x20exten'+'sion\x20requi'+_0x5b2c73(0x1be)+_0x5b2c73(0x1e1)+_0x5b2c73(0x1e6)+'rts\x20files\x20'+_0x5b2c73(0x211)+_0x5b2c73(0x1f2);const _0x5e98d7={};return _0x5e98d7['content']=[_0x2a37dc],_0x5e98d7[_0x5b2c73(0x200)+_0x5b2c73(0x1ea)]=_0x35a41d,_0x5e98d7;}const _0x55050b={};_0x55050b[_0x5b2c73(0x1d8)+'t']=_0x29798a,_0x55050b[_0x5b2c73(0x1d9)]=_0x1e5ff8,_0x55050b[_0x5b2c73(0x1b8)]=_0x595716;const _0x24d506=await this[_0x5b2c73(0x1de)+_0x5b2c73(0x1ba)][_0x5b2c73(0x1cb)+_0x5b2c73(0x1eb)](_0x55050b),_0x2470b5={};_0x2470b5['type']=_0x5b2c73(0x1cd),_0x2470b5['text']=_0x5b2c73(0x221)+_0x5b2c73(0x1e8)+_0x5b2c73(0x1df)+'\x0aAnalysis\x20'+'ID:\x20'+_0x24d506[_0x5b2c73(0x216)];const _0x332a26={};_0x332a26[_0x5b2c73(0x216)]=_0x24d506[_0x5b2c73(0x216)],_0x332a26[_0x5b2c73(0x224)]=_0x24d506[_0x5b2c73(0x224)];const _0x2e804a={};return _0x2e804a[_0x5b2c73(0x21e)]=[_0x2470b5],_0x2e804a[_0x5b2c73(0x200)+_0x5b2c73(0x1ea)]=_0x332a26,_0x2e804a;}catch(_0x389fbe){logger[_0x5b2c73(0x207)](_0x5b2c73(0x215)+_0x5b2c73(0x223)+_0x5b2c73(0x20f),_0x389fbe);const _0x103ec0={};return _0x103ec0[_0x5b2c73(0x203)]=_0x5b2c73(0x1cd),_0x103ec0[_0x5b2c73(0x1cd)]=_0x5b2c73(0x221)+_0x5b2c73(0x1cf)+_0x5b2c73(0x1ec)+_0x5b2c73(0x1fe)+(_0x389fbe instanceof Error?_0x389fbe['message']:_0x5b2c73(0x21b)+_0x5b2c73(0x1d1)),{'content':[_0x103ec0],'structuredContent':{'error':_0x7eb4a2[_0x5b2c73(0x1f9)](_0x389fbe,Error)?_0x389fbe[_0x5b2c73(0x20e)]:_0x5b2c73(0x21b)+'ror'}};}}async['analyzeFil'+a8_0x1cf2fd(0x202)]({filePaths:_0xa8b66d,zipFileName:_0x3146fb,memo:_0x1c4503}){const _0xe0ff8b=a8_0x1cf2fd;try{if(!_0xa8b66d||_0xa8b66d[_0xe0ff8b(0x217)]===0x0){const _0x59c985={};_0x59c985['type']=_0xe0ff8b(0x1cd),_0x59c985[_0xe0ff8b(0x1cd)]=_0xe0ff8b(0x225)+'o\x20analyze.'+_0xe0ff8b(0x1c0)+'aths\x20array'+'\x20requires\x20'+_0xe0ff8b(0x1c9)+_0xe0ff8b(0x209)+_0xe0ff8b(0x1f8);const _0x141ba0={};_0x141ba0[_0xe0ff8b(0x207)]=_0xe0ff8b(0x1bd)+_0xe0ff8b(0x1fd)+_0xe0ff8b(0x20d);const _0xd85645={};return _0xd85645[_0xe0ff8b(0x21e)]=[_0x59c985],_0xd85645['structured'+'Content']=_0x141ba0,_0xd85645;}logger[_0xe0ff8b(0x1f4)](_0xe0ff8b(0x222)+_0xe0ff8b(0x1b7)+_0xe0ff8b(0x1bf)+_0xe0ff8b(0x228)+_0xa8b66d['length']+(_0xe0ff8b(0x1c8)+'s'));const _0x5b4cf6=await this['analysisSe'+'rvice'][_0xe0ff8b(0x20a)+_0xe0ff8b(0x1ed)+_0xe0ff8b(0x201)](_0xa8b66d,_0x3146fb,_0x1c4503),_0x42c232='Security\x20a'+_0xe0ff8b(0x1e8)+_0xe0ff8b(0x1df)+_0xe0ff8b(0x1db)+'\x20file\x20path'+_0xe0ff8b(0x1c7)+_0xa8b66d[_0xe0ff8b(0x217)]+(_0xe0ff8b(0x227)+_0xe0ff8b(0x1c3))+_0x5b4cf6[_0xe0ff8b(0x216)]+_0xe0ff8b(0x21d)+_0x5b4cf6['status'],_0x5119bb={};_0x5119bb['type']=_0xe0ff8b(0x1cd),_0x5119bb[_0xe0ff8b(0x1cd)]=_0x42c232;const _0x46da87={};_0x46da87[_0xe0ff8b(0x216)]=_0x5b4cf6[_0xe0ff8b(0x216)],_0x46da87['status']=_0x5b4cf6[_0xe0ff8b(0x224)],_0x46da87[_0xe0ff8b(0x204)+'unt']=_0xa8b66d['length'];const _0x1d9431={};return _0x1d9431[_0xe0ff8b(0x21e)]=[_0x5119bb],_0x1d9431['structured'+_0xe0ff8b(0x1ea)]=_0x46da87,_0x1d9431;}catch(_0x2b3dab){logger['error'](_0xe0ff8b(0x222)+_0xe0ff8b(0x1b7)+_0xe0ff8b(0x20c)+_0xe0ff8b(0x1e2),_0x2b3dab);const _0x25b61e={};_0x25b61e[_0xe0ff8b(0x203)]='text',_0x25b61e['text']='Security\x20a'+_0xe0ff8b(0x1cf)+_0xe0ff8b(0x1ec)+_0xe0ff8b(0x1fe)+(_0x2b3dab instanceof Error?_0x2b3dab[_0xe0ff8b(0x20e)]:_0xe0ff8b(0x21b)+_0xe0ff8b(0x1d1));const _0x198164={};_0x198164[_0xe0ff8b(0x207)]=_0x2b3dab instanceof Error?_0x2b3dab[_0xe0ff8b(0x20e)]:_0xe0ff8b(0x21b)+_0xe0ff8b(0x1d1);const _0x1155c9={};return _0x1155c9[_0xe0ff8b(0x21e)]=[_0x25b61e],_0x1155c9[_0xe0ff8b(0x200)+_0xe0ff8b(0x1ea)]=_0x198164,_0x1155c9;}}async['analyzeFol'+a8_0x1cf2fd(0x1e5)]({folderPath:_0x183a65,zipFileName:_0x334502,memo:_0x37d29c}){const _0x491db3=a8_0x1cf2fd,_0xe2c7bd={};_0xe2c7bd[_0x491db3(0x1e3)]=_0x491db3(0x1b9)+'h\x20not\x20prov'+_0x491db3(0x218);const _0x37696=_0xe2c7bd;try{if(!_0x183a65||_0x183a65[_0x491db3(0x1d3)]()['length']===0x0){const _0x488c56={};_0x488c56['type']=_0x491db3(0x1cd),_0x488c56[_0x491db3(0x1cd)]=_0x491db3(0x1b9)+_0x491db3(0x220)+_0x491db3(0x1bb);const _0x31c23e={};_0x31c23e[_0x491db3(0x207)]=_0x37696['qitxF'];const _0x2bb1c2={};return _0x2bb1c2[_0x491db3(0x21e)]=[_0x488c56],_0x2bb1c2[_0x491db3(0x200)+_0x491db3(0x1ea)]=_0x31c23e,_0x2bb1c2;}logger[_0x491db3(0x1f4)]('Folder\x20sec'+_0x491db3(0x1ff)+'ysis\x20reque'+_0x491db3(0x226)+_0x183a65);const _0x313616=await this[_0x491db3(0x1de)+_0x491db3(0x1ba)][_0x491db3(0x1f5)+'der'](_0x183a65,_0x334502,_0x37d29c);let _0x5a86b6='Security\x20a'+'nalysis\x20ha'+_0x491db3(0x1df)+'\x0aFolder:\x20'+_0x183a65+('\x0aAnalysis\x20'+'ID:\x20')+_0x313616[_0x491db3(0x216)]+'\x0aStatus:\x20'+_0x313616[_0x491db3(0x224)];_0x313616[_0x491db3(0x1f7)+_0x491db3(0x1c5)]&&_0x313616[_0x491db3(0x1f7)+'ders'][_0x491db3(0x217)]>0x0&&(_0x5a86b6+=_0x491db3(0x1e9)+_0x491db3(0x1c4)+_0x313616['skippedFol'+_0x491db3(0x1c5)][_0x491db3(0x217)]+_0x491db3(0x1f3)+_0x313616[_0x491db3(0x1f7)+_0x491db3(0x1c5)][_0x491db3(0x1c6)](',\x20'));const _0x59bc07={};_0x59bc07[_0x491db3(0x203)]=_0x491db3(0x1cd),_0x59bc07['text']=_0x5a86b6;const _0x3e46c2={};_0x3e46c2[_0x491db3(0x216)]=_0x313616[_0x491db3(0x216)],_0x3e46c2[_0x491db3(0x224)]=_0x313616[_0x491db3(0x224)],_0x3e46c2[_0x491db3(0x1bc)]=_0x183a65,_0x3e46c2[_0x491db3(0x1f7)+'ders']=_0x313616[_0x491db3(0x1f7)+_0x491db3(0x1c5)];const _0x228c41={};return _0x228c41[_0x491db3(0x21e)]=[_0x59bc07],_0x228c41[_0x491db3(0x200)+'Content']=_0x3e46c2,_0x228c41;}catch(_0x3ff7af){logger['error'](_0x491db3(0x206)+'urity\x20anal'+'ysis\x20faile'+'d:',_0x3ff7af);const _0x15bb1d={};_0x15bb1d[_0x491db3(0x203)]=_0x491db3(0x1cd),_0x15bb1d[_0x491db3(0x1cd)]=_0x491db3(0x221)+_0x491db3(0x1cf)+_0x491db3(0x1ec)+_0x491db3(0x1fe)+(_0x3ff7af instanceof Error?_0x3ff7af[_0x491db3(0x20e)]:_0x491db3(0x21b)+_0x491db3(0x1d1));const _0x3aac0d={};_0x3aac0d[_0x491db3(0x207)]=_0x3ff7af instanceof Error?_0x3ff7af['message']:_0x491db3(0x21b)+_0x491db3(0x1d1);const _0x2f9529={};return _0x2f9529[_0x491db3(0x21e)]=[_0x15bb1d],_0x2f9529[_0x491db3(0x200)+'Content']=_0x3aac0d,_0x2f9529;}}async[a8_0x1cf2fd(0x1c1)+'Sast']({zipFilePath:_0x4665e2,zipFileName:_0x209163,memo:_0x26330b}){const _0x54dd60=a8_0x1cf2fd,_0x14b88a={};_0x14b88a[_0x54dd60(0x1d0)]=_0x54dd60(0x214)+_0x54dd60(0x1b6)+_0x54dd60(0x213)+_0x54dd60(0x229);const _0x1fd0aa=_0x14b88a;try{if(!_0x4665e2||_0x4665e2[_0x54dd60(0x1d3)]()['length']===0x0){const _0x1d94aa={};_0x1d94aa['type']=_0x54dd60(0x1cd),_0x1d94aa[_0x54dd60(0x1cd)]='ZIP\x20file\x20p'+_0x54dd60(0x1d6)+_0x54dd60(0x1ee);const _0x2aa363={};_0x2aa363[_0x54dd60(0x207)]=_0x54dd60(0x1fa)+_0x54dd60(0x1d6)+'ovided';const _0x8af36={};return _0x8af36[_0x54dd60(0x21e)]=[_0x1d94aa],_0x8af36['structured'+_0x54dd60(0x1ea)]=_0x2aa363,_0x8af36;}logger[_0x54dd60(0x1f4)](_0x54dd60(0x214)+_0x54dd60(0x1b6)+_0x54dd60(0x1ca)+_0x54dd60(0x1ef)+_0x4665e2);const _0x3361af=await this['analysisSe'+_0x54dd60(0x1ba)]['analyzeZip'+_0x54dd60(0x1dd)](_0x4665e2,_0x209163,_0x26330b),_0x421434=_0x54dd60(0x221)+'nalysis\x20ha'+_0x54dd60(0x1df)+_0x54dd60(0x1d7)+'\x20'+_0x4665e2+(_0x54dd60(0x227)+_0x54dd60(0x1c3))+_0x3361af[_0x54dd60(0x216)]+_0x54dd60(0x21d)+_0x3361af[_0x54dd60(0x224)],_0x5df6d1={};_0x5df6d1[_0x54dd60(0x203)]=_0x54dd60(0x1cd),_0x5df6d1[_0x54dd60(0x1cd)]=_0x421434;const _0x4fa938={};_0x4fa938[_0x54dd60(0x216)]=_0x3361af[_0x54dd60(0x216)],_0x4fa938[_0x54dd60(0x224)]=_0x3361af[_0x54dd60(0x224)],_0x4fa938[_0x54dd60(0x1cc)+'h']=_0x4665e2;const _0x4ad0b6={};return _0x4ad0b6[_0x54dd60(0x21e)]=[_0x5df6d1],_0x4ad0b6['structured'+_0x54dd60(0x1ea)]=_0x4fa938,_0x4ad0b6;}catch(_0x1f9473){logger[_0x54dd60(0x207)](_0x1fd0aa[_0x54dd60(0x1d0)],_0x1f9473);const _0x1f6fde={};_0x1f6fde[_0x54dd60(0x203)]=_0x54dd60(0x1cd),_0x1f6fde[_0x54dd60(0x1cd)]=_0x54dd60(0x221)+_0x54dd60(0x1cf)+_0x54dd60(0x1ec)+_0x54dd60(0x1fe)+(_0x1f9473 instanceof Error?_0x1f9473[_0x54dd60(0x20e)]:_0x54dd60(0x21b)+_0x54dd60(0x1d1));const _0x51e1fd={};_0x51e1fd['error']=_0x1f9473 instanceof Error?_0x1f9473[_0x54dd60(0x20e)]:'Unknown\x20er'+'ror';const _0x281f88={};return _0x281f88[_0x54dd60(0x21e)]=[_0x1f6fde],_0x281f88['structured'+_0x54dd60(0x1ea)]=_0x51e1fd,_0x281f88;}}}function a8_0x208c(){const _0x286084=['tipleFiles','ovided.','uested:\x20','\x20no\x20code\x20t','4394740nTwDHa','sions','):\x20','info','analyzeFol','128NclvnO','skippedFol','th.','TXFJe','ZIP\x20file\x20p','(((.+)+)+)','459817CQEuok','\x20not\x20provi','ed:\x20','urity\x20anal','structured','FromPaths','esSast','type','filePathCo','파일\x20내용이\x20비어있','Folder\x20sec','error','석은\x20확장자가\x20있는','ne\x20file\x20pa','analyzeMul','o\x20analyze','analysis\x20f','ded','message','is\x20failed:','42FXTMvx','with\x20exten','toString','alysis\x20fai','ZIP\x20file\x20s','File\x20secur','analysisId','length','ided','\x20content\x20-','248647WxguqA','Unknown\x20er','apply','\x0aStatus:\x20','content','20940bBMVrX','h\x20not\x20prov','Security\x20a','Multi-file','ity\x20analys','status','No\x20files\x20t','sted:\x20','\x0aAnalysis\x20','equested:\x20','led:','ecurity\x20an','\x20security\x20','memo','Folder\x20pat','rvice','ided.','folderPath','File\x20paths','red\x20-\x20SAST','analysis\x20r','\x20The\x20fileP','analyzeZip','니다.\x20SAST\x20분','ID:\x20','folders\x20(','ders','join','s:\x20','\x20file\x20path','at\x20least\x20o','alysis\x20req','analyzeFil','zipFilePat','text','176898GbKikN','nalysis\x20re','GeArk','ror','드를\x20제공해주세요.','trim','search','TTHPU','ath\x20not\x20pr','\x0aZIP\x20File:','fileConten','fileName','1184cRooup','\x0aNumber\x20of','1647336WGRTbW','File','analysisSe','s\x20started.','20133lLuXkk','\x20analysis\x20','ailed:','qitxF','습니다.\x20분석할\x20코','derSast','only\x20suppo','\x20파일만\x20지원합니다','nalysis\x20ha','\x0a\x0aSkipped\x20','Content','eSecurity','quest\x20fail'];a8_0x208c=function(){return _0x286084;};return a8_0x208c();}
|
|
1
|
+
const a8_0x4a8303=a8_0xcd33;function a8_0xcd33(_0x135fd3,_0x3fda8e){_0x135fd3=_0x135fd3-0x1cf;const _0x31f40e=a8_0x1ebe();let _0x43cf02=_0x31f40e[_0x135fd3];return _0x43cf02;}(function(_0xe03272,_0x3d9454){const _0x395c7d=a8_0xcd33,_0x3a04f=_0xe03272();while(!![]){try{const _0x108c1f=parseInt(_0x395c7d(0x1e6))/0x1*(-parseInt(_0x395c7d(0x208))/0x2)+-parseInt(_0x395c7d(0x216))/0x3+-parseInt(_0x395c7d(0x213))/0x4*(-parseInt(_0x395c7d(0x232))/0x5)+-parseInt(_0x395c7d(0x1d4))/0x6*(parseInt(_0x395c7d(0x205))/0x7)+-parseInt(_0x395c7d(0x1d5))/0x8*(-parseInt(_0x395c7d(0x230))/0x9)+-parseInt(_0x395c7d(0x1d6))/0xa+parseInt(_0x395c7d(0x1e7))/0xb;if(_0x108c1f===_0x3d9454)break;else _0x3a04f['push'](_0x3a04f['shift']());}catch(_0x1e5364){_0x3a04f['push'](_0x3a04f['shift']());}}}(a8_0x1ebe,0x70ea3));const a8_0x573c2f=(function(){let _0x177ed7=!![];return function(_0x28b6b2,_0x154a13){const _0x148c8e=_0x177ed7?function(){const _0x352716=a8_0xcd33;if(_0x154a13){const _0x1753b1=_0x154a13[_0x352716(0x1f6)](_0x28b6b2,arguments);return _0x154a13=null,_0x1753b1;}}:function(){};return _0x177ed7=![],_0x148c8e;};}()),a8_0x43cf02=a8_0x573c2f(this,function(){const _0x5e6ba4=a8_0xcd33;return a8_0x43cf02[_0x5e6ba4(0x1d3)]()[_0x5e6ba4(0x239)](_0x5e6ba4(0x226)+'+$')[_0x5e6ba4(0x1d3)]()[_0x5e6ba4(0x22c)+'r'](a8_0x43cf02)[_0x5e6ba4(0x239)](_0x5e6ba4(0x226)+'+$');});a8_0x43cf02();function a8_0x1ebe(){const _0x354c42=['analyzeMul','eSecurity','analysis\x20r','\x20content\x20-','status','structured','ZIP\x20file\x20s','ror','Multi-file','analyzeZip','16304HNtNAO','rts\x20files\x20','tipleFiles','1380333stXbeN','aths\x20array','content','sions','with\x20exten','fileName','fileConten','urity\x20anal','oNnaO','ovided','파일\x20확장자가\x20없습','zipFilePat','Content','ne\x20file\x20pa','\x0a\x0aSkipped\x20','skippedFol','(((.+)+)+)','nalysis\x20re','o\x20analyze','ID:\x20','\x20requires\x20','Unknown\x20er','constructo','derSast','text','드를\x20제공해주세요.','19422iyzuhu','match','265uPUexM','equested:\x20','o\x20analyze.','\x20file\x20path','analysisId','miOkw','ZIP\x20file\x20p','search','파일\x20내용이\x20비어있','Empty\x20file','ed:\x20','ath\x20not\x20pr','rvice','led:','message','sion\x20requi','alysis\x20fai','length','\x20파일만\x20지원합니다','toString','190578qZvTPx','152CZgnSu','3714090zuvjLF','s\x20started.','red\x20-\x20SAST','analysisSe','Folder\x20pat','quested:\x20','trim','):\x20','Folder\x20sec','\x0aAnalysis\x20','analyzeFil','ity\x20analys','sted:\x20','ided','ided.','filePathCo','74BPszEV','19801155PoKBdY','info','ders','ded','join','\x20not\x20provi','\x0aStatus:\x20','ovided.','oJJyd','unt','Security\x20a','File','raytk','\x0aNumber\x20of','\x20security\x20','apply','File\x20exten','analyzeFol','ecurity\x20an','니다.\x20SAST\x20분','error','ysis\x20reque','FromPaths','is\x20failed:','quest\x20fail','esSast','\x20no\x20code\x20t','type','s:\x20','th.','42rTJTIO','kevCD','nalysis\x20ha','15474vykIjJ'];a8_0x1ebe=function(){return _0x354c42;};return a8_0x1ebe();}import{logger}from'../utils/logger.js';export class SastController{[a8_0x4a8303(0x1d9)+a8_0x4a8303(0x23e)];constructor(_0x1d0e28){const _0x1a15f1=a8_0x4a8303;this['analysisSe'+_0x1a15f1(0x23e)]=_0x1d0e28;}async[a8_0x4a8303(0x1e0)+'eSast']({fileContent:_0x56f4d8,fileName:_0x116289,memo:_0x4c4b3f}){const _0x35f750=a8_0x4a8303,_0x5a86ac={};_0x5a86ac['kevCD']='text',_0x5a86ac[_0x35f750(0x1ef)]=function(_0x3f17e5,_0x1b6fe6){return _0x3f17e5===_0x1b6fe6;};const _0x259bce=_0x5a86ac;try{logger['info'](_0x35f750(0x1f1)+_0x35f750(0x227)+_0x35f750(0x1db)+_0x116289);if(!_0x56f4d8||_0x56f4d8['trim']()['length']===0x0){const _0x12100c={};_0x12100c[_0x35f750(0x202)]=_0x259bce[_0x35f750(0x206)],_0x12100c[_0x35f750(0x22e)]=_0x35f750(0x23a)+'습니다.\x20분석할\x20코'+_0x35f750(0x22f);const _0x4fe922={};_0x4fe922[_0x35f750(0x1fb)]=_0x35f750(0x23b)+_0x35f750(0x20c)+_0x35f750(0x201)+_0x35f750(0x228);const _0x5ddeee={};return _0x5ddeee[_0x35f750(0x218)]=[_0x12100c],_0x5ddeee[_0x35f750(0x20e)+_0x35f750(0x222)]=_0x4fe922,_0x5ddeee;}const _0x500c89=_0x116289[_0x35f750(0x231)](/\.([^.]+)$/);if(!_0x500c89||_0x500c89[0x1][_0x35f750(0x1d1)]===0x0){if(_0x259bce['oJJyd'](_0x35f750(0x1f3),_0x35f750(0x1f3))){const _0x2c79bf={};_0x2c79bf[_0x35f750(0x202)]=_0x259bce[_0x35f750(0x206)],_0x2c79bf[_0x35f750(0x22e)]=_0x35f750(0x220)+_0x35f750(0x1fa)+'석은\x20확장자가\x20있는'+_0x35f750(0x1d2)+'.';const _0x238086={};_0x238086['error']=_0x35f750(0x1f7)+_0x35f750(0x1cf)+_0x35f750(0x1d8)+'\x20analysis\x20'+'only\x20suppo'+_0x35f750(0x214)+_0x35f750(0x21a)+_0x35f750(0x219);const _0xcd2050={};return _0xcd2050[_0x35f750(0x218)]=[_0x2c79bf],_0xcd2050['structured'+'Content']=_0x238086,_0xcd2050;}else _0x40ef9b+=_0x35f750(0x224)+'folders\x20('+_0x3cc231[_0x35f750(0x225)+_0x35f750(0x1e9)]['length']+_0x35f750(0x1dd)+_0xfe6b76[_0x35f750(0x225)+_0x35f750(0x1e9)]['join'](',\x20');}const _0x525a91={};_0x525a91[_0x35f750(0x21c)+'t']=_0x56f4d8,_0x525a91[_0x35f750(0x21b)]=_0x116289,_0x525a91['memo']=_0x4c4b3f;const _0x5a4c2a=await this[_0x35f750(0x1d9)+_0x35f750(0x23e)][_0x35f750(0x1e0)+_0x35f750(0x20a)](_0x525a91),_0x33b1dc={};_0x33b1dc[_0x35f750(0x202)]=_0x259bce[_0x35f750(0x206)],_0x33b1dc[_0x35f750(0x22e)]='Security\x20a'+'nalysis\x20ha'+_0x35f750(0x1d7)+_0x35f750(0x1df)+_0x35f750(0x229)+_0x5a4c2a[_0x35f750(0x236)];const _0x38f32d={};_0x38f32d[_0x35f750(0x236)]=_0x5a4c2a[_0x35f750(0x236)],_0x38f32d[_0x35f750(0x20d)]=_0x5a4c2a[_0x35f750(0x20d)];const _0x3a63c9={};return _0x3a63c9[_0x35f750(0x218)]=[_0x33b1dc],_0x3a63c9['structured'+_0x35f750(0x222)]=_0x38f32d,_0x3a63c9;}catch(_0x50e208){logger['error']('File\x20secur'+_0x35f750(0x1e1)+_0x35f750(0x1fe),_0x50e208);const _0x16f93c={};_0x16f93c['type']=_0x35f750(0x22e),_0x16f93c['text']='Security\x20a'+_0x35f750(0x227)+'quest\x20fail'+_0x35f750(0x23c)+(_0x50e208 instanceof Error?_0x50e208[_0x35f750(0x240)]:_0x35f750(0x22b)+_0x35f750(0x210));const _0x1df097={};_0x1df097[_0x35f750(0x1fb)]=_0x50e208 instanceof Error?_0x50e208[_0x35f750(0x240)]:_0x35f750(0x22b)+_0x35f750(0x210);const _0x205af3={};return _0x205af3[_0x35f750(0x218)]=[_0x16f93c],_0x205af3[_0x35f750(0x20e)+_0x35f750(0x222)]=_0x1df097,_0x205af3;}}async[a8_0x4a8303(0x1e0)+a8_0x4a8303(0x200)]({filePaths:_0x32c574,zipFileName:_0x5b5520,memo:_0x1dd8fc}){const _0x311827=a8_0x4a8303;try{if(!_0x32c574||_0x32c574['length']===0x0){const _0x102325={};_0x102325[_0x311827(0x202)]=_0x311827(0x22e),_0x102325[_0x311827(0x22e)]='No\x20files\x20t'+_0x311827(0x234)+'\x20The\x20fileP'+_0x311827(0x217)+_0x311827(0x22a)+'at\x20least\x20o'+_0x311827(0x223)+_0x311827(0x204);const _0x2cd90a={};_0x2cd90a[_0x311827(0x1fb)]='File\x20paths'+_0x311827(0x1ec)+_0x311827(0x1ea);const _0x3281df={};return _0x3281df[_0x311827(0x218)]=[_0x102325],_0x3281df[_0x311827(0x20e)+'Content']=_0x2cd90a,_0x3281df;}logger['info'](_0x311827(0x211)+'\x20security\x20'+_0x311827(0x20b)+_0x311827(0x233)+_0x32c574[_0x311827(0x1d1)]+('\x20file\x20path'+'s'));const _0xceee1f=await this[_0x311827(0x1d9)+_0x311827(0x23e)][_0x311827(0x209)+_0x311827(0x215)+_0x311827(0x1fd)](_0x32c574,_0x5b5520,_0x1dd8fc),_0x55d6fa=_0x311827(0x1f1)+_0x311827(0x207)+_0x311827(0x1d7)+_0x311827(0x1f4)+_0x311827(0x235)+_0x311827(0x203)+_0x32c574[_0x311827(0x1d1)]+(_0x311827(0x1df)+'ID:\x20')+_0xceee1f[_0x311827(0x236)]+_0x311827(0x1ed)+_0xceee1f['status'],_0x1009a7={};_0x1009a7[_0x311827(0x202)]=_0x311827(0x22e),_0x1009a7[_0x311827(0x22e)]=_0x55d6fa;const _0x50d914={};_0x50d914[_0x311827(0x236)]=_0xceee1f[_0x311827(0x236)],_0x50d914[_0x311827(0x20d)]=_0xceee1f[_0x311827(0x20d)],_0x50d914[_0x311827(0x1e5)+_0x311827(0x1f0)]=_0x32c574[_0x311827(0x1d1)];const _0x43a9b7={};return _0x43a9b7[_0x311827(0x218)]=[_0x1009a7],_0x43a9b7['structured'+_0x311827(0x222)]=_0x50d914,_0x43a9b7;}catch(_0x17e198){logger[_0x311827(0x1fb)](_0x311827(0x211)+_0x311827(0x1f5)+'analysis\x20f'+'ailed:',_0x17e198);const _0x23a5ce={};_0x23a5ce[_0x311827(0x202)]=_0x311827(0x22e),_0x23a5ce[_0x311827(0x22e)]=_0x311827(0x1f1)+'nalysis\x20re'+_0x311827(0x1ff)+_0x311827(0x23c)+(_0x17e198 instanceof Error?_0x17e198[_0x311827(0x240)]:'Unknown\x20er'+_0x311827(0x210));const _0x2dddc9={};_0x2dddc9[_0x311827(0x1fb)]=_0x17e198 instanceof Error?_0x17e198[_0x311827(0x240)]:'Unknown\x20er'+_0x311827(0x210);const _0x285ac2={};return _0x285ac2[_0x311827(0x218)]=[_0x23a5ce],_0x285ac2['structured'+'Content']=_0x2dddc9,_0x285ac2;}}async[a8_0x4a8303(0x1f8)+a8_0x4a8303(0x22d)]({folderPath:_0x54151b,zipFileName:_0x1d132e,memo:_0x3e3885}){const _0x3e0a98=a8_0x4a8303,_0x1b7f2a={};_0x1b7f2a[_0x3e0a98(0x21e)]=_0x3e0a98(0x22b)+_0x3e0a98(0x210);const _0x7f89b=_0x1b7f2a;try{if(!_0x54151b||_0x54151b['trim']()[_0x3e0a98(0x1d1)]===0x0){const _0x1c562c={};_0x1c562c[_0x3e0a98(0x202)]=_0x3e0a98(0x22e),_0x1c562c[_0x3e0a98(0x22e)]=_0x3e0a98(0x1da)+'h\x20not\x20prov'+_0x3e0a98(0x1e4);const _0x21ee24={};_0x21ee24['error']=_0x3e0a98(0x1da)+'h\x20not\x20prov'+_0x3e0a98(0x1e3);const _0x2c3b52={};return _0x2c3b52[_0x3e0a98(0x218)]=[_0x1c562c],_0x2c3b52[_0x3e0a98(0x20e)+_0x3e0a98(0x222)]=_0x21ee24,_0x2c3b52;}logger[_0x3e0a98(0x1e8)](_0x3e0a98(0x1de)+_0x3e0a98(0x21d)+_0x3e0a98(0x1fc)+_0x3e0a98(0x1e2)+_0x54151b);const _0x5057b7=await this[_0x3e0a98(0x1d9)+'rvice'][_0x3e0a98(0x1f8)+'der'](_0x54151b,_0x1d132e,_0x3e3885);let _0xb50d73=_0x3e0a98(0x1f1)+_0x3e0a98(0x207)+'s\x20started.'+'\x0aFolder:\x20'+_0x54151b+(_0x3e0a98(0x1df)+_0x3e0a98(0x229))+_0x5057b7[_0x3e0a98(0x236)]+_0x3e0a98(0x1ed)+_0x5057b7[_0x3e0a98(0x20d)];_0x5057b7[_0x3e0a98(0x225)+_0x3e0a98(0x1e9)]&&_0x5057b7[_0x3e0a98(0x225)+_0x3e0a98(0x1e9)][_0x3e0a98(0x1d1)]>0x0&&(_0xb50d73+='\x0a\x0aSkipped\x20'+'folders\x20('+_0x5057b7['skippedFol'+_0x3e0a98(0x1e9)]['length']+_0x3e0a98(0x1dd)+_0x5057b7['skippedFol'+_0x3e0a98(0x1e9)][_0x3e0a98(0x1eb)](',\x20'));const _0x43faeb={};_0x43faeb[_0x3e0a98(0x202)]=_0x3e0a98(0x22e),_0x43faeb[_0x3e0a98(0x22e)]=_0xb50d73;const _0x4321de={};_0x4321de[_0x3e0a98(0x236)]=_0x5057b7[_0x3e0a98(0x236)],_0x4321de[_0x3e0a98(0x20d)]=_0x5057b7[_0x3e0a98(0x20d)],_0x4321de['folderPath']=_0x54151b,_0x4321de[_0x3e0a98(0x225)+_0x3e0a98(0x1e9)]=_0x5057b7[_0x3e0a98(0x225)+_0x3e0a98(0x1e9)];const _0x49c6ed={};return _0x49c6ed[_0x3e0a98(0x218)]=[_0x43faeb],_0x49c6ed[_0x3e0a98(0x20e)+_0x3e0a98(0x222)]=_0x4321de,_0x49c6ed;}catch(_0x49e51d){logger['error'](_0x3e0a98(0x1de)+_0x3e0a98(0x21d)+'ysis\x20faile'+'d:',_0x49e51d);const _0x1b75af={};_0x1b75af[_0x3e0a98(0x202)]=_0x3e0a98(0x22e),_0x1b75af[_0x3e0a98(0x22e)]='Security\x20a'+_0x3e0a98(0x227)+_0x3e0a98(0x1ff)+_0x3e0a98(0x23c)+(_0x49e51d instanceof Error?_0x49e51d[_0x3e0a98(0x240)]:'Unknown\x20er'+'ror');const _0x110b01={};_0x110b01['error']=_0x49e51d instanceof Error?_0x49e51d[_0x3e0a98(0x240)]:_0x7f89b[_0x3e0a98(0x21e)];const _0x21eb31={};return _0x21eb31[_0x3e0a98(0x218)]=[_0x1b75af],_0x21eb31[_0x3e0a98(0x20e)+_0x3e0a98(0x222)]=_0x110b01,_0x21eb31;}}async[a8_0x4a8303(0x212)+'Sast']({zipFilePath:_0x27b1a2,zipFileName:_0x21514e,memo:_0x317912}){const _0x52f863=a8_0x4a8303,_0x35c6b1={};_0x35c6b1[_0x52f863(0x237)]='Unknown\x20er'+_0x52f863(0x210);const _0x328359=_0x35c6b1;try{if(!_0x27b1a2||_0x27b1a2[_0x52f863(0x1dc)]()['length']===0x0){const _0x49afaf={};_0x49afaf['type']=_0x52f863(0x22e),_0x49afaf['text']='ZIP\x20file\x20p'+_0x52f863(0x23d)+_0x52f863(0x1ee);const _0x3ddfb2={};_0x3ddfb2[_0x52f863(0x1fb)]=_0x52f863(0x238)+'ath\x20not\x20pr'+_0x52f863(0x21f);const _0x538229={};return _0x538229['content']=[_0x49afaf],_0x538229['structured'+_0x52f863(0x222)]=_0x3ddfb2,_0x538229;}logger['info'](_0x52f863(0x20f)+_0x52f863(0x1f9)+'alysis\x20req'+'uested:\x20'+_0x27b1a2);const _0x34f70f=await this['analysisSe'+'rvice']['analyzeZip'+_0x52f863(0x1f2)](_0x27b1a2,_0x21514e,_0x317912),_0x1465ef='Security\x20a'+_0x52f863(0x207)+_0x52f863(0x1d7)+'\x0aZIP\x20File:'+'\x20'+_0x27b1a2+(_0x52f863(0x1df)+'ID:\x20')+_0x34f70f[_0x52f863(0x236)]+_0x52f863(0x1ed)+_0x34f70f[_0x52f863(0x20d)],_0x3a8496={};_0x3a8496['type']='text',_0x3a8496[_0x52f863(0x22e)]=_0x1465ef;const _0x1af03b={};_0x1af03b[_0x52f863(0x236)]=_0x34f70f['analysisId'],_0x1af03b[_0x52f863(0x20d)]=_0x34f70f[_0x52f863(0x20d)],_0x1af03b[_0x52f863(0x221)+'h']=_0x27b1a2;const _0x1c1800={};return _0x1c1800[_0x52f863(0x218)]=[_0x3a8496],_0x1c1800[_0x52f863(0x20e)+'Content']=_0x1af03b,_0x1c1800;}catch(_0x3dceaf){logger[_0x52f863(0x1fb)]('ZIP\x20file\x20s'+'ecurity\x20an'+_0x52f863(0x1d0)+_0x52f863(0x23f),_0x3dceaf);const _0x21619e={};_0x21619e[_0x52f863(0x202)]='text',_0x21619e[_0x52f863(0x22e)]=_0x52f863(0x1f1)+_0x52f863(0x227)+_0x52f863(0x1ff)+'ed:\x20'+(_0x3dceaf instanceof Error?_0x3dceaf['message']:'Unknown\x20er'+'ror');const _0x31185f={};_0x31185f[_0x52f863(0x1fb)]=_0x3dceaf instanceof Error?_0x3dceaf['message']:_0x328359[_0x52f863(0x237)];const _0x2eb884={};return _0x2eb884[_0x52f863(0x218)]=[_0x21619e],_0x2eb884[_0x52f863(0x20e)+'Content']=_0x31185f,_0x2eb884;}}}
|