@sparrowai/sparrow-mcp 1.0.11 → 1.1.1
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/.agent/skills/README.md +67 -0
- package/.agent/skills/sparrow-comprehensive-security/SKILL.md +141 -0
- package/.agent/skills/sparrow-fix-vulnerabilities/SKILL.md +101 -0
- package/.agent/skills/sparrow-full-audit/SKILL.md +103 -0
- package/.agent/skills/sparrow-mcp-test/SKILL.md +199 -0
- package/.agent/skills/sparrow-quick-scan/SKILL.md +91 -0
- package/.agent/skills/sparrow-sca-check/SKILL.md +126 -0
- package/README.md +65 -0
- package/bin/sparrow-mcp-test.cjs +29 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/scripts/mcp-test/mcp-client.d.ts +39 -0
- package/dist/scripts/mcp-test/mcp-client.js +1 -0
- package/dist/scripts/test-runner/standalone-test.d.ts +1 -0
- package/dist/scripts/test-runner/standalone-test.js +1 -0
- package/dist/src/config/appConfig.js +1 -0
- package/dist/src/config/constants.d.ts +45 -0
- package/dist/src/config/constants.js +1 -0
- package/dist/src/controllers/__tests__/analysis.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/analysis.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/sast.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/sast.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/sca.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/sca.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/security.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/security.controller.test.js +1 -0
- package/dist/src/controllers/__tests__/system.controller.test.d.ts +1 -0
- package/dist/src/controllers/__tests__/system.controller.test.js +1 -0
- package/dist/src/controllers/analysis.controller.d.ts +150 -0
- package/dist/src/controllers/analysis.controller.js +1 -0
- package/dist/src/controllers/sast.controller.d.ts +109 -0
- package/dist/src/controllers/sast.controller.js +1 -0
- package/dist/src/controllers/sca.controller.d.ts +119 -0
- package/dist/src/controllers/sca.controller.js +1 -0
- package/dist/src/controllers/security.controller.d.ts +30 -0
- package/dist/src/controllers/security.controller.js +1 -0
- package/dist/src/controllers/system.controller.d.ts +2 -0
- package/dist/src/controllers/system.controller.js +1 -0
- package/dist/src/schemas/tool.schemas.d.ts +51 -0
- package/dist/src/schemas/tool.schemas.js +1 -0
- package/dist/src/server.js +2 -0
- package/dist/src/services/__tests__/checker.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/checker.service.test.js +1 -0
- package/dist/src/services/__tests__/llm.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/llm.service.test.js +1 -0
- package/dist/src/services/__tests__/s3.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/s3.service.test.js +1 -0
- package/dist/src/services/__tests__/sparrow.service.test.d.ts +1 -0
- package/dist/src/services/__tests__/sparrow.service.test.js +1 -0
- package/dist/{services → src/services}/analysis.service.d.ts +32 -10
- package/dist/src/services/analysis.service.js +1 -0
- package/dist/src/services/checker.service.d.ts +21 -0
- package/dist/src/services/checker.service.js +1 -0
- package/dist/src/services/llm/AnthropicProvider.d.ts +7 -0
- package/dist/src/services/llm/AnthropicProvider.js +1 -0
- package/dist/src/services/llm/BedrockProvider.d.ts +7 -0
- package/dist/src/services/llm/BedrockProvider.js +1 -0
- package/dist/src/services/llm/GeminiProvider.d.ts +7 -0
- package/dist/src/services/llm/GeminiProvider.js +1 -0
- package/dist/src/services/llm/LLMFactory.d.ts +4 -0
- package/dist/src/services/llm/LLMFactory.js +1 -0
- package/dist/src/services/llm/LLMProvider.d.ts +3 -0
- package/dist/src/services/llm/LLMProvider.js +1 -0
- package/dist/src/services/llm/OllamaProvider.d.ts +7 -0
- package/dist/src/services/llm/OllamaProvider.js +1 -0
- package/dist/src/services/llm/OpenAIProvider.d.ts +7 -0
- package/dist/src/services/llm/OpenAIProvider.js +1 -0
- package/dist/{services → src/services}/llm.service.d.ts +1 -2
- package/dist/src/services/llm.service.js +1 -0
- package/dist/src/services/s3.service.d.ts +33 -0
- package/dist/src/services/s3.service.js +1 -0
- package/dist/{services → src/services}/sparrow.service.d.ts +3 -15
- package/dist/src/services/sparrow.service.js +1 -0
- package/dist/src/types/types.d.ts +186 -0
- package/dist/src/types/types.js +1 -0
- package/dist/src/utils/__tests__/crypto.util.test.d.ts +1 -0
- package/dist/src/utils/__tests__/crypto.util.test.js +1 -0
- package/dist/src/utils/__tests__/diff.util.test.d.ts +1 -0
- package/dist/src/utils/__tests__/diff.util.test.js +1 -0
- package/dist/src/utils/__tests__/fileManager.test.d.ts +1 -0
- package/dist/src/utils/__tests__/fileManager.test.js +1 -0
- package/dist/src/utils/__tests__/fileManagerSecure.test.d.ts +1 -0
- package/dist/src/utils/__tests__/fileManagerSecure.test.js +1 -0
- package/dist/src/utils/__tests__/logger.test.d.ts +1 -0
- package/dist/src/utils/__tests__/logger.test.js +1 -0
- package/dist/src/utils/crypto.util.d.ts +3 -0
- package/dist/src/utils/crypto.util.js +1 -0
- package/dist/src/utils/diff.util.js +1 -0
- package/dist/src/utils/fileManager.d.ts +7 -0
- package/dist/src/utils/fileManager.js +1 -0
- package/dist/src/utils/fileManagerSecure.d.ts +8 -0
- package/dist/src/utils/fileManagerSecure.js +1 -0
- package/dist/src/utils/logger.js +1 -0
- package/package.json +28 -7
- package/test-cases-example.md +97 -0
- package/dist/config/appConfig.js +0 -1
- package/dist/server.js +0 -2
- package/dist/services/analysis.service.js +0 -1
- package/dist/services/llm.service.js +0 -1
- package/dist/services/s3.service.d.ts +0 -75
- package/dist/services/s3.service.js +0 -1
- package/dist/services/sparrow.service.js +0 -1
- package/dist/types/types.d.ts +0 -100
- package/dist/types/types.js +0 -1
- package/dist/utils/crypto.util.d.ts +0 -36
- package/dist/utils/crypto.util.js +0 -1
- package/dist/utils/diff.util.js +0 -1
- package/dist/utils/logger.js +0 -1
- /package/dist/{config → src/config}/appConfig.d.ts +0 -0
- /package/dist/{server.d.ts → src/server.d.ts} +0 -0
- /package/dist/{utils → src/utils}/diff.util.d.ts +0 -0
- /package/dist/{utils → src/utils}/logger.d.ts +0 -0
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CheckerService } from './checker.service.js';
|
|
2
|
+
import { AnalysisRequest, AnalysisResult, MultiFileAnalysisRequest, ScaAnalysisResult } from '../types/types.js';
|
|
2
3
|
export declare class AnalysisService {
|
|
3
4
|
private llmService;
|
|
4
5
|
private sparrowService;
|
|
5
6
|
private s3Service;
|
|
7
|
+
private checkerService;
|
|
8
|
+
private scaResultsCache;
|
|
6
9
|
constructor();
|
|
10
|
+
initializeCheckerService(): Promise<void>;
|
|
11
|
+
getCheckerService(): CheckerService;
|
|
7
12
|
analyzeFileSecurity(request: AnalysisRequest): Promise<{
|
|
8
13
|
analysisId: string;
|
|
9
14
|
status: string;
|
|
@@ -27,26 +32,43 @@ export declare class AnalysisService {
|
|
|
27
32
|
analysisId: string;
|
|
28
33
|
status: string;
|
|
29
34
|
}>;
|
|
30
|
-
/**
|
|
31
|
-
* 파일 경로를 받아서 직접 압축하고 분석 요청
|
|
32
|
-
*/
|
|
33
35
|
analyzeMultipleFilesFromPaths(filePaths: string[], zipFileName?: string): Promise<{
|
|
34
36
|
analysisId: string;
|
|
35
37
|
status: string;
|
|
36
38
|
}>;
|
|
37
|
-
/**
|
|
38
|
-
* ZIP 파일 경로를 받아서 스토리지에 업로드하고 분석 요청
|
|
39
|
-
*/
|
|
40
39
|
analyzeZipFile(zipFilePath: string, zipFileName?: string): Promise<{
|
|
41
40
|
analysisId: string;
|
|
42
41
|
status: string;
|
|
43
42
|
}>;
|
|
44
|
-
/**
|
|
45
|
-
* 폴더 경로를 받아서 폴더 전체를 압축하고 분석 요청
|
|
46
|
-
*/
|
|
47
43
|
analyzeFolder(folderPath: string, zipFileName?: string): Promise<{
|
|
48
44
|
analysisId: string;
|
|
49
45
|
status: string;
|
|
46
|
+
skippedFolders?: string[];
|
|
47
|
+
}>;
|
|
48
|
+
analyzeFileSca(filePath: string, zipFileName?: string): Promise<{
|
|
49
|
+
analysisId: string;
|
|
50
|
+
status: string;
|
|
51
|
+
analysisType: string;
|
|
52
|
+
}>;
|
|
53
|
+
analyzeFilesSca(filePaths: string[], zipFileName?: string): Promise<{
|
|
54
|
+
analysisId: string;
|
|
55
|
+
status: string;
|
|
56
|
+
analysisType: string;
|
|
57
|
+
}>;
|
|
58
|
+
analyzeFolderSca(folderPath: string, zipFileName?: string): Promise<{
|
|
59
|
+
analysisId: string;
|
|
60
|
+
status: string;
|
|
61
|
+
analysisType: string;
|
|
62
|
+
skippedFolders?: string[];
|
|
63
|
+
}>;
|
|
64
|
+
analyzeZipSca(zipFilePath: string, zipFileName?: string): Promise<{
|
|
65
|
+
analysisId: string;
|
|
66
|
+
status: string;
|
|
67
|
+
analysisType: string;
|
|
50
68
|
}>;
|
|
51
69
|
private mapSeverity;
|
|
70
|
+
getScaAnalysisResults(analysisId: string): Promise<ScaAnalysisResult>;
|
|
71
|
+
private parseScaComponents;
|
|
72
|
+
private mapScaSeverity;
|
|
73
|
+
private generateScaReportBrief;
|
|
52
74
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a16_0x269f53=a16_0x21bd;(function(_0x1ffeba,_0x5aeb8c){const _0x84e13b=a16_0x21bd,_0xad2068=_0x1ffeba();while(!![]){try{const _0x1c270b=-parseInt(_0x84e13b(0x252))/0x1*(-parseInt(_0x84e13b(0x1dd))/0x2)+parseInt(_0x84e13b(0x1c9))/0x3+-parseInt(_0x84e13b(0x2a7))/0x4+parseInt(_0x84e13b(0x2cb))/0x5*(-parseInt(_0x84e13b(0x1fc))/0x6)+parseInt(_0x84e13b(0x1b2))/0x7+-parseInt(_0x84e13b(0x1da))/0x8+parseInt(_0x84e13b(0x25f))/0x9*(parseInt(_0x84e13b(0x2c8))/0xa);if(_0x1c270b===_0x5aeb8c)break;else _0xad2068['push'](_0xad2068['shift']());}catch(_0x2516ff){_0xad2068['push'](_0xad2068['shift']());}}}(a16_0x21d5,0x7b39d));const a16_0x48c40b=(function(){let _0xa1b505=!![];return function(_0x73859a,_0x639499){const _0x415e06=_0xa1b505?function(){const _0x48cd6=a16_0x21bd;if(_0x639499){const _0x43614b=_0x639499[_0x48cd6(0x253)](_0x73859a,arguments);return _0x639499=null,_0x43614b;}}:function(){};return _0xa1b505=![],_0x415e06;};}()),a16_0x290a4c=a16_0x48c40b(this,function(){const _0x136e5b=a16_0x21bd;return a16_0x290a4c['toString']()[_0x136e5b(0x221)](_0x136e5b(0x1b0)+'+$')[_0x136e5b(0x2ae)]()[_0x136e5b(0x1e6)+'r'](a16_0x290a4c)[_0x136e5b(0x221)](_0x136e5b(0x1b0)+'+$');});a16_0x290a4c();import{LLMService}from'./llm.service.js';import{SparrowService}from'./sparrow.service.js';import{S3Service}from'./s3.service.js';import{CheckerService}from'./checker.service.js';import{DiffUtil}from'../utils/diff.util.js';function a16_0x21bd(_0x55afec,_0x4e7274){_0x55afec=_0x55afec-0x1ad;const _0x70a1db=a16_0x21d5();let _0x290a4c=_0x70a1db[_0x55afec];return _0x290a4c;}import{logger}from'../utils/logger.js';import a16_0x19795e from'path';function a16_0x21d5(){const _0x48e595=['string','url','ders','\x20시작:\x20','OykPJ','ArZNx','식별된\x20컴포넌트\x20','tipleFiles','폴더\x20경로가\x20제공되','MYvNd','fixedVersi','양호.','캐시\x20히트:\x20','vulnerabil','석\x20요청\x20실패:','rabilities','s3Key','완료되지\x20않았습니다','RkUNQ','contexts','ate','mponents','key','toUpperCas','데이트\x20권장.','중지\x20요청을\x20받아\x20','analyzeFil','ifiedDiff','5khTsSK','apply','mapSeverit','failed','koeWA','Sca','STOP','pollAnalys','안\x20분석\x20요청\x20실패','ief','완료되었습니다.','der','issues','63ZKcvOa','completed','isCompleti','POST_PROCE','PRE_PROCES','Details:\x20','\x20실패:\x20','READY','eSca','checkerKey','OUJjX','분석이\x20실패했습니다','SCA\x20분석\x20요청\x20','사용\x20라이선스:\x20','enrichVuln','alysisBrie','Line:\x20','폴더\x20기반\x20보안\x20분','FWLVQ','descriptio','getAnalysi','name','severity','드\x20실패:\x20','폴더\x20기반\x20SCA\x20','filePaths','totalVulne','Service','set','lysis','generateAn','분석을\x20올바르게\x20완','다중\x20파일\x20분석\x20요','분석이\x20진행\x20중입니','uploadFold','requestId','YTDTX','NqBHN','analysisId','준비\x20중입니다.','cureCode','분석\x20결과\x20다운로드','criticalCo','error','시작:\x20','ysisResult','slice','폴더\x20압축\x20및\x20업로','downloadAn','publishedD','vice','licenses','분석\x20브리핑\x20생성에','getChecker','SCA','FAIL','Uri','완료:\x20','erabilitie','분석\x20상태\x20조회\x20실','generateSe','result','파일\x20경로\x20기반\x20분','requestAna','tical:\x20','분석할\x20파일\x20경로가','File:\x20','개\x20취약점','.\x20result=','UNKNOWN','파일\x20업로드\x20실패:','diff','920172IHeXXP','number','has','sStatus','분석이\x20완료되었습니','생성\x20완료:\x20','zipFileNam','toString','folder.zip','analyzeZip','취약점이\x20발견되었습','개\x20컴포넌트,\x20','derSca',',\x20Low:\x20','폴더\x20기반\x20분석\x20요','ANALYSIS','files','ZIP\x20파일\x20경로가','File','summary','skippedFol','scaResults','status','fileName','\x20->\x20실제\x20','requestSca','분석이\x20성공적으로\x20','kbRuP','xSNho','analyzeMul','mediumCoun','HIGH','ZIP\x20파일\x20업로드','2276500AmXkJu','Security','content','125CoKGrD','지\x20않았습니다.','bbrnb','size','confidence','rabilityDe','xNqxi','mapScaSeve','method','한\x20상태입니다.','basename','filter','SCA\x20분석\x20결과\x20','\x20아니므로\x20안전한\x20','uploadMult','secureCode','Score','checkerSer','LOW','buildVulne','sion','score','analyzeFol','라이브러리\x20버전\x20업','risk','OOMXo','(((.+)+)+)','전처리\x20중입니다.','875728gsaMNy','분석\x20요청\x20실패:','QIkdL','\x20(SUCCESS가','안전한\x20코드\x20생성\x20','KeDsO','분석\x20요청\x20완료:\x20','scription','version','FromPaths','없습니다.)','generateSc','fileConten','getScaAnal','석\x20시작:\x20','success','Brief','전반적\x20보안\x20상태\x20','단일\x20파일\x20SCA\x20','조회:\x20','파일\x20경로\x20기반\x20다','조치\x20권장:\x20보안\x20','cureCodeBr','191505MdDqfm','초기화\x20중입니다.','highCount','push','analysisTy','from','분석\x20시작:\x20','rity','COMPLETE','sWithCheck','llmService','\x20생성에\x20실패했습니','JWENB','Analysis','료하지\x20못하고\x20실패','개\x20파일\x20경로','spdxId','5218104QmaneH','aReportBri','\x20제공되지\x20않았습니','13080NCmLeB','Unknown','개에서\x20취약점\x20발견','ile','NrHTJ','\x20없습니다.','개\x20취약점\x20발견\x20(','실패:','initialize','constructo','INFO','cvssScore',').\x20','분석\x20결과\x20조회:\x20','개\x20취약점\x20(Cri','업데이트\x20검토\x20필요','SUCCESS','pehmp','SCA\x20분석\x20시작:','분석\x20중입니다.','보안\x20분석\x20요청\x20실','석\x20요청\x20완료:\x20','alysisResu','지:\x20원본\x20','parseScaCo','Cache','ities','input.zip','YhQIU','니다.','unt','102756DrgHZS','join','uploadFile','ZIP\x20파일\x20기반\x20','eSecurity','isArray','patchedVer','s3Service','파일\x20경로\x20기반\x20S','uploadZipF','MEDIUM','analysisBr','eventMsgs','repository','erAsZip','omAnalysis','sFromPaths','료:\x20','개\x20중\x20','lts','보안\x20분석\x20시작:\x20','cureCodeFr','CRITICAL','add','sparrowSer','입니다.','messages','청\x20완료:\x20','erInfo','INIT','\x20실패했습니다.','length','완료\x20(분석\x20ID:','filePath','esSca','zFiwf','sResults','search','다운로드\x20시작:\x20','CA\x20분석\x20요청\x20완','lineNumber','matchType','분석할\x20파일이\x20없습','yFromRisk','components','Method:\x20','ipleFiles','jMBAi','설명\x20없음','info','purl','cveId','parseVulne','다중\x20파일\x20보안\x20분','Checker:\x20','분석\x20결과\x20생성\x20완','code.java','\x20외\x20'];a16_0x21d5=function(){return _0x48e595;};return a16_0x21d5();}export class AnalysisService{[a16_0x269f53(0x1d3)];[a16_0x269f53(0x214)+'vice'];[a16_0x269f53(0x203)];[a16_0x269f53(0x2dc)+'vice'];[a16_0x269f53(0x2bc)+a16_0x269f53(0x1f6)]=new Map();constructor(){const _0x17ed43=a16_0x269f53;this[_0x17ed43(0x1d3)]=new LLMService(),this[_0x17ed43(0x214)+_0x17ed43(0x291)]=new SparrowService(),this[_0x17ed43(0x203)]=new S3Service(),this['checkerSer'+_0x17ed43(0x291)]=new CheckerService();}async[a16_0x269f53(0x1e5)+'CheckerSer'+a16_0x269f53(0x291)](){const _0x3c1d08=a16_0x269f53;await this[_0x3c1d08(0x2dc)+_0x3c1d08(0x291)][_0x3c1d08(0x1e5)]();}[a16_0x269f53(0x294)+a16_0x269f53(0x27a)](){const _0x6d4007=a16_0x269f53;return this[_0x6d4007(0x2dc)+'vice'];}async[a16_0x269f53(0x250)+a16_0x269f53(0x200)](_0x1ec20a){const _0x160d48=a16_0x269f53;try{logger[_0x160d48(0x22d)](_0x160d48(0x210)+_0x1ec20a[_0x160d48(0x2be)]);const _0x5e37a6=await this[_0x160d48(0x203)][_0x160d48(0x1fe)](_0x1ec20a[_0x160d48(0x1be)+'t'],_0x1ec20a[_0x160d48(0x2be)]);if(!_0x5e37a6[_0x160d48(0x1c1)])throw new Error(_0x160d48(0x2a5)+'\x20'+_0x5e37a6['error']);const _0xb3ef6b={};_0xb3ef6b[_0x160d48(0x2be)]=_0x1ec20a[_0x160d48(0x2be)],_0xb3ef6b[_0x160d48(0x1be)+'t']=_0x1ec20a['fileConten'+'t'],_0xb3ef6b[_0x160d48(0x246)]=_0x5e37a6[_0x160d48(0x24c)];const _0x33a91a=_0xb3ef6b,_0x2c791d=await this['sparrowSer'+_0x160d48(0x291)][_0x160d48(0x29e)+_0x160d48(0x27c)](_0x33a91a);logger[_0x160d48(0x22d)]('분석\x20요청\x20완료:\x20'+_0x2c791d[_0x160d48(0x282)]);const _0x2c2023={};return _0x2c2023[_0x160d48(0x285)]=_0x2c791d[_0x160d48(0x285)]||_0x2c791d[_0x160d48(0x282)],_0x2c2023[_0x160d48(0x2bd)]=_0x2c791d[_0x160d48(0x2bd)],_0x2c2023;}catch(_0x1154ab){logger[_0x160d48(0x28a)]('보안\x20분석\x20요청\x20실'+'패:',_0x1154ab);throw _0x1154ab;}}async['getAnalysi'+a16_0x269f53(0x2aa)](_0x5ff9b2){const _0x2d0513=a16_0x269f53,_0x30440b={'KXIlE':function(_0x2190b1,_0x2ecc79){return _0x2190b1(_0x2ecc79);},'OOMXo':_0x2d0513(0x219),'zFiwf':_0x2d0513(0x1d1),'QIkdL':'분석이\x20실패했습니다'+'.'};try{const _0x193b9b=await this[_0x2d0513(0x214)+_0x2d0513(0x291)]['getAnalysi'+_0x2d0513(0x2aa)](_0x5ff9b2);let _0x2e3595=_0x193b9b['progress'];if(_0x2e3595===undefined){const _0x3f5a32=_0x30440b['KXIlE'](String,_0x193b9b['status'])[_0x2d0513(0x24d)+'e']();if(_0x3f5a32===_0x2d0513(0x1d1))_0x2e3595=0x64;else{if(_0x3f5a32===_0x2d0513(0x2b6))_0x2e3595=undefined;else{if(_0x3f5a32===_0x30440b[_0x2d0513(0x1af)]||_0x3f5a32==='READY')_0x2e3595=0x0;else{if(_0x3f5a32===_0x2d0513(0x263)+'S')_0x2e3595=0xa;else _0x3f5a32===_0x2d0513(0x262)+'SS'&&(_0x2e3595=0x5a);}}}}const _0x48ec4c=String(_0x193b9b[_0x2d0513(0x2bd)])[_0x2d0513(0x24d)+'e']();let _0x1b5db0;if(_0x48ec4c===_0x30440b[_0x2d0513(0x21f)]){const _0x437fa8=_0x193b9b[_0x2d0513(0x29c)]?String(_0x193b9b[_0x2d0513(0x29c)])[_0x2d0513(0x24d)+'e']():undefined;if(_0x437fa8===_0x2d0513(0x1ed))_0x1b5db0='분석이\x20성공적으로\x20'+_0x2d0513(0x25c);else{if(_0x437fa8===_0x2d0513(0x296))_0x1b5db0=_0x2d0513(0x27e)+_0x2d0513(0x1d7)+_0x2d0513(0x2d4);else _0x437fa8===_0x2d0513(0x258)?_0x1b5db0=_0x2d0513(0x24f)+'분석이\x20중지된\x20상태'+_0x2d0513(0x215):_0x1b5db0=_0x2d0513(0x2ab)+'다.';}}else{const _0x37d5b0={};_0x37d5b0[_0x2d0513(0x219)]=_0x2d0513(0x1ca),_0x37d5b0[_0x2d0513(0x266)]=_0x2d0513(0x286),_0x37d5b0[_0x2d0513(0x263)+'S']=_0x2d0513(0x1b1),_0x37d5b0[_0x2d0513(0x2b6)]=_0x2d0513(0x1f0),_0x37d5b0[_0x2d0513(0x262)+'SS']='후처리\x20중입니다.',_0x37d5b0[_0x2d0513(0x296)]=_0x2d0513(0x26a)+'.',_0x37d5b0['FAILED']=_0x30440b[_0x2d0513(0x1b4)];const _0x2b600e=_0x37d5b0;_0x1b5db0=_0x2b600e[_0x48ec4c]||_0x2d0513(0x280)+'다.';}let _0x37eda2=_0x193b9b[_0x2d0513(0x2bd)];_0x48ec4c==='COMPLETE'&&_0x193b9b[_0x2d0513(0x29c)]&&(_0x37eda2=_0x193b9b['result']);const _0x5294fd={};return _0x5294fd['status']=_0x37eda2,_0x5294fd[_0x2d0513(0x29c)]=_0x193b9b['result'],_0x5294fd['progress']=_0x2e3595,_0x5294fd['message']=_0x1b5db0,_0x5294fd;}catch(_0x1fb681){logger[_0x2d0513(0x28a)](_0x2d0513(0x29a)+'패:',_0x1fb681);throw _0x1fb681;}}async[a16_0x269f53(0x273)+a16_0x269f53(0x220)](_0x2145ae){const _0x31df97=a16_0x269f53;try{logger[_0x31df97(0x22d)](_0x31df97(0x1ea)+_0x2145ae);const _0x3cbdf4=await this[_0x31df97(0x214)+_0x31df97(0x291)][_0x31df97(0x259)+'isCompleti'+'on'](_0x2145ae),_0x5498c7=_0x3cbdf4[_0x31df97(0x29c)]?String(_0x3cbdf4[_0x31df97(0x29c)])[_0x31df97(0x24d)+'e']():undefined;let _0x4ad756;_0x5498c7===_0x31df97(0x296)||_0x5498c7===_0x31df97(0x258)?_0x4ad756=_0x31df97(0x255):_0x4ad756=_0x31df97(0x260);const _0x465b8d=_0x3cbdf4['analysisId']||_0x2145ae;_0x465b8d!==_0x2145ae&&logger['info']('분석\x20ID\x20변경\x20감'+_0x31df97(0x1f4)+_0x2145ae+_0x31df97(0x2bf)+_0x465b8d);logger['info']('분석\x20결과\x20다운로드'+'\x20시작:\x20'+_0x465b8d);const _0x2f8fc1=await this[_0x31df97(0x214)+_0x31df97(0x291)]['downloadAn'+_0x31df97(0x1f3)+_0x31df97(0x20f)](_0x465b8d),_0x85da8e=this[_0x31df97(0x230)+_0x31df97(0x245)](_0x2f8fc1),_0x5e70e9=this['checkerSer'+_0x31df97(0x291)][_0x31df97(0x26d)+_0x31df97(0x299)+_0x31df97(0x1d2)+_0x31df97(0x218)](_0x85da8e,'ko'),_0x279af6=await this['llmService'][_0x31df97(0x27d)+_0x31df97(0x26e)+'f'](_0x2f8fc1),_0x132cff=_0x279af6[_0x31df97(0x1c1)]?_0x279af6[_0x31df97(0x2ca)]:_0x31df97(0x293)+_0x31df97(0x21a);logger[_0x31df97(0x22d)](_0x31df97(0x233)+_0x31df97(0x20d)+_0x85da8e[_0x31df97(0x21b)]+(_0x31df97(0x1e3)+'분석\x20ID:\x20')+_0x465b8d+')');const _0x2ab04d={};return _0x2ab04d[_0x31df97(0x285)]=_0x465b8d,_0x2ab04d[_0x31df97(0x2bd)]=_0x4ad756,_0x2ab04d['result']=_0x5498c7,_0x2ab04d[_0x31df97(0x243)+_0x31df97(0x1f7)]=_0x5e70e9,_0x2ab04d[_0x31df97(0x207)+_0x31df97(0x25b)]=_0x132cff,_0x2ab04d;}catch(_0x4156cd){if(_0x31df97(0x1f9)===_0x31df97(0x1f9)){logger[_0x31df97(0x28a)]('분석\x20결과\x20조회\x20실'+'패:',_0x4156cd);throw _0x4156cd;}else _0x3b9229[_0x31df97(0x1cc)](_0x1d20a8['message']);}}async['generateSe'+a16_0x269f53(0x211)+a16_0x269f53(0x20b)](_0x2fb59d,_0x595a37){const _0x5d1430=a16_0x269f53,_0x154ebb={};_0x154ebb[_0x5d1430(0x2d1)]='안전한\x20코드\x20브리핑'+_0x5d1430(0x1d4)+'다.';const _0x1e7952=_0x154ebb;try{logger[_0x5d1430(0x22d)]('안전한\x20코드\x20생성\x20'+_0x5d1430(0x28b)+_0x2fb59d);const _0xe2fc0=await this[_0x5d1430(0x214)+_0x5d1430(0x291)][_0x5d1430(0x259)+_0x5d1430(0x261)+'on'](_0x2fb59d),_0x672115=_0xe2fc0['result']?String(_0xe2fc0[_0x5d1430(0x29c)])[_0x5d1430(0x24d)+'e']():undefined;if(_0x672115&&_0x672115!==_0x5d1430(0x1ed))throw new Error(_0x5d1430(0x2c1)+_0x5d1430(0x247)+_0x5d1430(0x2a3)+_0x672115+(_0x5d1430(0x1b5)+_0x5d1430(0x2d8)+'코드를\x20생성할\x20수\x20'+_0x5d1430(0x1bc)));const _0x403806=_0xe2fc0[_0x5d1430(0x285)]||_0x2fb59d;logger['info'](_0x5d1430(0x288)+'\x20시작:\x20'+_0x403806);const _0x148163=await this['sparrowSer'+_0x5d1430(0x291)][_0x5d1430(0x28f)+_0x5d1430(0x1f3)+_0x5d1430(0x20f)](_0x403806),_0x3fffaf=this[_0x5d1430(0x230)+_0x5d1430(0x245)](_0x148163),_0x32fcf5=await this['llmService'][_0x5d1430(0x29b)+_0x5d1430(0x287)](_0x595a37,_0x3fffaf),_0x27569d=_0x32fcf5[_0x5d1430(0x1c1)]?_0x32fcf5[_0x5d1430(0x2ca)]:_0x595a37,_0x525551=await this[_0x5d1430(0x1d3)][_0x5d1430(0x29b)+_0x5d1430(0x1c8)+_0x5d1430(0x25b)](_0x595a37,_0x27569d),_0x1dd5cd=_0x525551['success']?_0x525551['content']:_0x1e7952['xNqxi'],_0x231d64=DiffUtil['generateUn'+_0x5d1430(0x251)](_0x595a37,_0x27569d,_0x5d1430(0x234));logger[_0x5d1430(0x22d)](_0x5d1430(0x1b6)+_0x5d1430(0x21c)+'\x20'+_0x403806+')');const _0x2e0470={};return _0x2e0470[_0x5d1430(0x2da)]=_0x27569d,_0x2e0470[_0x5d1430(0x2da)+_0x5d1430(0x1c2)]=_0x1dd5cd,_0x2e0470[_0x5d1430(0x2a6)]=_0x231d64,_0x2e0470;}catch(_0x2db1bc){logger[_0x5d1430(0x28a)](_0x5d1430(0x1b6)+_0x5d1430(0x1e4),_0x2db1bc);throw _0x2db1bc;}}['parseVulne'+a16_0x269f53(0x245)](_0xa0e072){const _0x24179c=a16_0x269f53,_0x4d5b23=[];for(const _0x12fb25 of _0xa0e072){if(Array[_0x24179c(0x201)](_0x12fb25))for(const _0x1748d6 of _0x12fb25){_0x1748d6['checkerKey']&&_0x4d5b23[_0x24179c(0x1cc)]({'checkerKey':_0x1748d6['checkerKey']||'UNKNOWN','description':this['buildVulne'+_0x24179c(0x2d0)+'scription'](_0x1748d6),'severity':this[_0x24179c(0x254)+_0x24179c(0x227)](_0x1748d6[_0x24179c(0x1ae)]),'lineNumber':_0x1748d6['lineNumber'],'filePath':_0x1748d6['filePaths']&&_0x1748d6['filePaths']['length']>0x0?_0x1748d6['filePaths'][0x0]:undefined});}else{if(_0x12fb25[_0x24179c(0x243)+_0x24179c(0x1f7)]&&Array['isArray'](_0x12fb25[_0x24179c(0x243)+'ities']))for(const _0x1d2ae5 of _0x12fb25[_0x24179c(0x243)+_0x24179c(0x1f7)]){_0x4d5b23[_0x24179c(0x1cc)]({'checkerKey':_0x1d2ae5[_0x24179c(0x268)]||_0x24179c(0x2a4),'description':_0x1d2ae5[_0x24179c(0x272)+'n']||_0x1d2ae5['message']||_0x24179c(0x22c),'severity':this[_0x24179c(0x254)+'y'](_0x1d2ae5[_0x24179c(0x275)]),'lineNumber':_0x1d2ae5[_0x24179c(0x224)],'filePath':_0x1d2ae5[_0x24179c(0x21d)]});}}}return _0x4d5b23;}[a16_0x269f53(0x2de)+a16_0x269f53(0x2d0)+a16_0x269f53(0x1b9)](_0x4cc64c){const _0x1f64d7=a16_0x269f53,_0x1e1e8a=[];_0x4cc64c[_0x1f64d7(0x268)]&&_0x1e1e8a[_0x1f64d7(0x1cc)]('Checker:\x20'+_0x4cc64c[_0x1f64d7(0x268)]);_0x4cc64c[_0x1f64d7(0x2d3)]&&_0x1e1e8a[_0x1f64d7(0x1cc)](_0x1f64d7(0x229)+_0x4cc64c['method']);if(_0x4cc64c[_0x1f64d7(0x278)]&&_0x4cc64c[_0x1f64d7(0x278)][_0x1f64d7(0x21b)]>0x0){if(_0x1f64d7(0x1b7)!=='KeDsO')throw new _0x3ec036(_0x1f64d7(0x2c7)+_0x1f64d7(0x265)+_0x3e36b7[_0x1f64d7(0x28a)]);else _0x1e1e8a['push'](_0x1f64d7(0x2a1)+_0x4cc64c[_0x1f64d7(0x278)][0x0]);}_0x4cc64c[_0x1f64d7(0x224)]&&_0x1e1e8a[_0x1f64d7(0x1cc)](_0x1f64d7(0x26f)+_0x4cc64c['lineNumber']);_0x4cc64c[_0x1f64d7(0x1ae)]&&_0x1e1e8a[_0x1f64d7(0x1cc)]('Risk\x20Level'+':\x20'+_0x4cc64c[_0x1f64d7(0x1ae)]);if(_0x4cc64c[_0x1f64d7(0x249)]&&Array[_0x1f64d7(0x201)](_0x4cc64c[_0x1f64d7(0x249)])){const _0x768a31=[];for(const _0x3b7c4c of _0x4cc64c[_0x1f64d7(0x249)]){if(_0x3b7c4c[_0x1f64d7(0x208)]&&Array[_0x1f64d7(0x201)](_0x3b7c4c['eventMsgs']))for(const _0x7090f of _0x3b7c4c['eventMsgs']){if(_0x7090f['messages']&&Array[_0x1f64d7(0x201)](_0x7090f[_0x1f64d7(0x216)]))for(const _0x4fc93a of _0x7090f[_0x1f64d7(0x216)]){_0x4fc93a['message']&&_0x768a31[_0x1f64d7(0x1cc)](_0x4fc93a['message']);}}}_0x768a31[_0x1f64d7(0x21b)]>0x0&&_0x1e1e8a['push'](_0x1f64d7(0x264)+_0x768a31[_0x1f64d7(0x1fd)](';\x20'));}return _0x1e1e8a[_0x1f64d7(0x21b)]>0x0?_0x1e1e8a[_0x1f64d7(0x1fd)](',\x20'):_0x1f64d7(0x2b1)+_0x1f64d7(0x1fa);}[a16_0x269f53(0x254)+a16_0x269f53(0x227)](_0x5cbffa){const _0x4605ca=a16_0x269f53,_0x32daf9={};_0x32daf9['xSNho']='LOW';const _0x1c7df4=_0x32daf9,_0x106fc8=typeof _0x5cbffa===_0x4605ca(0x236)?parseInt(_0x5cbffa):_0x5cbffa;if(_0x106fc8<=0x2)return'HIGH';else return _0x106fc8===0x3?_0x4605ca(0x206):_0x1c7df4[_0x4605ca(0x2c3)];}async[a16_0x269f53(0x2c4)+a16_0x269f53(0x23d)+a16_0x269f53(0x2c9)](_0x45ec62){const _0x1c7aa9=a16_0x269f53;try{logger['info'](_0x1c7aa9(0x231)+_0x1c7aa9(0x1c0)+_0x45ec62['files'][_0x1c7aa9(0x21b)]+'개\x20파일');if(!_0x45ec62[_0x1c7aa9(0x2b7)]||_0x45ec62['files']['length']===0x0)throw new Error(_0x1c7aa9(0x226)+'니다.');const _0x25e188=await this[_0x1c7aa9(0x203)][_0x1c7aa9(0x2d9)+_0x1c7aa9(0x22a)](_0x45ec62[_0x1c7aa9(0x2b7)],_0x45ec62[_0x1c7aa9(0x2ad)+'e']);if(!_0x25e188['success'])throw new Error(_0x1c7aa9(0x2a5)+'\x20'+_0x25e188[_0x1c7aa9(0x28a)]);const _0x1e34f2=_0x45ec62['files'][0x0]?.[_0x1c7aa9(0x2be)]||_0x1c7aa9(0x1f8),_0x2bf7f3={};_0x2bf7f3[_0x1c7aa9(0x2be)]=_0x45ec62[_0x1c7aa9(0x2ad)+'e']||_0x1e34f2,_0x2bf7f3[_0x1c7aa9(0x1be)+'t']='',_0x2bf7f3['s3Key']=_0x25e188[_0x1c7aa9(0x24c)];const _0x5a353d=_0x2bf7f3,_0xda9338=await this[_0x1c7aa9(0x214)+_0x1c7aa9(0x291)][_0x1c7aa9(0x29e)+_0x1c7aa9(0x27c)](_0x5a353d);logger[_0x1c7aa9(0x22d)](_0x1c7aa9(0x27f)+_0x1c7aa9(0x217)+_0xda9338[_0x1c7aa9(0x282)]);const _0x3a40fc={};return _0x3a40fc[_0x1c7aa9(0x285)]=_0xda9338['analysisId']||_0xda9338[_0x1c7aa9(0x282)],_0x3a40fc[_0x1c7aa9(0x2bd)]=_0xda9338[_0x1c7aa9(0x2bd)],_0x3a40fc;}catch(_0x157cd0){logger[_0x1c7aa9(0x28a)]('다중\x20파일\x20보안\x20분'+_0x1c7aa9(0x244),_0x157cd0);throw _0x157cd0;}}async[a16_0x269f53(0x2c4)+a16_0x269f53(0x23d)+a16_0x269f53(0x1bb)](_0x2a114b,_0x47302a){const _0x41f0e5=a16_0x269f53;try{logger[_0x41f0e5(0x22d)](_0x41f0e5(0x1c6)+'중\x20파일\x20보안\x20분석'+_0x41f0e5(0x239)+_0x2a114b[_0x41f0e5(0x21b)]+_0x41f0e5(0x1d8));if(!_0x2a114b||_0x2a114b['length']===0x0)throw new Error('분석할\x20파일\x20경로가'+_0x41f0e5(0x1e2));const _0x2c181c=await this[_0x41f0e5(0x203)]['uploadFile'+_0x41f0e5(0x20c)](_0x2a114b,_0x47302a);if(!_0x2c181c[_0x41f0e5(0x1c1)])throw new Error(_0x41f0e5(0x2a5)+'\x20'+_0x2c181c[_0x41f0e5(0x28a)]);const _0x366918=a16_0x19795e[_0x41f0e5(0x2d5)](_0x2a114b[0x0])||_0x41f0e5(0x1f8),_0x18171d={};_0x18171d[_0x41f0e5(0x2be)]=_0x47302a||_0x366918,_0x18171d[_0x41f0e5(0x1be)+'t']='',_0x18171d['s3Key']=_0x2c181c[_0x41f0e5(0x24c)];const _0x2e43e6=_0x18171d,_0x4bb708=await this[_0x41f0e5(0x214)+_0x41f0e5(0x291)][_0x41f0e5(0x29e)+_0x41f0e5(0x27c)](_0x2e43e6);logger[_0x41f0e5(0x22d)](_0x41f0e5(0x29d)+_0x41f0e5(0x1f2)+_0x4bb708[_0x41f0e5(0x282)]);const _0x4e8cb8={};return _0x4e8cb8[_0x41f0e5(0x285)]=_0x4bb708['analysisId']||_0x4bb708[_0x41f0e5(0x282)],_0x4e8cb8[_0x41f0e5(0x2bd)]=_0x4bb708[_0x41f0e5(0x2bd)],_0x4e8cb8;}catch(_0x32536c){logger['error']('파일\x20경로\x20기반\x20보'+_0x41f0e5(0x25a)+':',_0x32536c);throw _0x32536c;}}async[a16_0x269f53(0x2b0)+a16_0x269f53(0x2b9)](_0x5caefc,_0x3cd193){const _0x275246=a16_0x269f53;try{logger['info'](_0x275246(0x1ff)+_0x275246(0x210)+_0x5caefc);if(!_0x5caefc)throw new Error('ZIP\x20파일\x20경로가'+_0x275246(0x1dc)+'다.');const _0x432c80=await this[_0x275246(0x203)][_0x275246(0x205)+_0x275246(0x1e0)](_0x5caefc);if(!_0x432c80[_0x275246(0x1c1)])throw new Error(_0x275246(0x2c7)+_0x275246(0x265)+_0x432c80[_0x275246(0x28a)]);const _0x4c5604=_0x3cd193||a16_0x19795e[_0x275246(0x2d5)](_0x5caefc)||'input.zip',_0x4978f2={};_0x4978f2[_0x275246(0x2be)]=_0x4c5604,_0x4978f2[_0x275246(0x1be)+'t']='',_0x4978f2[_0x275246(0x246)]=_0x432c80['key'];const _0x43c40b=_0x4978f2,_0x43010b=await this[_0x275246(0x214)+'vice'][_0x275246(0x29e)+'lysis'](_0x43c40b);logger[_0x275246(0x22d)](_0x275246(0x1ff)+'분석\x20요청\x20완료:\x20'+_0x43010b[_0x275246(0x282)]);const _0x524374={};return _0x524374['analysisId']=_0x43010b[_0x275246(0x285)]||_0x43010b[_0x275246(0x282)],_0x524374['status']=_0x43010b[_0x275246(0x2bd)],_0x524374;}catch(_0x29d87b){logger[_0x275246(0x28a)](_0x275246(0x1ff)+_0x275246(0x1f1)+'패:',_0x29d87b);throw _0x29d87b;}}async[a16_0x269f53(0x2e1)+a16_0x269f53(0x25d)](_0x2446d6,_0x2aa1b9){const _0x3aefd3=a16_0x269f53;try{logger['info'](_0x3aefd3(0x270)+'석\x20시작:\x20'+_0x2446d6);if(!_0x2446d6)throw new Error('폴더\x20경로가\x20제공되'+_0x3aefd3(0x2cc));const _0x239ed4=await this['s3Service'][_0x3aefd3(0x281)+_0x3aefd3(0x20a)](_0x2446d6,_0x2aa1b9);if(!_0x239ed4['success'])throw new Error(_0x3aefd3(0x28e)+_0x3aefd3(0x276)+_0x239ed4[_0x3aefd3(0x28a)]);const _0x289270=_0x2aa1b9||a16_0x19795e[_0x3aefd3(0x2d5)](_0x2446d6)||_0x3aefd3(0x2af),_0x3725e5={};_0x3725e5[_0x3aefd3(0x2be)]=_0x289270,_0x3725e5[_0x3aefd3(0x1be)+'t']='',_0x3725e5[_0x3aefd3(0x246)]=_0x239ed4[_0x3aefd3(0x24c)];const _0x4747d9=_0x3725e5,_0x540353=await this[_0x3aefd3(0x214)+_0x3aefd3(0x291)]['requestAna'+_0x3aefd3(0x27c)](_0x4747d9);logger[_0x3aefd3(0x22d)](_0x3aefd3(0x2b5)+'청\x20완료:\x20'+_0x540353[_0x3aefd3(0x282)]);const _0xc58628={};return _0xc58628['analysisId']=_0x540353[_0x3aefd3(0x285)]||_0x540353['requestId'],_0xc58628[_0x3aefd3(0x2bd)]=_0x540353[_0x3aefd3(0x2bd)],_0xc58628[_0x3aefd3(0x2bb)+_0x3aefd3(0x238)]=_0x239ed4[_0x3aefd3(0x2bb)+'ders'],_0xc58628;}catch(_0xae1219){logger[_0x3aefd3(0x28a)](_0x3aefd3(0x270)+_0x3aefd3(0x244),_0xae1219);throw _0xae1219;}}async[a16_0x269f53(0x250)+a16_0x269f53(0x267)](_0x224a5e,_0x3ed632){const _0x374154=a16_0x269f53;try{logger[_0x374154(0x22d)](_0x374154(0x1c4)+_0x374154(0x1cf)+_0x224a5e);if(!_0x224a5e)throw new Error(_0x374154(0x2a0)+'\x20없습니다.');const _0x3cf57a=await this[_0x374154(0x203)][_0x374154(0x1fe)+_0x374154(0x20c)]([_0x224a5e],_0x3ed632);if(!_0x3cf57a[_0x374154(0x1c1)])throw new Error(_0x374154(0x2a5)+'\x20'+_0x3cf57a[_0x374154(0x28a)]);const _0x4065d9=a16_0x19795e[_0x374154(0x2d5)](_0x224a5e)||_0x374154(0x1f8),_0x2396ef={};_0x2396ef[_0x374154(0x2be)]=_0x3ed632||_0x4065d9,_0x2396ef['fileConten'+'t']='',_0x2396ef[_0x374154(0x246)]=_0x3cf57a[_0x374154(0x24c)];const _0x427797=_0x2396ef,_0x46a296=await this['sparrowSer'+_0x374154(0x291)][_0x374154(0x2c0)+_0x374154(0x1d6)](_0x427797);logger[_0x374154(0x22d)]('단일\x20파일\x20SCA\x20'+'분석\x20요청\x20완료:\x20'+_0x46a296['requestId']);const _0x5f3ef0={};return _0x5f3ef0[_0x374154(0x285)]=_0x46a296[_0x374154(0x285)]||_0x46a296['requestId'],_0x5f3ef0[_0x374154(0x2bd)]=_0x46a296[_0x374154(0x2bd)],_0x5f3ef0['analysisTy'+'pe']=_0x374154(0x295),_0x5f3ef0;}catch(_0x28b182){logger['error'](_0x374154(0x1c4)+_0x374154(0x1b3),_0x28b182);throw _0x28b182;}}async[a16_0x269f53(0x250)+a16_0x269f53(0x21e)](_0x334adb,_0x37670f){const _0x381d5b=a16_0x269f53,_0x36e176={};_0x36e176[_0x381d5b(0x269)]=function(_0x39c9e7,_0x5d5c55){return _0x39c9e7===_0x5d5c55;},_0x36e176[_0x381d5b(0x271)]=_0x381d5b(0x2a0)+'\x20없습니다.';const _0x1bedef=_0x36e176;try{logger[_0x381d5b(0x22d)](_0x381d5b(0x204)+'CA\x20분석\x20시작:\x20'+_0x334adb[_0x381d5b(0x21b)]+'개\x20파일\x20경로');if(!_0x334adb||_0x1bedef[_0x381d5b(0x269)](_0x334adb[_0x381d5b(0x21b)],0x0)){if('nJOBV'==='nJOBV')throw new Error(_0x1bedef[_0x381d5b(0x271)]);else _0xf7f7d9['push'](_0x381d5b(0x232)+_0x37b931[_0x381d5b(0x268)]);}const _0x36b9c0=await this[_0x381d5b(0x203)][_0x381d5b(0x1fe)+_0x381d5b(0x20c)](_0x334adb,_0x37670f);if(!_0x36b9c0[_0x381d5b(0x1c1)])throw new Error(_0x381d5b(0x2a5)+'\x20'+_0x36b9c0[_0x381d5b(0x28a)]);const _0x33001a=a16_0x19795e[_0x381d5b(0x2d5)](_0x334adb[0x0])||_0x381d5b(0x1f8),_0x58ce91={};_0x58ce91[_0x381d5b(0x2be)]=_0x37670f||_0x33001a,_0x58ce91[_0x381d5b(0x1be)+'t']='',_0x58ce91[_0x381d5b(0x246)]=_0x36b9c0[_0x381d5b(0x24c)];const _0x1df779=_0x58ce91,_0x222b88=await this[_0x381d5b(0x214)+_0x381d5b(0x291)][_0x381d5b(0x2c0)+_0x381d5b(0x1d6)](_0x1df779);logger['info'](_0x381d5b(0x204)+_0x381d5b(0x223)+_0x381d5b(0x20d)+_0x222b88['requestId']);const _0x3e89cc={};return _0x3e89cc[_0x381d5b(0x285)]=_0x222b88['analysisId']||_0x222b88[_0x381d5b(0x282)],_0x3e89cc['status']=_0x222b88[_0x381d5b(0x2bd)],_0x3e89cc[_0x381d5b(0x1cd)+'pe']=_0x381d5b(0x295),_0x3e89cc;}catch(_0x53da6d){logger[_0x381d5b(0x28a)]('파일\x20경로\x20기반\x20S'+'CA\x20분석\x20요청\x20실'+'패:',_0x53da6d);throw _0x53da6d;}}async['analyzeFol'+a16_0x269f53(0x2b3)](_0x511ad9,_0x1c7dfe){const _0x2a93ed=a16_0x269f53;try{logger[_0x2a93ed(0x22d)](_0x2a93ed(0x277)+_0x2a93ed(0x1cf)+_0x511ad9);if(!_0x511ad9)throw new Error(_0x2a93ed(0x23e)+'지\x20않았습니다.');const _0x2239b2=await this[_0x2a93ed(0x203)][_0x2a93ed(0x281)+_0x2a93ed(0x20a)](_0x511ad9,_0x1c7dfe);if(!_0x2239b2[_0x2a93ed(0x1c1)])throw new Error('폴더\x20압축\x20및\x20업로'+_0x2a93ed(0x276)+_0x2239b2['error']);const _0x1916cd=_0x1c7dfe||a16_0x19795e[_0x2a93ed(0x2d5)](_0x511ad9)||_0x2a93ed(0x2af),_0x4cf2cb={};_0x4cf2cb['fileName']=_0x1916cd,_0x4cf2cb['fileConten'+'t']='',_0x4cf2cb[_0x2a93ed(0x246)]=_0x2239b2['key'];const _0x118813=_0x4cf2cb,_0x445bb5=await this['sparrowSer'+_0x2a93ed(0x291)][_0x2a93ed(0x2c0)+_0x2a93ed(0x1d6)](_0x118813);logger[_0x2a93ed(0x22d)]('폴더\x20기반\x20SCA\x20'+_0x2a93ed(0x1b8)+_0x445bb5['requestId']);const _0x261405={};return _0x261405['analysisId']=_0x445bb5[_0x2a93ed(0x285)]||_0x445bb5[_0x2a93ed(0x282)],_0x261405[_0x2a93ed(0x2bd)]=_0x445bb5[_0x2a93ed(0x2bd)],_0x261405[_0x2a93ed(0x1cd)+'pe']='SCA',_0x261405['skippedFol'+_0x2a93ed(0x238)]=_0x2239b2[_0x2a93ed(0x2bb)+_0x2a93ed(0x238)],_0x261405;}catch(_0x3925f4){logger[_0x2a93ed(0x28a)](_0x2a93ed(0x277)+'분석\x20요청\x20실패:',_0x3925f4);throw _0x3925f4;}}async['analyzeZip'+a16_0x269f53(0x257)](_0x32ea94,_0x48795a){const _0x11d636=a16_0x269f53;try{logger[_0x11d636(0x22d)](_0x11d636(0x1ff)+_0x11d636(0x1ef)+'\x20'+_0x32ea94);if(!_0x32ea94)throw new Error(_0x11d636(0x2b8)+_0x11d636(0x1dc)+'다.');const _0x569683=await this['s3Service'][_0x11d636(0x205)+'ile'](_0x32ea94);if(!_0x569683['success'])throw new Error(_0x11d636(0x2c7)+_0x11d636(0x265)+_0x569683['error']);const _0x528af0=_0x48795a||a16_0x19795e[_0x11d636(0x2d5)](_0x32ea94)||_0x11d636(0x1f8),_0x300695={};_0x300695[_0x11d636(0x2be)]=_0x528af0,_0x300695[_0x11d636(0x1be)+'t']='',_0x300695[_0x11d636(0x246)]=_0x569683[_0x11d636(0x24c)];const _0x28f5a7=_0x300695,_0x5483e2=await this[_0x11d636(0x214)+'vice'][_0x11d636(0x2c0)+'Analysis'](_0x28f5a7);logger[_0x11d636(0x22d)](_0x11d636(0x1ff)+'SCA\x20분석\x20요청\x20'+_0x11d636(0x298)+_0x5483e2[_0x11d636(0x282)]);const _0x3a4d0b={};return _0x3a4d0b['analysisId']=_0x5483e2['analysisId']||_0x5483e2[_0x11d636(0x282)],_0x3a4d0b[_0x11d636(0x2bd)]=_0x5483e2[_0x11d636(0x2bd)],_0x3a4d0b[_0x11d636(0x1cd)+'pe']=_0x11d636(0x295),_0x3a4d0b;}catch(_0x45bba4){logger[_0x11d636(0x28a)](_0x11d636(0x1ff)+_0x11d636(0x26b)+'실패:',_0x45bba4);throw _0x45bba4;}}[a16_0x269f53(0x254)+'y'](_0x497833){const _0x419386=a16_0x269f53,_0x263e07={};_0x263e07['JWENB']=_0x419386(0x2c6),_0x263e07['bbrnb']='LOW';const _0x33edd6=_0x263e07,_0x29c286={};_0x29c286['HIGH']=_0x33edd6[_0x419386(0x1d5)],_0x29c286[_0x419386(0x212)]='HIGH',_0x29c286[_0x419386(0x206)]=_0x419386(0x206),_0x29c286[_0x419386(0x2dd)]=_0x33edd6[_0x419386(0x2cd)],_0x29c286[_0x419386(0x1e7)]='LOW';const _0x5535b7=_0x29c286;return _0x5535b7[_0x497833?.[_0x419386(0x24d)+'e']()]||_0x419386(0x206);}async[a16_0x269f53(0x1bf)+a16_0x269f53(0x28c)+'s'](_0x233450){const _0x3e7807=a16_0x269f53,_0x5e1df7={'NqBHN':function(_0x171df0,_0xdf16){return _0x171df0(_0xdf16);},'koeWA':function(_0xe4faa4,_0x445217){return _0xe4faa4+_0x445217;}};try{if(this[_0x3e7807(0x2bc)+'Cache'][_0x3e7807(0x2a9)](_0x233450))return logger['info'](_0x3e7807(0x2d7)+_0x3e7807(0x242)+_0x233450),this['scaResults'+'Cache']['get'](_0x233450);logger[_0x3e7807(0x22d)]('SCA\x20분석\x20결과\x20'+_0x3e7807(0x1c5)+_0x233450);const _0xa65d83=await this[_0x3e7807(0x214)+_0x3e7807(0x291)][_0x3e7807(0x259)+_0x3e7807(0x261)+'on'](_0x233450),_0x41a96d=_0xa65d83[_0x3e7807(0x29c)]?_0x5e1df7[_0x3e7807(0x284)](String,_0xa65d83['result'])[_0x3e7807(0x24d)+'e']():undefined;let _0x2a23d8;_0x41a96d===_0x3e7807(0x296)||_0x41a96d===_0x3e7807(0x258)?_0x2a23d8='failed':_0x2a23d8=_0x3e7807(0x260);const _0x476e86=_0xa65d83[_0x3e7807(0x285)]||_0x233450;logger[_0x3e7807(0x22d)](_0x3e7807(0x2d7)+_0x3e7807(0x222)+_0x476e86);const _0x102785=await this[_0x3e7807(0x214)+_0x3e7807(0x291)][_0x3e7807(0x28f)+'alysisResu'+_0x3e7807(0x20f)](_0x476e86),_0x1831ca=this[_0x3e7807(0x1f5)+_0x3e7807(0x24b)](_0x102785);let _0x4a6cc1=0x0,_0x53d10d=0x0,_0xe8b5ee=0x0,_0x982568=0x0;for(const _0x4ca4b2 of _0x1831ca){for(const _0x10d590 of _0x4ca4b2[_0x3e7807(0x25e)]){switch(_0x10d590[_0x3e7807(0x275)]){case _0x3e7807(0x212):_0x4a6cc1++;break;case _0x3e7807(0x2c6):_0x53d10d++;break;case _0x3e7807(0x206):_0xe8b5ee++;break;case _0x3e7807(0x2dd):_0x982568++;break;}}}const _0x30511d=_0x5e1df7[_0x3e7807(0x256)](_0x4a6cc1+_0x53d10d,_0xe8b5ee)+_0x982568,_0x36ea5f=this[_0x3e7807(0x1bd)+_0x3e7807(0x1db)+'ef'](_0x1831ca,_0x30511d,_0x4a6cc1,_0x53d10d,_0xe8b5ee,_0x982568),_0x389482={};_0x389482[_0x3e7807(0x285)]=_0x476e86,_0x389482[_0x3e7807(0x2bd)]=_0x2a23d8,_0x389482['result']=_0x41a96d,_0x389482[_0x3e7807(0x228)]=_0x1831ca,_0x389482[_0x3e7807(0x279)+'rabilities']=_0x30511d,_0x389482[_0x3e7807(0x289)+_0x3e7807(0x1fb)]=_0x4a6cc1,_0x389482[_0x3e7807(0x1cb)]=_0x53d10d,_0x389482[_0x3e7807(0x2c5)+'t']=_0xe8b5ee,_0x389482['lowCount']=_0x982568,_0x389482['analysisBr'+_0x3e7807(0x25b)]=_0x36ea5f;const _0x305003=_0x389482;return this['scaResults'+_0x3e7807(0x1f6)][_0x3e7807(0x27b)](_0x233450,_0x305003),_0x476e86!==_0x233450&&this[_0x3e7807(0x2bc)+_0x3e7807(0x1f6)]['set'](_0x476e86,_0x305003),logger[_0x3e7807(0x22d)](_0x3e7807(0x2d7)+_0x3e7807(0x2ac)+_0x1831ca[_0x3e7807(0x21b)]+_0x3e7807(0x2b2)+_0x30511d+_0x3e7807(0x2a2)),_0x305003;}catch(_0x4610a4){logger[_0x3e7807(0x28a)](_0x3e7807(0x2d7)+'조회\x20실패:',_0x4610a4);throw _0x4610a4;}}[a16_0x269f53(0x1f5)+a16_0x269f53(0x24b)](_0x49822d){const _0x35a801=a16_0x269f53,_0x3644c2={};_0x3644c2[_0x35a801(0x1e1)]=_0x35a801(0x2c1)+_0x35a801(0x25c),_0x3644c2['RkUNQ']=_0x35a801(0x1de),_0x3644c2[_0x35a801(0x1ee)]=function(_0x3c7ae6,_0x28f417){return _0x3c7ae6===_0x28f417;};const _0x5afc25=_0x3644c2,_0x3bbb08=[];for(const _0x45e611 of _0x49822d){if(_0x45e611[_0x35a801(0x274)]&&_0x45e611[_0x35a801(0x1ba)]!==undefined){const _0x450564=[];if(_0x45e611[_0x35a801(0x292)]&&Array[_0x35a801(0x201)](_0x45e611[_0x35a801(0x292)]))for(const _0x4186d4 of _0x45e611[_0x35a801(0x292)]){if(_0x35a801(0x283)!==_0x35a801(0x283)){_0x280488[_0x35a801(0x28a)](_0x35a801(0x1f1)+'패:',_0x17ffe7);throw _0x53376c;}else{const _0x3dc2e4={};_0x3dc2e4[_0x35a801(0x274)]=_0x4186d4[_0x35a801(0x274)]||_0x4186d4['spdxId']||_0x35a801(0x1de),_0x3dc2e4[_0x35a801(0x1d9)]=_0x4186d4[_0x35a801(0x1d9)],_0x3dc2e4['url']=_0x4186d4['url'],_0x450564[_0x35a801(0x1cc)](_0x3dc2e4);}}const _0x3a73f4=[];if(_0x45e611['issues']&&Array[_0x35a801(0x201)](_0x45e611[_0x35a801(0x25e)]))for(const _0x4d7458 of _0x45e611['issues']){_0x3a73f4[_0x35a801(0x1cc)]({'cveId':_0x4d7458[_0x35a801(0x22f)]||_0x4d7458['id']||'Unknown','severity':this[_0x35a801(0x2d2)+_0x35a801(0x1d0)](_0x4d7458[_0x35a801(0x275)]||_0x4d7458[_0x35a801(0x1ae)]),'cvssScore':_0x4d7458['cvssScore']||_0x4d7458[_0x35a801(0x2e0)],'description':_0x4d7458[_0x35a801(0x272)+'n']||_0x4d7458['summary'],'fixedVersion':_0x4d7458[_0x35a801(0x240)+'on']||_0x4d7458[_0x35a801(0x202)+_0x35a801(0x2df)]});}const _0x22966f={};_0x22966f[_0x35a801(0x274)]=_0x45e611[_0x35a801(0x274)],_0x22966f[_0x35a801(0x1ba)]=_0x45e611[_0x35a801(0x1ba)]||_0x5afc25[_0x35a801(0x248)],_0x22966f[_0x35a801(0x22e)]=_0x45e611[_0x35a801(0x22e)],_0x22966f[_0x35a801(0x209)]=_0x45e611[_0x35a801(0x209)],_0x22966f['repository'+'Uri']=_0x45e611[_0x35a801(0x209)+'Uri'],_0x22966f[_0x35a801(0x225)]=_0x45e611[_0x35a801(0x225)],_0x22966f[_0x35a801(0x292)]=_0x450564,_0x22966f['issues']=_0x3a73f4,_0x22966f[_0x35a801(0x2cf)+_0x35a801(0x2db)]=_0x45e611['confidence'+_0x35a801(0x2db)],_0x22966f[_0x35a801(0x290)+'ate']=_0x45e611[_0x35a801(0x290)+_0x35a801(0x24a)],_0x3bbb08[_0x35a801(0x1cc)](_0x22966f);}else{if(Array['isArray'](_0x45e611))for(const _0x16c7ab of _0x45e611){if(_0x16c7ab[_0x35a801(0x274)]&&_0x16c7ab[_0x35a801(0x1ba)]!==undefined){const _0x3bf06f=[];if(_0x16c7ab[_0x35a801(0x292)]&&Array['isArray'](_0x16c7ab[_0x35a801(0x292)]))for(const _0x72f619 of _0x16c7ab[_0x35a801(0x292)]){if(_0x5afc25[_0x35a801(0x1ee)]('IObsl',_0x35a801(0x23b)))_0x168a8d=XUDgZE[_0x35a801(0x1e1)];else{const _0x3c68c6={};_0x3c68c6['name']=_0x72f619[_0x35a801(0x274)]||_0x72f619[_0x35a801(0x1d9)]||_0x35a801(0x1de),_0x3c68c6[_0x35a801(0x1d9)]=_0x72f619[_0x35a801(0x1d9)],_0x3c68c6[_0x35a801(0x237)]=_0x72f619['url'],_0x3bf06f[_0x35a801(0x1cc)](_0x3c68c6);}}const _0x4b46bf=[];if(_0x16c7ab[_0x35a801(0x25e)]&&Array[_0x35a801(0x201)](_0x16c7ab['issues']))for(const _0x1f7d62 of _0x16c7ab[_0x35a801(0x25e)]){_0x4b46bf[_0x35a801(0x1cc)]({'cveId':_0x1f7d62[_0x35a801(0x22f)]||_0x1f7d62['id']||_0x35a801(0x1de),'severity':this['mapScaSeve'+_0x35a801(0x1d0)](_0x1f7d62[_0x35a801(0x275)]||_0x1f7d62['risk']),'cvssScore':_0x1f7d62[_0x35a801(0x1e8)]||_0x1f7d62[_0x35a801(0x2e0)],'description':_0x1f7d62[_0x35a801(0x272)+'n']||_0x1f7d62[_0x35a801(0x2ba)],'fixedVersion':_0x1f7d62[_0x35a801(0x240)+'on']||_0x1f7d62[_0x35a801(0x202)+_0x35a801(0x2df)]});}const _0x510f75={};_0x510f75[_0x35a801(0x274)]=_0x16c7ab[_0x35a801(0x274)],_0x510f75[_0x35a801(0x1ba)]=_0x16c7ab[_0x35a801(0x1ba)]||_0x35a801(0x1de),_0x510f75[_0x35a801(0x22e)]=_0x16c7ab[_0x35a801(0x22e)],_0x510f75[_0x35a801(0x209)]=_0x16c7ab[_0x35a801(0x209)],_0x510f75[_0x35a801(0x209)+_0x35a801(0x297)]=_0x16c7ab[_0x35a801(0x209)+'Uri'],_0x510f75[_0x35a801(0x225)]=_0x16c7ab[_0x35a801(0x225)],_0x510f75[_0x35a801(0x292)]=_0x3bf06f,_0x510f75[_0x35a801(0x25e)]=_0x4b46bf,_0x510f75[_0x35a801(0x2cf)+_0x35a801(0x2db)]=_0x16c7ab[_0x35a801(0x2cf)+'Score'],_0x510f75[_0x35a801(0x290)+_0x35a801(0x24a)]=_0x16c7ab[_0x35a801(0x290)+_0x35a801(0x24a)],_0x3bbb08[_0x35a801(0x1cc)](_0x510f75);}}}}return _0x3bbb08;}[a16_0x269f53(0x2d2)+a16_0x269f53(0x1d0)](_0x2d8437){const _0x1b9830=a16_0x269f53,_0x4b4a37={};_0x4b4a37[_0x1b9830(0x22b)]=function(_0x4366ec,_0x268a90){return _0x4366ec===_0x268a90;},_0x4b4a37[_0x1b9830(0x23f)]=_0x1b9830(0x2c6);const _0x3d1939=_0x4b4a37;if(_0x3d1939[_0x1b9830(0x22b)](typeof _0x2d8437,_0x1b9830(0x2a8))){if(_0x2d8437>=0x9)return _0x1b9830(0x212);if(_0x2d8437>=0x7)return _0x3d1939[_0x1b9830(0x23f)];if(_0x2d8437>=0x4)return _0x1b9830(0x206);return _0x1b9830(0x2dd);}const _0x21cc1f={};_0x21cc1f[_0x1b9830(0x212)]=_0x1b9830(0x212),_0x21cc1f[_0x1b9830(0x2c6)]=_0x1b9830(0x2c6),_0x21cc1f[_0x1b9830(0x206)]='MEDIUM',_0x21cc1f[_0x1b9830(0x2dd)]=_0x1b9830(0x2dd),_0x21cc1f[_0x1b9830(0x1e7)]='LOW';const _0x130f83=_0x21cc1f;return _0x130f83[_0x2d8437?.['toUpperCas'+'e']()]||_0x1b9830(0x206);}[a16_0x269f53(0x1bd)+a16_0x269f53(0x1db)+'ef'](_0x1ad6b3,_0xea5751,_0x2f31f4,_0x2395df,_0x2d4f2f,_0x14b9bc){const _0x4ee780=a16_0x269f53,_0x1f3f93={};_0x1f3f93[_0x4ee780(0x2c2)]=function(_0x4df606,_0x5a021e){return _0x4df606===_0x5a021e;};const _0x2b35f4=_0x1f3f93,_0x490432=_0x1ad6b3[_0x4ee780(0x2d6)](_0x9fa7ef=>_0x9fa7ef[_0x4ee780(0x25e)]['length']>0x0),_0x51daf1=new Set();for(const _0x453f88 of _0x1ad6b3){for(const _0x2033d1 of _0x453f88[_0x4ee780(0x292)]){_0x51daf1[_0x4ee780(0x213)](_0x2033d1['name']);}}let _0x4e62e2=_0x4ee780(0x23c)+_0x1ad6b3[_0x4ee780(0x21b)]+_0x4ee780(0x20e)+_0x490432[_0x4ee780(0x21b)]+(_0x4ee780(0x1df)+'.\x20');_0x4e62e2+='총\x20'+_0xea5751+(_0x4ee780(0x1eb)+_0x4ee780(0x29f))+_0x2f31f4+',\x20High:\x20'+_0x2395df+',\x20Medium:\x20'+_0x2d4f2f+_0x4ee780(0x2b4)+_0x14b9bc+_0x4ee780(0x1e9);_0x51daf1[_0x4ee780(0x2ce)]>0x0&&(_0x4e62e2+=_0x4ee780(0x26c)+Array[_0x4ee780(0x1ce)](_0x51daf1)[_0x4ee780(0x28d)](0x0,0x5)[_0x4ee780(0x1fd)](',\x20')+(_0x51daf1[_0x4ee780(0x2ce)]>0x5?_0x4ee780(0x235)+(_0x51daf1[_0x4ee780(0x2ce)]-0x5)+'개':'')+'.\x20');if(_0x2f31f4>0x0||_0x2395df>0x0)_0x4e62e2+='긴급\x20조치\x20필요:\x20'+_0x4ee780(0x1ad)+_0x4ee780(0x24e);else _0x2d4f2f>0x0?_0x4e62e2+=_0x4ee780(0x1c7)+_0x4ee780(0x1ec)+'.':_0x2b35f4[_0x4ee780(0x2c2)](_0x4ee780(0x23a),'hRzla')?_0x1a88f5=_0x4ee780(0x260):_0x4e62e2+=_0x4ee780(0x1c3)+_0x4ee780(0x241);return _0x4e62e2;}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CheckerInfo, ReferenceItem } from '../types/types.js';
|
|
2
|
+
export declare class CheckerService {
|
|
3
|
+
private checkersDir;
|
|
4
|
+
private checkerCache;
|
|
5
|
+
private initialized;
|
|
6
|
+
constructor(checkersDir?: string);
|
|
7
|
+
initialize(): Promise<void>;
|
|
8
|
+
private ensureCheckersDownloaded;
|
|
9
|
+
private loadCheckers;
|
|
10
|
+
getCheckerInfo(checkerKey: string, lang?: string): CheckerInfo | undefined;
|
|
11
|
+
getLocalizedInfo(checkerKey: string, lang?: string): {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
} | undefined;
|
|
15
|
+
getComplianceInfo(checkerKey: string): ReferenceItem[];
|
|
16
|
+
getCheckersByCompliance(complianceName: string): CheckerInfo[];
|
|
17
|
+
enrichVulnerabilitiesWithCheckerInfo(vulnerabilities: any[], lang?: string): any[];
|
|
18
|
+
groupVulnerabilitiesByCompliance(vulnerabilities: any[]): Map<string, any[]>;
|
|
19
|
+
getCachedCheckerCount(): number;
|
|
20
|
+
refreshCache(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a17_0x486225=a17_0x58e8;(function(_0x57a17b,_0x1b5df0){const _0x366197=a17_0x58e8,_0x2221bf=_0x57a17b();while(!![]){try{const _0x22cb5c=-parseInt(_0x366197(0x176))/0x1*(parseInt(_0x366197(0x19b))/0x2)+-parseInt(_0x366197(0x191))/0x3*(-parseInt(_0x366197(0x1b4))/0x4)+-parseInt(_0x366197(0x1b3))/0x5*(-parseInt(_0x366197(0x1bd))/0x6)+-parseInt(_0x366197(0x1bb))/0x7+-parseInt(_0x366197(0x18a))/0x8+-parseInt(_0x366197(0x1ac))/0x9+-parseInt(_0x366197(0x1b1))/0xa*(-parseInt(_0x366197(0x1b6))/0xb);if(_0x22cb5c===_0x1b5df0)break;else _0x2221bf['push'](_0x2221bf['shift']());}catch(_0x192b29){_0x2221bf['push'](_0x2221bf['shift']());}}}(a17_0x3a52,0x3f4fd));const a17_0x49e40b=(function(){let _0x494f54=!![];return function(_0x2ceee4,_0x22b682){const _0x16c2a1=_0x494f54?function(){if(_0x22b682){const _0x1eee1e=_0x22b682['apply'](_0x2ceee4,arguments);return _0x22b682=null,_0x1eee1e;}}:function(){};return _0x494f54=![],_0x16c2a1;};}()),a17_0x53008c=a17_0x49e40b(this,function(){const _0x3d1119=a17_0x58e8;return a17_0x53008c[_0x3d1119(0x18e)]()[_0x3d1119(0x1c8)](_0x3d1119(0x1c7)+'+$')[_0x3d1119(0x18e)]()[_0x3d1119(0x1b0)+'r'](a17_0x53008c)[_0x3d1119(0x1c8)](_0x3d1119(0x1c7)+'+$');});a17_0x53008c();import a17_0x477beb from'axios';function a17_0x58e8(_0x277066,_0x550673){_0x277066=_0x277066-0x164;const _0x1322c5=a17_0x3a52();let _0x53008c=_0x1322c5[_0x277066];return _0x53008c;}import a17_0x19d546 from'adm-zip';import a17_0x5835c2 from'path';import a17_0x2f84ad from'fs';import{fileURLToPath}from'url';import{appConfig}from'../config/appConfig.js';function a17_0x3a52(){const _0x59cad3=['resolve','key','Info','getCachedC','UcoEy','push','checkers.z','sparrow','ByComplian','data','unlinkSync','initialize','\x20실패:','filter','toLowerCas','nceInfo','기존\x20체커\x20캐시\x20사','name','3243576ueKysB','\x20시작...','endsWith','checkerInf','toString','refreshCac','erabilitie','4533BNFpky','warn','개\x20파일','/api/v1/ch','enrichVuln','clear','some','aded','XNrHD','localized','45114vRNYxN','join','readFileSy','heckerCoun','getLocaliz','info','has','values','extractAll','groupVulne','erInfo','descriptio','recursive','size','lang','referenceI','sWithCheck','2135583NRkZXg','kersDownlo','readdirSyn','checkerCac','constructo','690ZZWRyg','get','40435DTOuKU','244QiaCYH','apiKey','195481ILavQN','rabilities','\x20완료:\x20','existsSync','체커\x20규칙\x20다운로드','1531901YkNwMO','arraybuffe','138qBFrrk','writeFileS','개\x20규칙\x20로드','find','reference','baseUrl','tems','.rule','eckers','체커\x20서비스\x20초기화','(((.+)+)+)','search','../../chec','includes','version','length','checkerKey','getChecker','getComplia','nce','mkdirSync','패:\x20','edInfo','from','error','ensureChec','set','checkersDi','utf-8','loadChecke','17mqnebl','parse'];a17_0x3a52=function(){return _0x59cad3;};return a17_0x3a52();}import{logger}from'../utils/logger.js';export class CheckerService{[a17_0x486225(0x173)+'r'];[a17_0x486225(0x1af)+'he'];[a17_0x486225(0x183)+'d']=![];constructor(_0x2645cd){const _0x396bc0=a17_0x486225;if(_0x2645cd)this['checkersDi'+'r']=_0x2645cd;else{const _0x2e3e4b=a17_0x5835c2['dirname'](fileURLToPath(import.meta.url));this[_0x396bc0(0x173)+'r']=a17_0x5835c2[_0x396bc0(0x178)](_0x2e3e4b,_0x396bc0(0x164)+'kers');}this['checkerCac'+'he']=new Map();}async['initialize'](){const _0x24f45d=a17_0x486225;if(this[_0x24f45d(0x183)+'d'])return;try{await this[_0x24f45d(0x171)+_0x24f45d(0x1ad)+_0x24f45d(0x198)](),await this[_0x24f45d(0x175)+'rs'](),this['initialize'+'d']=!![],logger[_0x24f45d(0x1a0)](_0x24f45d(0x1c6)+_0x24f45d(0x1b8)+this['checkerCac'+'he']['size']+_0x24f45d(0x1bf));}catch(_0x38dffa){logger['error'](_0x24f45d(0x1c6)+_0x24f45d(0x184),_0x38dffa),this[_0x24f45d(0x183)+'d']=!![];}}async[a17_0x486225(0x171)+a17_0x486225(0x1ad)+'aded'](){const _0xfd94a6=a17_0x486225,_0xf5666={};_0xf5666[_0xfd94a6(0x17c)]=_0xfd94a6(0x1c7)+'+$';const _0x2d5a11=_0xf5666;if(a17_0x2f84ad['existsSync'](this[_0xfd94a6(0x173)+'r'])){const _0x1e90fc=a17_0x2f84ad[_0xfd94a6(0x1ae)+'c'](this[_0xfd94a6(0x173)+'r']),_0x5821d7=_0x1e90fc['filter'](_0x59c00d=>_0x59c00d[_0xfd94a6(0x18c)]('.rule'));if(_0x5821d7[_0xfd94a6(0x167)]>0x0){if('Zppqt'===_0xfd94a6(0x199))return _0x55a062[_0xfd94a6(0x18e)]()[_0xfd94a6(0x1c8)]('(((.+)+)+)'+'+$')[_0xfd94a6(0x18e)]()[_0xfd94a6(0x1b0)+'r'](_0x23a393)[_0xfd94a6(0x1c8)](PdlrEx[_0xfd94a6(0x17c)]);else{logger[_0xfd94a6(0x1a0)](_0xfd94a6(0x188)+'용:\x20'+_0x5821d7[_0xfd94a6(0x167)]+'개\x20파일');return;}}}logger[_0xfd94a6(0x1a0)](_0xfd94a6(0x1ba)+_0xfd94a6(0x18b));try{const _0x1285e8=await a17_0x477beb[_0xfd94a6(0x1b2)](appConfig['sparrow'][_0xfd94a6(0x1c2)]+(_0xfd94a6(0x194)+_0xfd94a6(0x1c5)),{'headers':{'Authorization':'Bearer\x20'+appConfig[_0xfd94a6(0x17f)][_0xfd94a6(0x1b5)]},'responseType':_0xfd94a6(0x1bc)+'r','timeout':0xea60});if(!a17_0x2f84ad['existsSync'](this[_0xfd94a6(0x173)+'r'])){const _0x38b831={};_0x38b831[_0xfd94a6(0x1a7)]=!![],a17_0x2f84ad[_0xfd94a6(0x16c)](this[_0xfd94a6(0x173)+'r'],_0x38b831);}const _0x54ea2f=a17_0x5835c2[_0xfd94a6(0x19c)](this[_0xfd94a6(0x173)+'r'],_0xfd94a6(0x17e)+'ip');a17_0x2f84ad[_0xfd94a6(0x1be)+'ync'](_0x54ea2f,Buffer[_0xfd94a6(0x16f)](_0x1285e8[_0xfd94a6(0x181)]));const _0x54293f=new a17_0x19d546(_0x54ea2f);_0x54293f[_0xfd94a6(0x1a3)+'To'](this[_0xfd94a6(0x173)+'r'],!![]),a17_0x2f84ad[_0xfd94a6(0x182)](_0x54ea2f);const _0x3c1505=a17_0x2f84ad['readdirSyn'+'c'](this[_0xfd94a6(0x173)+'r']),_0xc1849b=_0x3c1505[_0xfd94a6(0x185)](_0x1441e1=>_0x1441e1[_0xfd94a6(0x18c)](_0xfd94a6(0x1c4)));logger['info'](_0xfd94a6(0x1ba)+_0xfd94a6(0x1b8)+_0xc1849b['length']+_0xfd94a6(0x193));}catch(_0x132ce5){logger[_0xfd94a6(0x170)](_0xfd94a6(0x1ba)+'\x20실패:',_0x132ce5);throw _0x132ce5;}}async[a17_0x486225(0x175)+'rs'](){const _0x429f73=a17_0x486225;if(!a17_0x2f84ad[_0x429f73(0x1b9)](this['checkersDi'+'r'])){logger[_0x429f73(0x192)]('체커\x20디렉토리가\x20존'+'재하지\x20않습니다');return;}const _0x1b8a1e=a17_0x2f84ad[_0x429f73(0x1ae)+'c'](this[_0x429f73(0x173)+'r']),_0x2bae18=_0x1b8a1e[_0x429f73(0x185)](_0x3ac8e4=>_0x3ac8e4[_0x429f73(0x18c)](_0x429f73(0x1c4)));for(const _0x13f15f of _0x2bae18){try{const _0x10456d=a17_0x5835c2[_0x429f73(0x19c)](this['checkersDi'+'r'],_0x13f15f),_0x20b7b8=a17_0x2f84ad[_0x429f73(0x19d)+'nc'](_0x10456d,_0x429f73(0x174)),_0x5ecc66=JSON[_0x429f73(0x177)](_0x20b7b8);_0x5ecc66[_0x429f73(0x179)]&&this[_0x429f73(0x1af)+'he']['set'](_0x5ecc66[_0x429f73(0x179)],_0x5ecc66);}catch(_0x327cb8){logger['warn']('체커\x20파일\x20파싱\x20실'+_0x429f73(0x16d)+_0x13f15f,_0x327cb8);}}}[a17_0x486225(0x169)+a17_0x486225(0x17a)](_0x44d41b,_0x541b42='ko'){return this['checkerCac'+'he']['get'](_0x44d41b);}[a17_0x486225(0x19f)+a17_0x486225(0x16e)](_0x4dee4c,_0x1d26e0='ko'){const _0x527d38=a17_0x486225,_0x1dc0b2=this[_0x527d38(0x1af)+'he'][_0x527d38(0x1b2)](_0x4dee4c);if(!_0x1dc0b2)return undefined;const _0x4dc63a=_0x1dc0b2[_0x527d38(0x19a)][_0x527d38(0x1c0)](_0x12991f=>_0x12991f[_0x527d38(0x1a9)]===_0x1d26e0)||_0x1dc0b2['localized'][_0x527d38(0x1c0)](_0x13f766=>_0x13f766[_0x527d38(0x1a9)]==='en')||_0x1dc0b2[_0x527d38(0x19a)][0x0];if(!_0x4dc63a)return undefined;const _0x4075ac={};return _0x4075ac['name']=_0x4dc63a['name'],_0x4075ac[_0x527d38(0x1a6)+'n']=_0x4dc63a[_0x527d38(0x1a6)+'n'],_0x4075ac;}[a17_0x486225(0x16a)+a17_0x486225(0x187)](_0x26c107){const _0x369ebd=a17_0x486225,_0xf58a73=this[_0x369ebd(0x1af)+'he']['get'](_0x26c107);return _0xf58a73?.[_0x369ebd(0x1aa)+'tems']||[];}['getChecker'+'sByComplia'+a17_0x486225(0x16b)](_0x2eb557){const _0x2c087b=a17_0x486225,_0x9b71e9=[];for(const _0x145a99 of this[_0x2c087b(0x1af)+'he'][_0x2c087b(0x1a2)]()){const _0x56ae79=_0x145a99[_0x2c087b(0x1aa)+_0x2c087b(0x1c3)]?.[_0x2c087b(0x197)](_0x32730c=>_0x32730c['reference'][_0x2c087b(0x189)][_0x2c087b(0x186)+'e']()[_0x2c087b(0x165)](_0x2eb557[_0x2c087b(0x186)+'e']()));_0x56ae79&&_0x9b71e9[_0x2c087b(0x17d)](_0x145a99);}return _0x9b71e9;}[a17_0x486225(0x195)+a17_0x486225(0x190)+a17_0x486225(0x1ab)+a17_0x486225(0x1a5)](_0x366091,_0x1380dc='ko'){return _0x366091['map'](_0x80fd09=>{const _0x12eafc=a17_0x58e8,_0x32cb14=_0x80fd09[_0x12eafc(0x168)];if(!_0x32cb14)return _0x80fd09;const _0xd6e3c3=this[_0x12eafc(0x19f)+_0x12eafc(0x16e)](_0x32cb14,_0x1380dc),_0x3f164d=this[_0x12eafc(0x16a)+'nceInfo'](_0x32cb14),_0x21373c={..._0x80fd09};return _0x21373c[_0x12eafc(0x18d)+'o']=_0xd6e3c3?{'name':_0xd6e3c3[_0x12eafc(0x189)],'description':_0xd6e3c3[_0x12eafc(0x1a6)+'n'],'compliance':_0x3f164d[_0x12eafc(0x167)]>0x0?_0x3f164d:undefined}:undefined,_0x21373c;});}[a17_0x486225(0x1a4)+a17_0x486225(0x1b7)+a17_0x486225(0x180)+'ce'](_0x41e2a8){const _0x124aa0=a17_0x486225,_0x243815=new Map();for(const _0x47e49f of _0x41e2a8){const _0x167454=this[_0x124aa0(0x16a)+_0x124aa0(0x187)](_0x47e49f[_0x124aa0(0x168)]);if(_0x167454['length']===0x0){const _0x2f0c39='기타';!_0x243815[_0x124aa0(0x1a1)](_0x2f0c39)&&_0x243815[_0x124aa0(0x172)](_0x2f0c39,[]),_0x243815[_0x124aa0(0x1b2)](_0x2f0c39)[_0x124aa0(0x17d)](_0x47e49f);}else for(const _0x2866a0 of _0x167454){const _0x4d4370=''+_0x2866a0[_0x124aa0(0x1c1)][_0x124aa0(0x189)]+(_0x2866a0['reference'][_0x124aa0(0x166)]?'\x20('+_0x2866a0['reference'][_0x124aa0(0x166)]+')':'');!_0x243815[_0x124aa0(0x1a1)](_0x4d4370)&&_0x243815[_0x124aa0(0x172)](_0x4d4370,[]),_0x243815[_0x124aa0(0x1b2)](_0x4d4370)['push'](_0x47e49f);}}return _0x243815;}[a17_0x486225(0x17b)+a17_0x486225(0x19e)+'t'](){const _0x56357d=a17_0x486225;return this[_0x56357d(0x1af)+'he'][_0x56357d(0x1a8)];}async[a17_0x486225(0x18f)+'he'](){const _0x567681=a17_0x486225;this[_0x567681(0x1af)+'he'][_0x567681(0x196)]();if(a17_0x2f84ad['existsSync'](this[_0x567681(0x173)+'r'])){const _0x47aff2=a17_0x2f84ad[_0x567681(0x1ae)+'c'](this['checkersDi'+'r']);for(const _0x5d6d1d of _0x47aff2){a17_0x2f84ad[_0x567681(0x182)](a17_0x5835c2[_0x567681(0x19c)](this[_0x567681(0x173)+'r'],_0x5d6d1d));}}this[_0x567681(0x183)+'d']=![],await this[_0x567681(0x183)]();}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a18_0x5e0313=a18_0x5856;function a18_0xee0a(){const _0x313ee2=['search','content','role','2375076wQkIrC','text','(((.+)+)+)','joyQN','10Bwmdrv','apiKey','19013751qJQUEp','455900HXpiWf','model','405480EXPgVq','261012ZLntQH','toString','constructo','766PgFDUE','user','2547rkWpea','generate','761638WFJacE','type','14fldYfK','client'];a18_0xee0a=function(){return _0x313ee2;};return a18_0xee0a();}(function(_0x1d6b5d,_0x4005b8){const _0x3cff82=a18_0x5856,_0x451834=_0x1d6b5d();while(!![]){try{const _0x5ac087=-parseInt(_0x3cff82(0x103))/0x1+-parseInt(_0x3cff82(0x117))/0x2*(parseInt(_0x3cff82(0x119))/0x3)+parseInt(_0x3cff82(0x114))/0x4+-parseInt(_0x3cff82(0x111))/0x5+-parseInt(_0x3cff82(0x10a))/0x6+-parseInt(_0x3cff82(0x105))/0x7*(parseInt(_0x3cff82(0x113))/0x8)+-parseInt(_0x3cff82(0x110))/0x9*(-parseInt(_0x3cff82(0x10e))/0xa);if(_0x5ac087===_0x4005b8)break;else _0x451834['push'](_0x451834['shift']());}catch(_0x2ecf98){_0x451834['push'](_0x451834['shift']());}}}(a18_0xee0a,0x7aba3));const a18_0x21d872=(function(){let _0x86a1ca=!![];return function(_0x28e717,_0x22875d){const _0x25dde6=_0x86a1ca?function(){if(_0x22875d){const _0x936e86=_0x22875d['apply'](_0x28e717,arguments);return _0x22875d=null,_0x936e86;}}:function(){};return _0x86a1ca=![],_0x25dde6;};}()),a18_0x442826=a18_0x21d872(this,function(){const _0x10a261=a18_0x5856;return a18_0x442826[_0x10a261(0x115)]()[_0x10a261(0x107)](_0x10a261(0x10c)+'+$')[_0x10a261(0x115)]()[_0x10a261(0x116)+'r'](a18_0x442826)[_0x10a261(0x107)](_0x10a261(0x10c)+'+$');});function a18_0x5856(_0x485a6c,_0x4a1704){_0x485a6c=_0x485a6c-0x103;const _0x35eb85=a18_0xee0a();let _0x442826=_0x35eb85[_0x485a6c];return _0x442826;}a18_0x442826();import a18_0x30ca5b from'@anthropic-ai/sdk';export class AnthropicProvider{['model'];['client'];constructor(_0x511301,_0x4ea471){const _0x106ca5=a18_0x5856;this['model']=_0x4ea471;const _0x1c347a={};_0x1c347a[_0x106ca5(0x10f)]=_0x511301,this[_0x106ca5(0x106)]=new a18_0x30ca5b(_0x1c347a);}async[a18_0x5e0313(0x11a)](_0x4fa28d){const _0x17c484=a18_0x5e0313,_0x27887b={};_0x27887b[_0x17c484(0x10d)]=function(_0x1fcfa8,_0x5f5c1f){return _0x1fcfa8===_0x5f5c1f;};const _0x1553d6=_0x27887b,_0x1982d0={};_0x1982d0[_0x17c484(0x109)]=_0x17c484(0x118),_0x1982d0[_0x17c484(0x108)]=_0x4fa28d;const _0x41b110=await this[_0x17c484(0x106)]['messages']['create']({'model':this[_0x17c484(0x112)],'max_tokens':0x1000,'messages':[_0x1982d0]});if(_0x1553d6[_0x17c484(0x10d)](_0x41b110[_0x17c484(0x108)][0x0][_0x17c484(0x104)],_0x17c484(0x10b)))return _0x41b110['content'][0x0][_0x17c484(0x10b)];return'';}}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LLMProvider } from './LLMProvider.js';
|
|
2
|
+
export declare class BedrockProvider implements LLMProvider {
|
|
3
|
+
private client;
|
|
4
|
+
private model;
|
|
5
|
+
constructor(model: string, region: string, accessKeyId?: string, secretAccessKey?: string, sessionToken?: string);
|
|
6
|
+
generate(prompt: string): Promise<string>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a19_0x58ac47=a19_0x4cc3;(function(_0x561d5f,_0xd40687){const _0x41ae47=a19_0x4cc3,_0x16275c=_0x561d5f();while(!![]){try{const _0x27cd29=parseInt(_0x41ae47(0x14d))/0x1+parseInt(_0x41ae47(0x150))/0x2*(-parseInt(_0x41ae47(0x162))/0x3)+-parseInt(_0x41ae47(0x14e))/0x4*(parseInt(_0x41ae47(0x15d))/0x5)+parseInt(_0x41ae47(0x16e))/0x6+parseInt(_0x41ae47(0x16b))/0x7*(-parseInt(_0x41ae47(0x168))/0x8)+parseInt(_0x41ae47(0x14b))/0x9+parseInt(_0x41ae47(0x14f))/0xa*(parseInt(_0x41ae47(0x151))/0xb);if(_0x27cd29===_0xd40687)break;else _0x16275c['push'](_0x16275c['shift']());}catch(_0xf6cc93){_0x16275c['push'](_0x16275c['shift']());}}}(a19_0x269e,0x2b884));function a19_0x4cc3(_0x150bc8,_0x1a5725){_0x150bc8=_0x150bc8-0x14b;const _0x4f1fb4=a19_0x269e();let _0x5e5f2b=_0x4f1fb4[_0x150bc8];return _0x5e5f2b;}const a19_0x15ff13=(function(){let _0x1108e6=!![];return function(_0x1a9a12,_0x20b27c){const _0x1d7550=_0x1108e6?function(){const _0x2f98e3=a19_0x4cc3;if(_0x20b27c){const _0x368aaf=_0x20b27c[_0x2f98e3(0x163)](_0x1a9a12,arguments);return _0x20b27c=null,_0x368aaf;}}:function(){};return _0x1108e6=![],_0x1d7550;};}()),a19_0x5e5f2b=a19_0x15ff13(this,function(){const _0x2da19f=a19_0x4cc3;return a19_0x5e5f2b[_0x2da19f(0x169)]()[_0x2da19f(0x164)](_0x2da19f(0x15b)+'+$')['toString']()[_0x2da19f(0x15a)+'r'](a19_0x5e5f2b)[_0x2da19f(0x164)](_0x2da19f(0x15b)+'+$');});a19_0x5e5f2b();import{BedrockRuntimeClient,InvokeModelCommand}from'@aws-sdk/client-bedrock-runtime';function a19_0x269e(){const _0x55bb21=['776NyybNJ','toString','content','7679jGMeCk','23-05-31','send','687252pzelCm','region','body','3149334agoIhY','n/json','33963wYNOZN','196mYscbn','16780MBFJYj','6398gpVFqD','1639XrxHjI','secretAcce','client','QyFHo','parse','role','type','sessionTok','applicatio','constructo','(((.+)+)+)','stringify','26755biojeg','version','user','accessKeyI','bedrock-20','189mHBXya','apply','search','text','model','generate'];a19_0x269e=function(){return _0x55bb21;};return a19_0x269e();}export class BedrockProvider{['client'];[a19_0x58ac47(0x166)];constructor(_0x30e370,_0x56ed77,_0x18d49f,_0x5463f2,_0x1ffb3e){const _0x23c5db=a19_0x58ac47;this['model']=_0x30e370;const _0x4bf594={};_0x4bf594[_0x23c5db(0x16f)]=_0x56ed77;const _0x13e300=_0x4bf594;if(_0x18d49f&&_0x5463f2){const _0x13b336={};_0x13b336[_0x23c5db(0x160)+'d']=_0x18d49f,_0x13b336[_0x23c5db(0x152)+'ssKey']=_0x5463f2,_0x13b336[_0x23c5db(0x158)+'en']=_0x1ffb3e,_0x13e300['credential'+'s']=_0x13b336;}this[_0x23c5db(0x153)]=new BedrockRuntimeClient(_0x13e300);}async[a19_0x58ac47(0x167)](_0x3f6d12){const _0x374016=a19_0x58ac47,_0x51388b={};_0x51388b[_0x374016(0x154)]=_0x374016(0x159)+'n/json';const _0x17872e=_0x51388b,_0x1dc48f={};_0x1dc48f[_0x374016(0x157)]=_0x374016(0x165),_0x1dc48f['text']=_0x3f6d12;const _0x5ec19b={};_0x5ec19b[_0x374016(0x156)]=_0x374016(0x15f),_0x5ec19b[_0x374016(0x16a)]=[_0x1dc48f];const _0x565251={};_0x565251['anthropic_'+_0x374016(0x15e)]=_0x374016(0x161)+_0x374016(0x16c),_0x565251['max_tokens']=0x1000,_0x565251['messages']=[_0x5ec19b];const _0x29571a=_0x565251,_0x12c964=new InvokeModelCommand({'modelId':this[_0x374016(0x166)],'contentType':_0x374016(0x159)+_0x374016(0x14c),'accept':_0x17872e['QyFHo'],'body':JSON[_0x374016(0x15c)](_0x29571a)}),_0x44ad94=await this[_0x374016(0x153)][_0x374016(0x16d)](_0x12c964),_0x241087=new TextDecoder()['decode'](_0x44ad94[_0x374016(0x170)]),_0x57792f=JSON[_0x374016(0x155)](_0x241087);if(_0x57792f[_0x374016(0x16a)]&&_0x57792f[_0x374016(0x16a)][0x0]&&_0x57792f[_0x374016(0x16a)][0x0][_0x374016(0x165)])return _0x57792f[_0x374016(0x16a)][0x0]['text'];return'';}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a20_0x3517cf=a20_0x5e8a;(function(_0x3591a8,_0x2d819b){const _0x501378=a20_0x5e8a,_0xa6e399=_0x3591a8();while(!![]){try{const _0x2dffc3=-parseInt(_0x501378(0x171))/0x1+-parseInt(_0x501378(0x16d))/0x2*(parseInt(_0x501378(0x16f))/0x3)+parseInt(_0x501378(0x166))/0x4*(-parseInt(_0x501378(0x165))/0x5)+-parseInt(_0x501378(0x168))/0x6+-parseInt(_0x501378(0x162))/0x7+-parseInt(_0x501378(0x163))/0x8+parseInt(_0x501378(0x170))/0x9;if(_0x2dffc3===_0x2d819b)break;else _0xa6e399['push'](_0xa6e399['shift']());}catch(_0x4774d9){_0xa6e399['push'](_0xa6e399['shift']());}}}(a20_0x52c2,0x7582c));function a20_0x5e8a(_0x51a530,_0x2dc5c3){_0x51a530=_0x51a530-0x162;const _0x3c12cb=a20_0x52c2();let _0x330547=_0x3c12cb[_0x51a530];return _0x330547;}const a20_0x4d7d49=(function(){let _0x1c6e2a=!![];return function(_0x1b9996,_0x2284c9){const _0x5c914e=_0x1c6e2a?function(){const _0x254ff3=a20_0x5e8a;if(_0x2284c9){const _0x38d509=_0x2284c9[_0x254ff3(0x16a)](_0x1b9996,arguments);return _0x2284c9=null,_0x38d509;}}:function(){};return _0x1c6e2a=![],_0x5c914e;};}()),a20_0x330547=a20_0x4d7d49(this,function(){const _0x9ecf3b=a20_0x5e8a;return a20_0x330547['toString']()[_0x9ecf3b(0x16b)](_0x9ecf3b(0x172)+'+$')['toString']()[_0x9ecf3b(0x167)+'r'](a20_0x330547)['search'](_0x9ecf3b(0x172)+'+$');});a20_0x330547();function a20_0x52c2(){const _0x53782d=['48QOXlcZ','35732241osXTES','903540UsJjNB','(((.+)+)+)','model','text','6650119aORiSZ','1929352vztXMt','ntent','15uWrPtb','469188XIaHHG','constructo','2423352ySVvhh','response','apply','search','genAI','79802WLByAJ','generateCo'];a20_0x52c2=function(){return _0x53782d;};return a20_0x52c2();}import{GoogleGenerativeAI}from'@google/generative-ai';export class GeminiProvider{[a20_0x3517cf(0x16c)];[a20_0x3517cf(0x173)];constructor(_0x2c686b,_0xad7b08){const _0x57c71f=a20_0x3517cf;this['genAI']=new GoogleGenerativeAI(_0x2c686b),this[_0x57c71f(0x173)]=_0xad7b08;}async['generate'](_0x266bd3){const _0x50aeff=a20_0x3517cf,_0x3590c3=this[_0x50aeff(0x16c)]['getGenerat'+'iveModel']({'model':this[_0x50aeff(0x173)]}),_0x1de7ab=await _0x3590c3[_0x50aeff(0x16e)+_0x50aeff(0x164)](_0x266bd3),_0xb88fd5=await _0x1de7ab[_0x50aeff(0x169)];return _0xb88fd5[_0x50aeff(0x174)]();}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a21_0x4ad1(){var _0x2ab6bc=['8ZTpSFe','anthropic','sessionTok','gemini','8AKjKiP','apiKey','model','Using\x20Open','6682403mKXmjo','ider\x20(mode','vider\x20conf','warn','igured.','secretAcce','r\x20(model:\x20','1516122iWwGPS','accessKeyI','toString','440126cHYdCK','2UsmspT','12HDcGgk','baseUrl','ma\x20Provide','constructo','2770415FcHdGp','apply','openai','aws','27LeosgK','ni\x20Provide','11597113MooZDP','ollama','info','(((.+)+)+)','AI\x20Provide','1027450cYCHcP','Using\x20AWS\x20','getProvide','search','Using\x20Olla','Bedrock\x20Pr','2392371Tknpdt','Using\x20Anth'];a21_0x4ad1=function(){return _0x2ab6bc;};return a21_0x4ad1();}var a21_0x4d2052=a21_0x2387;(function(_0x30814c,_0x2f9c1a){var _0x3cb95b=a21_0x2387,_0x4bc5aa=_0x30814c();while(!![]){try{var _0x2e4694=-parseInt(_0x3cb95b(0x18d))/0x1+-parseInt(_0x3cb95b(0x163))/0x2*(-parseInt(_0x3cb95b(0x179))/0x3)+parseInt(_0x3cb95b(0x17f))/0x4*(-parseInt(_0x3cb95b(0x168))/0x5)+-parseInt(_0x3cb95b(0x18a))/0x6+parseInt(_0x3cb95b(0x183))/0x7*(parseInt(_0x3cb95b(0x17b))/0x8)+parseInt(_0x3cb95b(0x16c))/0x9*(-parseInt(_0x3cb95b(0x173))/0xa)+-parseInt(_0x3cb95b(0x16e))/0xb*(-parseInt(_0x3cb95b(0x164))/0xc);if(_0x2e4694===_0x2f9c1a)break;else _0x4bc5aa['push'](_0x4bc5aa['shift']());}catch(_0x180927){_0x4bc5aa['push'](_0x4bc5aa['shift']());}}}(a21_0x4ad1,0xaa343));var a21_0x3ac3ca=(function(){var _0x3f5fb6=!![];return function(_0x36082e,_0xff7e5f){var _0x55e505=_0x3f5fb6?function(){var _0x246832=a21_0x2387;if(_0xff7e5f){var _0x24885a=_0xff7e5f[_0x246832(0x169)](_0x36082e,arguments);return _0xff7e5f=null,_0x24885a;}}:function(){};return _0x3f5fb6=![],_0x55e505;};}()),a21_0x2aedc6=a21_0x3ac3ca(this,function(){var _0x4d1141=a21_0x2387;return a21_0x2aedc6[_0x4d1141(0x18c)]()[_0x4d1141(0x176)]('(((.+)+)+)'+'+$')[_0x4d1141(0x18c)]()[_0x4d1141(0x167)+'r'](a21_0x2aedc6)[_0x4d1141(0x176)](_0x4d1141(0x171)+'+$');});a21_0x2aedc6();import{appConfig}from'../../config/appConfig.js';function a21_0x2387(_0x5def0b,_0x50cb92){_0x5def0b=_0x5def0b-0x163;var _0x584a84=a21_0x4ad1();var _0x2aedc6=_0x584a84[_0x5def0b];return _0x2aedc6;}import{OllamaProvider}from'./OllamaProvider.js';import{OpenAIProvider}from'./OpenAIProvider.js';import{AnthropicProvider}from'./AnthropicProvider.js';import{GeminiProvider}from'./GeminiProvider.js';import{BedrockProvider}from'./BedrockProvider.js';import{logger}from'../../utils/logger.js';export class LLMFactory{static[a21_0x4d2052(0x175)+'r'](){var _0x4cd767=a21_0x4d2052;if(appConfig[_0x4cd767(0x16a)])return logger[_0x4cd767(0x170)](_0x4cd767(0x182)+_0x4cd767(0x172)+_0x4cd767(0x189)+appConfig[_0x4cd767(0x16a)][_0x4cd767(0x181)]+')'),new OpenAIProvider(appConfig[_0x4cd767(0x16a)][_0x4cd767(0x180)],appConfig['openai'][_0x4cd767(0x181)]);if(appConfig[_0x4cd767(0x17c)])return logger[_0x4cd767(0x170)](_0x4cd767(0x17a)+'ropic\x20Prov'+_0x4cd767(0x184)+'l:\x20'+appConfig[_0x4cd767(0x17c)][_0x4cd767(0x181)]+')'),new AnthropicProvider(appConfig[_0x4cd767(0x17c)][_0x4cd767(0x180)],appConfig[_0x4cd767(0x17c)][_0x4cd767(0x181)]);if(appConfig['gemini'])return logger[_0x4cd767(0x170)]('Using\x20Gemi'+_0x4cd767(0x16d)+_0x4cd767(0x189)+appConfig[_0x4cd767(0x17e)][_0x4cd767(0x181)]+')'),new GeminiProvider(appConfig[_0x4cd767(0x17e)][_0x4cd767(0x180)],appConfig[_0x4cd767(0x17e)][_0x4cd767(0x181)]);if(appConfig[_0x4cd767(0x16b)])return logger[_0x4cd767(0x170)](_0x4cd767(0x174)+_0x4cd767(0x178)+'ovider\x20(mo'+'del:\x20'+appConfig[_0x4cd767(0x16b)][_0x4cd767(0x181)]+')'),new BedrockProvider(appConfig['aws'][_0x4cd767(0x181)],appConfig[_0x4cd767(0x16b)]['region'],appConfig['aws'][_0x4cd767(0x18b)+'d'],appConfig[_0x4cd767(0x16b)][_0x4cd767(0x188)+'ssKey'],appConfig['aws'][_0x4cd767(0x17d)+'en']);if(appConfig[_0x4cd767(0x16f)]&&appConfig[_0x4cd767(0x16f)][_0x4cd767(0x165)])return logger[_0x4cd767(0x170)](_0x4cd767(0x177)+_0x4cd767(0x166)+'r\x20(model:\x20'+appConfig[_0x4cd767(0x16f)][_0x4cd767(0x181)]+')'),new OllamaProvider(appConfig[_0x4cd767(0x16f)][_0x4cd767(0x165)],appConfig[_0x4cd767(0x16f)][_0x4cd767(0x181)]);return logger[_0x4cd767(0x186)]('No\x20LLM\x20Pro'+_0x4cd767(0x185)+_0x4cd767(0x187)),null;}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1e6bab,_0x2a215a){var _0x21c3e9=a22_0x3ae0,_0x281931=_0x1e6bab();while(!![]){try{var _0x55a710=-parseInt(_0x21c3e9(0x18f))/0x1+parseInt(_0x21c3e9(0x191))/0x2+-parseInt(_0x21c3e9(0x18b))/0x3*(parseInt(_0x21c3e9(0x192))/0x4)+parseInt(_0x21c3e9(0x18a))/0x5*(parseInt(_0x21c3e9(0x18c))/0x6)+parseInt(_0x21c3e9(0x187))/0x7+parseInt(_0x21c3e9(0x190))/0x8+-parseInt(_0x21c3e9(0x186))/0x9;if(_0x55a710===_0x2a215a)break;else _0x281931['push'](_0x281931['shift']());}catch(_0x3d9683){_0x281931['push'](_0x281931['shift']());}}}(a22_0x40a5,0x23383));function a22_0x40a5(){var _0x319d74=['46766hBAAIA','32xACsgh','search','2005758URbNQw','617848EJtPON','apply','constructo','5bvEPGk','2637nZWtrR','367452SSGEHV','(((.+)+)+)','toString','4899cRFKvE','1649304uOeYzM'];a22_0x40a5=function(){return _0x319d74;};return a22_0x40a5();}var a22_0x153413=(function(){var _0x3634df=!![];return function(_0x45ccb8,_0x31d535){var _0x4213c6=_0x3634df?function(){var _0x593a57=a22_0x3ae0;if(_0x31d535){var _0x2c918f=_0x31d535[_0x593a57(0x188)](_0x45ccb8,arguments);return _0x31d535=null,_0x2c918f;}}:function(){};return _0x3634df=![],_0x4213c6;};}()),a22_0x38e508=a22_0x153413(this,function(){var _0x560292=a22_0x3ae0;return a22_0x38e508['toString']()[_0x560292(0x193)](_0x560292(0x18d)+'+$')[_0x560292(0x18e)]()[_0x560292(0x189)+'r'](a22_0x38e508)[_0x560292(0x193)](_0x560292(0x18d)+'+$');});a22_0x38e508();function a22_0x3ae0(_0x467f77,_0x4657f7){_0x467f77=_0x467f77-0x186;var _0x29aa63=a22_0x40a5();var _0x38e508=_0x29aa63[_0x467f77];return _0x38e508;}export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a23_0x49bc(){const _0x354726=['isAxiosErr','/api/gener','tion\x20timeo','stringify','15EYXxgn','2564163aXcWKb','547766ZsXUDa','1123339KwCzjF','\x20error:\x20','440932xLVRae','r.\x20Please\x20','2KgqjHy','timeout','(((.+)+)+)','constructo','baseUrl','Ollama\x20ser','post','nect\x20to\x20Ol','code','2185044bVVWnL','data','ver\x20connec','he\x20server\x20','ate','KyoxR','is\x20running','response','1140080FbUsqg','lama\x20serve','toString','\x20-\x20','model','search','1583700JIGnzV'];a23_0x49bc=function(){return _0x354726;};return a23_0x49bc();}const a23_0x7df4c9=a23_0x2e96;(function(_0x96e5ea,_0x14702d){const _0xd2e8ff=a23_0x2e96,_0x278234=_0x96e5ea();while(!![]){try{const _0xaf2130=-parseInt(_0xd2e8ff(0x8e))/0x1*(-parseInt(_0xd2e8ff(0x70))/0x2)+parseInt(_0xd2e8ff(0x8c))/0x3*(parseInt(_0xd2e8ff(0x91))/0x4)+-parseInt(_0xd2e8ff(0x87))/0x5+-parseInt(_0xd2e8ff(0x79))/0x6+parseInt(_0xd2e8ff(0x8f))/0x7+parseInt(_0xd2e8ff(0x81))/0x8+-parseInt(_0xd2e8ff(0x8d))/0x9;if(_0xaf2130===_0x14702d)break;else _0x278234['push'](_0x278234['shift']());}catch(_0xe9aa00){_0x278234['push'](_0x278234['shift']());}}}(a23_0x49bc,0x6a781));function a23_0x2e96(_0x1d1133,_0x3ce538){_0x1d1133=_0x1d1133-0x6f;const _0x3df432=a23_0x49bc();let _0x32ae0d=_0x3df432[_0x1d1133];return _0x32ae0d;}const a23_0x25bf6d=(function(){let _0x1e0ff0=!![];return function(_0x494b88,_0x5db9f3){const _0x37083b=_0x1e0ff0?function(){if(_0x5db9f3){const _0x2220b8=_0x5db9f3['apply'](_0x494b88,arguments);return _0x5db9f3=null,_0x2220b8;}}:function(){};return _0x1e0ff0=![],_0x37083b;};}()),a23_0x32ae0d=a23_0x25bf6d(this,function(){const _0xc951d=a23_0x2e96;return a23_0x32ae0d[_0xc951d(0x83)]()[_0xc951d(0x86)](_0xc951d(0x72)+'+$')[_0xc951d(0x83)]()[_0xc951d(0x73)+'r'](a23_0x32ae0d)['search'](_0xc951d(0x72)+'+$');});a23_0x32ae0d();import a23_0x5aed80 from'axios';export class OllamaProvider{[a23_0x7df4c9(0x74)];[a23_0x7df4c9(0x85)];constructor(_0x565f81,_0x3d2abe){const _0x3f0130=a23_0x7df4c9;this[_0x3f0130(0x74)]=_0x565f81,this['model']=_0x3d2abe;}async['generate'](_0x116f82){const _0x4777c0=a23_0x7df4c9,_0x26cd4b={};_0x26cd4b[_0x4777c0(0x7e)]=function(_0x53b2bd,_0x39e4f9){return _0x53b2bd===_0x39e4f9;};const _0x4eba9d=_0x26cd4b;try{const _0x402b1a={};_0x402b1a[_0x4777c0(0x71)]=0x493e0;const _0x3c92e0=await a23_0x5aed80[_0x4777c0(0x76)](this[_0x4777c0(0x74)]+(_0x4777c0(0x89)+_0x4777c0(0x7d)),{'model':this[_0x4777c0(0x85)],'prompt':_0x116f82,'stream':![]},_0x402b1a);return _0x3c92e0[_0x4777c0(0x7a)]['response'];}catch(_0x2b127b){if(a23_0x5aed80[_0x4777c0(0x88)+'or'](_0x2b127b)){if(_0x4eba9d[_0x4777c0(0x7e)](_0x2b127b['code'],'ECONNREFUS'+'ED'))throw new Error('Cannot\x20con'+_0x4777c0(0x77)+_0x4777c0(0x82)+_0x4777c0(0x6f)+'check\x20if\x20t'+_0x4777c0(0x7c)+_0x4777c0(0x7f)+'.');else{if(_0x4eba9d[_0x4777c0(0x7e)](_0x2b127b[_0x4777c0(0x78)],'ETIMEDOUT'))throw new Error(_0x4777c0(0x75)+_0x4777c0(0x7b)+_0x4777c0(0x8a)+'ut');else{if(_0x2b127b[_0x4777c0(0x80)])throw new Error('Ollama\x20API'+_0x4777c0(0x90)+_0x2b127b[_0x4777c0(0x80)]['status']+_0x4777c0(0x84)+JSON[_0x4777c0(0x8b)](_0x2b127b[_0x4777c0(0x80)]['data']));}}}throw _0x2b127b;}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a24_0x54dc69=a24_0x1d98;(function(_0x10d7f1,_0x2bddc9){const _0x3c2d43=a24_0x1d98,_0x1317db=_0x10d7f1();while(!![]){try{const _0x5d7880=parseInt(_0x3c2d43(0x14f))/0x1*(parseInt(_0x3c2d43(0x158))/0x2)+parseInt(_0x3c2d43(0x15b))/0x3*(parseInt(_0x3c2d43(0x151))/0x4)+parseInt(_0x3c2d43(0x14c))/0x5*(-parseInt(_0x3c2d43(0x159))/0x6)+parseInt(_0x3c2d43(0x14b))/0x7+parseInt(_0x3c2d43(0x15c))/0x8*(-parseInt(_0x3c2d43(0x155))/0x9)+-parseInt(_0x3c2d43(0x15a))/0xa+parseInt(_0x3c2d43(0x156))/0xb;if(_0x5d7880===_0x2bddc9)break;else _0x1317db['push'](_0x1317db['shift']());}catch(_0x26d454){_0x1317db['push'](_0x1317db['shift']());}}}(a24_0x12ce,0xc3120));const a24_0x4b7beb=(function(){let _0x445348=!![];return function(_0x2b7c0b,_0x287871){const _0x2f3d78=_0x445348?function(){if(_0x287871){const _0x2b9fb7=_0x287871['apply'](_0x2b7c0b,arguments);return _0x287871=null,_0x2b9fb7;}}:function(){};return _0x445348=![],_0x2f3d78;};}()),a24_0x35cb74=a24_0x4b7beb(this,function(){const _0x448a8=a24_0x1d98;return a24_0x35cb74['toString']()['search'](_0x448a8(0x150)+'+$')['toString']()[_0x448a8(0x153)+'r'](a24_0x35cb74)[_0x448a8(0x14e)](_0x448a8(0x150)+'+$');});a24_0x35cb74();import a24_0x51f73a from'openai';function a24_0x1d98(_0x1de98a,_0x1de1d0){_0x1de98a=_0x1de98a-0x14b;const _0x2ab1e1=a24_0x12ce();let _0x35cb74=_0x2ab1e1[_0x1de98a];return _0x35cb74;}export class OpenAIProvider{[a24_0x54dc69(0x15e)];[a24_0x54dc69(0x14d)];constructor(_0x5d3ce3,_0x5c1321){const _0x4e54c7=a24_0x54dc69;this[_0x4e54c7(0x15e)]=_0x5c1321;const _0x1fc181={};_0x1fc181[_0x4e54c7(0x154)]=_0x5d3ce3,this[_0x4e54c7(0x14d)]=new a24_0x51f73a(_0x1fc181);}async[a24_0x54dc69(0x152)](_0x522e64){const _0x2abab6=a24_0x54dc69,_0x597f0b={};_0x597f0b['role']='user',_0x597f0b[_0x2abab6(0x15d)]=_0x522e64;const _0x444d2c=await this['client']['chat']['completion'+'s']['create']({'model':this['model'],'messages':[_0x597f0b]});return _0x444d2c['choices'][0x0][_0x2abab6(0x157)][_0x2abab6(0x15d)]||'';}}function a24_0x12ce(){const _0x3ecfb2=['6856uYEaxN','content','model','2964514yZLZnC','59995VMiGgV','client','search','12553fMUejs','(((.+)+)+)','4NANqRa','generate','constructo','apiKey','5562IsAdWH','24697992cLVQet','message','18yyyBvo','468vYCDnv','14419620HgEMiO','2774301vpSgSj'];a24_0x12ce=function(){return _0x3ecfb2;};return a24_0x12ce();}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LLMResponse } from '../types/types.js';
|
|
2
2
|
export declare class LLMService {
|
|
3
|
-
private
|
|
4
|
-
private model;
|
|
3
|
+
private provider;
|
|
5
4
|
constructor();
|
|
6
5
|
generateAnalysisBrief(analysisResult: any): Promise<LLMResponse>;
|
|
7
6
|
generateSecureCode(originalCode: string, vulnerabilities: any[]): Promise<LLMResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a25_0x1e931e=a25_0x3eb7;(function(_0x4be60f,_0x2d7086){const _0x41c989=a25_0x3eb7,_0x5c8f3a=_0x4be60f();while(!![]){try{const _0x3e0b4d=parseInt(_0x41c989(0x1db))/0x1*(parseInt(_0x41c989(0x20a))/0x2)+parseInt(_0x41c989(0x1ec))/0x3*(parseInt(_0x41c989(0x1ab))/0x4)+parseInt(_0x41c989(0x1b0))/0x5*(-parseInt(_0x41c989(0x21b))/0x6)+parseInt(_0x41c989(0x1bc))/0x7+-parseInt(_0x41c989(0x1d8))/0x8*(parseInt(_0x41c989(0x1a6))/0x9)+parseInt(_0x41c989(0x220))/0xa+parseInt(_0x41c989(0x1d9))/0xb;if(_0x3e0b4d===_0x2d7086)break;else _0x5c8f3a['push'](_0x5c8f3a['shift']());}catch(_0x174fd7){_0x5c8f3a['push'](_0x5c8f3a['shift']());}}}(a25_0x563f,0xce976));const a25_0x1c7554=(function(){let _0x287c05=!![];return function(_0x11b8a6,_0x3d0435){const _0x15d741=_0x287c05?function(){if(_0x3d0435){const _0xd01588=_0x3d0435['apply'](_0x11b8a6,arguments);return _0x3d0435=null,_0xd01588;}}:function(){};return _0x287c05=![],_0x15d741;};}()),a25_0x45b616=a25_0x1c7554(this,function(){const _0xd48d04=a25_0x3eb7;return a25_0x45b616['toString']()[_0xd48d04(0x1e2)]('(((.+)+)+)'+'+$')[_0xd48d04(0x1cc)]()[_0xd48d04(0x20c)+'r'](a25_0x45b616)[_0xd48d04(0x1e2)](_0xd48d04(0x1ff)+'+$');});a25_0x45b616();import{logger}from'../utils/logger.js';import{LLMFactory}from'./llm/LLMFactory.js';function a25_0x3eb7(_0x1edd40,_0x137ff9){_0x1edd40=_0x1edd40-0x199;const _0x289ea2=a25_0x563f();let _0x45b616=_0x289ea2[_0x1edd40];return _0x45b616;}function a25_0x563f(){const _0x584e59=['lain\x20secur','cureCodeBr','generateSe','is\x20results','\x20best\x20prac','classifica','provider','(((.+)+)+)','\x20code\x20read','wing\x20secur','ew\x20the\x20raw','DaBHA','\x20following','es\x0a3.\x20Over','e:\x0a```java','enerate\x20se','\x0a3.\x20Applie','content','1474ucYUyz','de\x20and\x20sec','constructo','re\x20code\x20ba','generate\x20a','Please\x20gen','t\x0a\x0aPlease\x20','iginal\x20Cod','ents:\x0a1.\x20G','iefing.','ters.','ava\x0a','write\x20the\x20','se\x20write\x20t','pply\x20secur','ode\x20qualit','success','18QyxbyD','error','d\x20include:','Brief\x20desc','g\x20in\x20appro','5561540qTLRDl','ditional\x20t','\x20functiona','Unknown\x20er','found\x20and\x20','\x0a```\x0a\x0aSecu','ity\x20vulner','neration\x20s','that\x20fixes','jor\x20securi',':\x0a\x0aAnalysi','uration\x20no','\x0a4.\x20Areas\x20','kipped.','te\x20a\x20simpl','n\x20is\x20disab','stringify','briefing\x20i','es:\x0a','t\x20found.','ments\x0a2.\x20F','re\x20Code:\x0a`','ity\x20analys','ity\x20best\x20p','tion\x20by\x20se','nalysis\x20br','utomated\x20s','riefing\x20ge','lish\x20compa','ror','verity\x0a2.\x20','ext):','ions\x20or\x20ad','generate','overed\x20Vul','2727xxCgPW','\x20the\x20follo','getProvide','results.','300\x20charac','2700860KKhhaZ','hould\x20incl','fing\x20shoul','\x20of\x20vulner','\x0a\x0aRequirem','516590suJDkc','\x20code\x20and\x20','cure\x20code\x20','generate\x20L','\x20briefing:','ximately\x203','generateAn','t\x20found.\x20P','s\x20briefing','\x0aOriginal\x20','nerabiliti','s\x20Results:','678069GlIHDr','lity\x20as\x20th','\x20security\x20','ure\x20code:\x0a','\x20code\x0a3.\x20A','ately\x20200-','t\x20found.\x20A','sed\x20on\x20the','e\x20original','ief','\x20generatio','Vkfzs','Failed\x20to\x20','all\x20securi','abilities\x0a','2.\x20Maintai','toString','h\x20based\x20on','\x20Add\x20comme','``java\x0a','abilities\x20','\x20major\x20vul','led.','discovered','t\x20found.\x20B','rabilities','ring\x20the\x20f','ixed\x20vulne','41592qdHFjf','4020687fkLYyc','.\x20Maintain','1408OZvAtk','ents\x0a\x0aPlea','Please\x20wri','alysisBrie','ements\x0a\x0aPl','that\x20need\x20','te\x20a\x20brief','search','Code:\x0a```j','e\x20and\x20clea','nts\x20to\x20exp','message','racters.','ability\x0a5.','generate\x20s','y\x20improvem','n\x20only\x20the','3gshFvX','de\x20(withou','\x0a```\x0a\x0aThe\x20','riginal\x20co','\x20briefing.','r\x20briefing','ity\x20improv','\x0a```\x0a\x0aDisc','briefing\x20s','LLM\x20config','he\x20briefin','TJsAl'];a25_0x563f=function(){return _0x584e59;};return a25_0x563f();}export class LLMService{['provider'];constructor(){const _0x353a10=a25_0x3eb7;this[_0x353a10(0x1fe)]=LLMFactory[_0x353a10(0x1a8)+'r']();}async[a25_0x1e931e(0x1b6)+a25_0x1e931e(0x1de)+'f'](_0x3cf855){const _0x39b18d=a25_0x1e931e,_0x484213={};_0x484213[_0x39b18d(0x1c7)]=_0x39b18d(0x1c8)+_0x39b18d(0x20e)+_0x39b18d(0x19c)+_0x39b18d(0x213),_0x484213[_0x39b18d(0x1f7)]=function(_0x365420,_0x5c7b91){return _0x365420 instanceof _0x5c7b91;};const _0x411a60=_0x484213;if(!this['provider']){const _0xb03dba={};return _0xb03dba[_0x39b18d(0x209)]='LLM\x20config'+_0x39b18d(0x22b)+_0x39b18d(0x1b7)+'lease\x20revi'+_0x39b18d(0x202)+'\x20analysis\x20'+_0x39b18d(0x1a9),_0xb03dba[_0x39b18d(0x21a)]=!![],_0xb03dba;}try{const _0x285fb7=_0x39b18d(0x1dd)+_0x39b18d(0x22e)+_0x39b18d(0x1e4)+_0x39b18d(0x1f1)+'\x20in\x20Englis'+_0x39b18d(0x1cd)+_0x39b18d(0x1a7)+_0x39b18d(0x201)+_0x39b18d(0x199)+_0x39b18d(0x1fb)+_0x39b18d(0x22a)+_0x39b18d(0x1bb)+'\x0a'+JSON['stringify'](_0x3cf855,null,0x2)+('\x0a\x0aThe\x20brie'+_0x39b18d(0x1ad)+_0x39b18d(0x21d)+'\x0a1.\x20Number'+_0x39b18d(0x1ae)+_0x39b18d(0x1d0)+_0x39b18d(0x224)+_0x39b18d(0x1fd)+_0x39b18d(0x19b)+_0x39b18d(0x1a1)+_0x39b18d(0x21e)+'ription\x20of'+_0x39b18d(0x1d1)+_0x39b18d(0x1ba)+_0x39b18d(0x205)+_0x39b18d(0x1c9)+'ty\x20status\x20'+'assessment'+_0x39b18d(0x22c)+_0x39b18d(0x1e0)+'improvemen'+_0x39b18d(0x210)+_0x39b18d(0x216)+_0x39b18d(0x231)+'n\x20approxim'+_0x39b18d(0x1c1)+_0x39b18d(0x1aa)+_0x39b18d(0x214)),_0x5dfb7e=await this[_0x39b18d(0x1fe)][_0x39b18d(0x1a4)](_0x285fb7),_0x564486={};return _0x564486['content']=_0x5dfb7e,_0x564486[_0x39b18d(0x21a)]=!![],_0x564486;}catch(_0x9ec507){return logger[_0x39b18d(0x21c)]('Failed\x20to\x20'+_0x39b18d(0x1b3)+'LM\x20analysi'+_0x39b18d(0x1b8)+':',_0x9ec507),{'content':_0x411a60[_0x39b18d(0x1c7)],'success':![],'error':_0x411a60[_0x39b18d(0x1f7)](_0x9ec507,Error)?_0x9ec507['message']:_0x39b18d(0x223)+_0x39b18d(0x1a0)};}}async[a25_0x1e931e(0x1fa)+'cureCode'](_0x1e7d33,_0x273b81){const _0x5969f5=a25_0x1e931e,_0x4a3565={};_0x4a3565[_0x5969f5(0x203)]=function(_0x5394c9,_0xf3658d){return _0x5394c9 instanceof _0xf3658d;};const _0x166006=_0x4a3565;if(!this[_0x5969f5(0x1fe)]){const _0x35a07f={};return _0x35a07f[_0x5969f5(0x209)]=_0x1e7d33,_0x35a07f['success']=![],_0x35a07f[_0x5969f5(0x21c)]=_0x5969f5(0x1f5)+_0x5969f5(0x22b)+_0x5969f5(0x1c2)+_0x5969f5(0x19d)+'ecure\x20code'+_0x5969f5(0x1c6)+_0x5969f5(0x22f)+_0x5969f5(0x1d2),_0x35a07f;}try{const _0x7560b7=_0x5969f5(0x20f)+'erate\x20secu'+_0x5969f5(0x20d)+_0x5969f5(0x1c3)+_0x5969f5(0x204)+_0x5969f5(0x1b1)+_0x5969f5(0x1d3)+_0x5969f5(0x1be)+'vulnerabil'+'ities:\x0a\x0aOr'+_0x5969f5(0x211)+_0x5969f5(0x206)+'\x0a'+_0x1e7d33+(_0x5969f5(0x1f3)+_0x5969f5(0x1a5)+_0x5969f5(0x1ba)+_0x5969f5(0x232))+JSON[_0x5969f5(0x230)](_0x273b81,null,0x2)+(_0x5969f5(0x1af)+_0x5969f5(0x212)+_0x5969f5(0x207)+_0x5969f5(0x1b2)+_0x5969f5(0x228)+'\x20all\x20secur'+_0x5969f5(0x226)+_0x5969f5(0x1ca)+_0x5969f5(0x1cb)+'n\x20the\x20same'+_0x5969f5(0x222)+_0x5969f5(0x1bd)+_0x5969f5(0x1c4)+_0x5969f5(0x1c0)+_0x5969f5(0x218)+_0x5969f5(0x19a)+'ractices\x0a4'+_0x5969f5(0x1da)+_0x5969f5(0x200)+_0x5969f5(0x1e8)+_0x5969f5(0x1ce)+_0x5969f5(0x1e5)+_0x5969f5(0x1f8)+_0x5969f5(0x1f2)+_0x5969f5(0x1df)+'ease\x20retur'+_0x5969f5(0x1eb)+'\x20secure\x20co'+_0x5969f5(0x1ed)+'t\x20explanat'+_0x5969f5(0x1a3)+_0x5969f5(0x221)+_0x5969f5(0x1a2)),_0x4e16c0=await this[_0x5969f5(0x1fe)][_0x5969f5(0x1a4)](_0x7560b7),_0x41b722={};return _0x41b722['content']=_0x4e16c0,_0x41b722['success']=!![],_0x41b722;}catch(_0xf97acd){return logger[_0x5969f5(0x21c)](_0x5969f5(0x1c8)+_0x5969f5(0x1e9)+'ecure\x20code'+':',_0xf97acd),{'content':_0x1e7d33,'success':![],'error':_0x166006[_0x5969f5(0x203)](_0xf97acd,Error)?_0xf97acd[_0x5969f5(0x1e6)]:'Unknown\x20er'+'ror'};}}async[a25_0x1e931e(0x1fa)+a25_0x1e931e(0x1f9)+a25_0x1e931e(0x1c5)](_0x225351,_0x55dec5){const _0x18d872=a25_0x1e931e;if(!this[_0x18d872(0x1fe)]){const _0x101ca6={};return _0x101ca6[_0x18d872(0x209)]=_0x18d872(0x1f5)+_0x18d872(0x22b)+_0x18d872(0x1d4)+_0x18d872(0x19e)+_0x18d872(0x227)+_0x18d872(0x22d),_0x101ca6[_0x18d872(0x21a)]=![],_0x101ca6[_0x18d872(0x21c)]=_0x18d872(0x1f5)+_0x18d872(0x22b)+_0x18d872(0x233),_0x101ca6;}try{const _0xb46885=_0x18d872(0x1dd)+_0x18d872(0x1e1)+'ing\x20in\x20Eng'+_0x18d872(0x19f)+_0x18d872(0x1d6)+'ollowing\x20o'+_0x18d872(0x1ef)+_0x18d872(0x20b)+_0x18d872(0x1bf)+_0x18d872(0x1b9)+_0x18d872(0x1e3)+_0x18d872(0x215)+_0x225351+(_0x18d872(0x225)+_0x18d872(0x235)+_0x18d872(0x1cf))+_0x55dec5+(_0x18d872(0x1ee)+_0x18d872(0x1f4)+_0x18d872(0x1ac)+'ude:\x0a1.\x20Ma'+_0x18d872(0x229)+'ty\x20improve'+_0x18d872(0x234)+_0x18d872(0x1d7)+_0x18d872(0x1d5)+_0x18d872(0x208)+'d\x20security'+_0x18d872(0x1fc)+'tices\x0a4.\x20C'+_0x18d872(0x219)+_0x18d872(0x1ea)+_0x18d872(0x1dc)+_0x18d872(0x217)+_0x18d872(0x1f6)+_0x18d872(0x21f)+_0x18d872(0x1b5)+'00-400\x20cha'+_0x18d872(0x1e7)),_0x14d2b7=await this['provider']['generate'](_0xb46885),_0xe77dc0={};return _0xe77dc0[_0x18d872(0x209)]=_0x14d2b7,_0xe77dc0['success']=!![],_0xe77dc0;}catch(_0x5104bf){logger[_0x18d872(0x21c)](_0x18d872(0x1c8)+_0x18d872(0x1e9)+'ecure\x20code'+_0x18d872(0x1b4),_0x5104bf);const _0x31b4cd={};return _0x31b4cd[_0x18d872(0x209)]='Failed\x20to\x20'+_0x18d872(0x1e9)+'ecure\x20code'+_0x18d872(0x1f0),_0x31b4cd[_0x18d872(0x21a)]=![],_0x31b4cd['error']=_0x5104bf instanceof Error?_0x5104bf[_0x18d872(0x1e6)]:_0x18d872(0x223)+_0x18d872(0x1a0),_0x31b4cd;}}}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { S3UploadResult } from '../types/types.js';
|
|
2
|
+
export declare class S3Service {
|
|
3
|
+
private bucket;
|
|
4
|
+
private region;
|
|
5
|
+
private accessKeyId;
|
|
6
|
+
private secretAccessKey;
|
|
7
|
+
private endpoint?;
|
|
8
|
+
private s3;
|
|
9
|
+
constructor();
|
|
10
|
+
private getDecryptedAccessKey;
|
|
11
|
+
private getDecryptedSecretKey;
|
|
12
|
+
private getDecryptedBucket;
|
|
13
|
+
uploadFile(fileContent: string, fileName: string): Promise<S3UploadResult>;
|
|
14
|
+
private createZipFile;
|
|
15
|
+
uploadMultipleFiles(files: Array<{
|
|
16
|
+
fileName: string;
|
|
17
|
+
fileContent: string;
|
|
18
|
+
}>, zipFileName?: string): Promise<S3UploadResult>;
|
|
19
|
+
private sanitizeFileName;
|
|
20
|
+
private createZipFromMultipleFiles;
|
|
21
|
+
uploadFilesFromPaths(filePaths: string[], zipFileName?: string): Promise<S3UploadResult>;
|
|
22
|
+
private createZipFromFilePaths;
|
|
23
|
+
uploadZipFile(zipFilePath: string, s3Key?: string): Promise<S3UploadResult>;
|
|
24
|
+
uploadFolderAsZip(folderPath: string, zipFileName?: string): Promise<S3UploadResult>;
|
|
25
|
+
private createZipFromFolder;
|
|
26
|
+
private sanitizePathInZip;
|
|
27
|
+
downloadFile(key: string): Promise<{
|
|
28
|
+
success: boolean;
|
|
29
|
+
content?: string;
|
|
30
|
+
error?: string;
|
|
31
|
+
}>;
|
|
32
|
+
private buildObjectUrl;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a26_0x5c2e(_0x420699,_0x572105){_0x420699=_0x420699-0x185;const _0x4dd82e=a26_0x3e74();let _0x5b2f3a=_0x4dd82e[_0x420699];return _0x5b2f3a;}const a26_0x3ac4ec=a26_0x5c2e;(function(_0x1baf25,_0x2c3776){const _0x2747c0=a26_0x5c2e,_0x53cf0d=_0x1baf25();while(!![]){try{const _0x3cc676=parseInt(_0x2747c0(0x23a))/0x1*(parseInt(_0x2747c0(0x25e))/0x2)+parseInt(_0x2747c0(0x236))/0x3+-parseInt(_0x2747c0(0x19d))/0x4+parseInt(_0x2747c0(0x1a7))/0x5+parseInt(_0x2747c0(0x199))/0x6*(parseInt(_0x2747c0(0x246))/0x7)+-parseInt(_0x2747c0(0x1cc))/0x8*(-parseInt(_0x2747c0(0x214))/0x9)+-parseInt(_0x2747c0(0x223))/0xa*(parseInt(_0x2747c0(0x248))/0xb);if(_0x3cc676===_0x2c3776)break;else _0x53cf0d['push'](_0x53cf0d['shift']());}catch(_0x1aec47){_0x53cf0d['push'](_0x53cf0d['shift']());}}}(a26_0x3e74,0x4ff0f));const a26_0x2b25b=(function(){let _0x58832e=!![];return function(_0x145a1b,_0x4bbfa2){const _0x240a1f=_0x58832e?function(){if(_0x4bbfa2){const _0x180573=_0x4bbfa2['apply'](_0x145a1b,arguments);return _0x4bbfa2=null,_0x180573;}}:function(){};return _0x58832e=![],_0x240a1f;};}()),a26_0x5b2f3a=a26_0x2b25b(this,function(){const _0x399f58=a26_0x5c2e,_0x5a3677={};_0x5a3677[_0x399f58(0x219)]=_0x399f58(0x1e4)+'+$';const _0x1ad0ec=_0x5a3677;return a26_0x5b2f3a['toString']()['search']('(((.+)+)+)'+'+$')[_0x399f58(0x228)]()['constructo'+'r'](a26_0x5b2f3a)[_0x399f58(0x24b)](_0x1ad0ec['IiJSd']);});function a26_0x3e74(){const _0x4b9bd5=['success','Access\x20Key','.com/','용이\x20비어있습니다','다운로드된\x20파일\x20내','MB까지\x20허용됩니다','aksIZ','경로가\x20기준\x20폴더\x20','rDLIu','호화\x20실패','스토리지\x20파일\x20업로','zlib','trim','fileConten','8ZVQQUQ','xuzgZ','romFilePat','includes','\x20KB)','Secret\x20Acc','pes','폴더가\x20아닙니다:\x20','\x20너무\x20큽니다.\x20최','.next','tLYOZ','resolve','isAbsolute','Code','now','wGqcU','(건너뜀):\x20','.s3.','패:\x20','파일\x20크기가\x20너무\x20','개):\x20','accessKeyI','byteLength','심볼릭\x20링크가\x20기준','(((.+)+)+)','buildObjec','leName','PWBUL','\x20무시:','build','.cache','bucket','W1dZRgF/PA','data','FDDhEJ','finalize','Stream','\x20업로드\x20실패:','thInZip','edSecretKe','simTe','.gradle','GLbZj','ZYTDc1ICIq','match','onents','fileName','접근\x20실패\x20(건너뜀','습니다:\x0a','fileCount','Z8Rw==','.DS_Store','zip','zipPath','length','총\x20파일\x20크기가\x20너','relative','Body','개\x20파일)','getDecrypt','파일\x20압축\x20추가\x20실','화\x20실패:','Link','region','coverage','slice','니다:\x0a','createZipF','UCnhN','ZIP\x20파일을\x20찾을','파일\x20정보\x20조회\x20실','폴더\x20압축\x20업로드\x20','700389ARHtrh','romFolder','파일\x20업로드\x20성공:','\x20(에러\x20코드:\x20','.idea','IiJSd','eHVVg','Unknown\x20er','ZIP\x20파일\x20스토리','size','폴더\x20탐색\x20실패:\x20','readdirSyn','.\x20(발견:\x20','파일\x20다운로드\x20성공','t\x20Access\x20K','13162340ROBWRV','push','tUrl','습니다.','ile','toString','이름\x20복호화\x20실패','순환\x20심볼릭\x20링크\x20','archiver','send','ssKey','기화\x20완료:\x20리전=','무\x20큽니다.\x20최대\x20','스토리지\x20Secre','폴더를\x20찾을\x20수\x20없','JaKD4uJUEZ','isFile','content','multiple-f','766779OPOcaQ','.vscode','bower_comp','downloadFi','61204YGcUWk','유효한\x20파일이\x20없습','obj','existsSync','파일\x20스트림\x20오류\x20','.git','sFromPaths','버킷\x20이름\x20복호화\x20','iles-','us-east-1','스토리지\x20컨테이너\x20','성공:\x20','4212579xmoaUH','node_modul','11vZkaFp','파일\x20검증\x20실패:\x20','replace','search','edAccessKe','다중\x20파일\x20업로드\x20','.svn','isDirector','최대\x20디렉토리\x20깊이','realpathSy','\x20(건너뜀):\x20','utf8','jyOdF','n/zip','basename','jHsiR','concat','AJfvk','드\x20실패:','sanitizePa','\x20폴더\x20밖을\x20가리킴','toFixed','16wSgWbb','st-2','startsWith','ipleFiles','has','out','default','isSymbolic','.amazonaws','개\x20파일을\x20건너뛰었','ap-northea','.zip','lstatSync','vendor','ZGh/Ygc=','message','밖으로\x20나감\x20(건너','erAsZip','split','uploadMult','statSync','스토리지\x20파일\x20경로','endsWith','eFiles','uploadFile','ror','info','지\x20업로드\x20실패:','input/','로드\x20성공:\x20','endpoint','\x20->\x20','dist','폴더\x20스캔\x20중\x20오류','MB)','OdkWc','end','\x20기반\x20업로드\x20실패','감지\x20(건너뜀):\x20','ZIP\x20파일\x20크기가','applicatio','warn','EngWClY3G3','S3\x20클라이언트\x20초','filePath','\x20수\x20없습니다:\x20','sep','https://s3','giqqs','totalSize','target','):\x20','6Azxwzx','개별\x20항목\x20처리\x20중','압축된\x20파일\x20크기가','join','1571556GzcIOo','sanitizeFi','Jn4eEwgeMz','파일을\x20찾을\x20수\x20없','body','Message','secretAcce','romMultipl','폴더\x20압축\x20스토리지','name','3058595bxMVWE','업로드할\x20파일이\x20없','withFileTy','제외된\x20폴더\x20(','path','습니다:\x20','뜀):\x20','경로\x20정규화\x20실패\x20','bin','error','.hg','edBucket','\x20-\x20','cwd','native','패\x20(건너뜀):\x20','close','니다:\x20','createRead','level','s\x20Key\x20ID\x20복','$response','append'];a26_0x3e74=function(){return _0x4b9bd5;};return a26_0x3e74();}a26_0x5b2f3a();import{S3Client,PutObjectCommand,GetObjectCommand}from'@aws-sdk/client-s3';import{appConfig}from'../config/appConfig.js';import{logger}from'../utils/logger.js';import{decryptInternal}from'../utils/crypto.util.js';const ENCRYPTED_ACCESS_KEY_ID=a26_0x3ac4ec(0x18f)+a26_0x3ac4ec(0x232)+a26_0x3ac4ec(0x26c),ENCRYPTED_SECRET_ACCESS_KEY=a26_0x3ac4ec(0x19f)+a26_0x3ac4ec(0x1f7)+a26_0x3ac4ec(0x1ec)+'A1PA0SHi0K'+'HRknHVVUYw'+a26_0x3ac4ec(0x1fe),ENCRYPTED_BUCKET_NAME='PF07LggYMS'+a26_0x3ac4ec(0x1ee),STORAGE_REGION_DEFAULT=a26_0x3ac4ec(0x268)+a26_0x3ac4ec(0x25f),DEFAULT_EXCLUDE_FOLDERS=[a26_0x3ac4ec(0x247)+'es',a26_0x3ac4ec(0x23f),a26_0x3ac4ec(0x185),a26_0x3ac4ec(0x1e9),a26_0x3ac4ec(0x1d5),a26_0x3ac4ec(0x263),a26_0x3ac4ec(0x20c),'__pycache_'+'_',a26_0x3ac4ec(0x1ea),a26_0x3ac4ec(0x237),a26_0x3ac4ec(0x218),a26_0x3ac4ec(0x26b),a26_0x3ac4ec(0x238)+a26_0x3ac4ec(0x1f9),a26_0x3ac4ec(0x1f5),a26_0x3ac4ec(0x197),a26_0x3ac4ec(0x1af),a26_0x3ac4ec(0x23c),a26_0x3ac4ec(0x24e),a26_0x3ac4ec(0x1b1),a26_0x3ac4ec(0x1ff)];export class S3Service{[a26_0x3ac4ec(0x1eb)];['region'];[a26_0x3ac4ec(0x1e1)+'d'];['secretAcce'+'ssKey'];[a26_0x3ac4ec(0x27c)];['s3'];constructor(){const _0x8579c9=a26_0x3ac4ec;this[_0x8579c9(0x1eb)]=appConfig['s3'][_0x8579c9(0x1eb)]||this['getDecrypt'+_0x8579c9(0x1b2)](),this[_0x8579c9(0x20b)]=appConfig['s3']['region']&&appConfig['s3'][_0x8579c9(0x20b)]!==_0x8579c9(0x243)?appConfig['s3'][_0x8579c9(0x20b)]:STORAGE_REGION_DEFAULT,this[_0x8579c9(0x27c)]=appConfig['s3']['endpoint'],this[_0x8579c9(0x1e1)+'d']=this[_0x8579c9(0x207)+_0x8579c9(0x24c)+'y'](),this['secretAcce'+_0x8579c9(0x22d)]=this[_0x8579c9(0x207)+_0x8579c9(0x1f3)+'y']();const _0x5a6fc7=this[_0x8579c9(0x27c)]||_0x8579c9(0x194)+'.'+this[_0x8579c9(0x20b)]+(_0x8579c9(0x266)+'.com');this['s3']=new S3Client({'region':this[_0x8579c9(0x20b)],'credentials':{'accessKeyId':this[_0x8579c9(0x1e1)+'d'],'secretAccessKey':this[_0x8579c9(0x1a3)+_0x8579c9(0x22d)]},'endpoint':_0x5a6fc7,'forcePathStyle':!![]}),logger['info'](_0x8579c9(0x190)+_0x8579c9(0x22e)+this['region']);}[a26_0x3ac4ec(0x207)+'edAccessKe'+'y'](){const _0x1e2bd4=a26_0x3ac4ec,_0x5ec24f={};_0x5ec24f[_0x1e2bd4(0x210)]='스토리지\x20Acces'+_0x1e2bd4(0x1bb)+_0x1e2bd4(0x1c7);const _0x33305d=_0x5ec24f;if(appConfig['s3'][_0x1e2bd4(0x1e1)+'d'])return appConfig['s3'][_0x1e2bd4(0x1e1)+'d'];try{return decryptInternal(ENCRYPTED_ACCESS_KEY_ID);}catch(_0x290d0c){logger[_0x1e2bd4(0x1b0)](_0x1e2bd4(0x1bf)+'\x20ID\x20복호화\x20실패'+':',_0x290d0c);throw new Error(_0x33305d[_0x1e2bd4(0x210)]);}}[a26_0x3ac4ec(0x207)+a26_0x3ac4ec(0x1f3)+'y'](){const _0x37a4ee=a26_0x3ac4ec;if(appConfig['s3'][_0x37a4ee(0x1a3)+_0x37a4ee(0x22d)])return appConfig['s3'][_0x37a4ee(0x1a3)+_0x37a4ee(0x22d)];try{return decryptInternal(ENCRYPTED_SECRET_ACCESS_KEY);}catch(_0x4b94e5){logger['error'](_0x37a4ee(0x1d1)+'ess\x20Key\x20복호'+_0x37a4ee(0x209),_0x4b94e5);throw new Error(_0x37a4ee(0x230)+_0x37a4ee(0x222)+'ey\x20복호화\x20실패');}}['getDecrypt'+a26_0x3ac4ec(0x1b2)](){const _0x589853=a26_0x3ac4ec;if(appConfig['s3'][_0x589853(0x1eb)])return appConfig['s3'][_0x589853(0x1eb)];try{return decryptInternal(ENCRYPTED_BUCKET_NAME);}catch(_0x1efb4e){logger[_0x589853(0x1b0)](_0x589853(0x241)+'실패:',_0x1efb4e);throw new Error(_0x589853(0x244)+_0x589853(0x229));}}async[a26_0x3ac4ec(0x276)](_0x213495,_0x26090e){const _0x5c7653=a26_0x3ac4ec,_0x466338={};_0x466338[_0x5c7653(0x1e7)]=_0x5c7653(0x1c8)+_0x5c7653(0x25a);const _0x13d1b9=_0x466338;try{const _0x3b7a77=0x64*0x400*0x400,_0x314697=Buffer['byteLength'](_0x213495,_0x5c7653(0x253));if(_0x314697>_0x3b7a77)throw new Error(_0x5c7653(0x1df)+'큽니다.\x20최대\x20'+_0x3b7a77/0x400/0x400+('MB까지\x20허용됩니다'+'.'));const _0x2b3b3b=this['sanitizeFi'+_0x5c7653(0x1e6)](_0x26090e),_0x27a860=await this[_0x5c7653(0x20f)+_0x5c7653(0x227)](_0x213495,_0x2b3b3b),_0x5048e8=0x64*0x400*0x400;if(_0x27a860[_0x5c7653(0x202)]>_0x5048e8)throw new Error(_0x5c7653(0x19b)+_0x5c7653(0x1d4)+'대\x20'+_0x5048e8/0x400/0x400+('MB까지\x20허용됩니다'+'.'));const _0x2fd34a=_0x5c7653(0x27a)+Date[_0x5c7653(0x1da)]()+'-'+_0x2b3b3b+'.zip';return await this['s3'][_0x5c7653(0x22c)](new PutObjectCommand({'Bucket':this[_0x5c7653(0x1eb)],'Key':_0x2fd34a,'Body':_0x27a860,'ContentType':_0x5c7653(0x18d)+_0x5c7653(0x255)})),logger[_0x5c7653(0x278)](_0x5c7653(0x216)+'\x20'+_0x2fd34a),{'success':!![],'key':_0x2fd34a,'url':this['buildObjec'+_0x5c7653(0x225)](_0x2fd34a)};}catch(_0x4b78c8){logger['error'](_0x13d1b9['PWBUL'],_0x4b78c8);let _0x50b57f=_0x5c7653(0x21b)+_0x5c7653(0x277);if(_0x4b78c8 instanceof Error){_0x50b57f=_0x4b78c8[_0x5c7653(0x26d)];const _0x27fe19=_0x4b78c8;if(_0x27fe19[_0x5c7653(0x1bc)]?.[_0x5c7653(0x1a1)]){const _0x42dcb9=_0x27fe19[_0x5c7653(0x1bc)]['body'];_0x42dcb9[_0x5c7653(0x1d9)]&&(_0x50b57f+=_0x5c7653(0x217)+_0x42dcb9[_0x5c7653(0x1d9)]+')'),_0x42dcb9[_0x5c7653(0x1a2)]&&(_0x50b57f+='\x20('+_0x42dcb9[_0x5c7653(0x1a2)]+')');}}const _0x40c900={};return _0x40c900[_0x5c7653(0x1be)]=![],_0x40c900[_0x5c7653(0x1b0)]=_0x50b57f,_0x40c900;}}async[a26_0x3ac4ec(0x20f)+a26_0x3ac4ec(0x227)](_0x3da71e,_0x4d3391){const _0x5f2a8b=await import('archiver');return new Promise((_0x843527,_0x4ce183)=>{const _0x1ef1e2=a26_0x5c2e,_0x5e0890=[],_0x1f02ec={};_0x1f02ec['level']=0x9;const _0xbe886e={};_0xbe886e[_0x1ef1e2(0x1c9)]=_0x1f02ec;const _0x525d5a=_0x5f2a8b[_0x1ef1e2(0x264)](_0x1ef1e2(0x200),_0xbe886e);_0x525d5a['on']('data',_0x381b0b=>_0x5e0890[_0x1ef1e2(0x224)](_0x381b0b)),_0x525d5a['on'](_0x1ef1e2(0x189),()=>_0x843527(Buffer[_0x1ef1e2(0x258)](_0x5e0890))),_0x525d5a['on'](_0x1ef1e2(0x1b0),_0x4ce183);const _0x2c612c={};_0x2c612c['name']=_0x4d3391,_0x525d5a[_0x1ef1e2(0x1bd)](_0x3da71e,_0x2c612c),_0x525d5a[_0x1ef1e2(0x1ef)]();});}async[a26_0x3ac4ec(0x271)+a26_0x3ac4ec(0x261)](_0xbc59cf,_0xaf2b71){const _0x5269b7=a26_0x3ac4ec,_0x57f9c2={};_0x57f9c2[_0x5269b7(0x188)]=function(_0x2498c6,_0x3a7874){return _0x2498c6/_0x3a7874;};const _0x58e90c=_0x57f9c2;try{if(!_0xbc59cf||_0xbc59cf['length']===0x0)throw new Error(_0x5269b7(0x1a8)+_0x5269b7(0x226));const _0x483bbf=_0xbc59cf['map'](_0x51ff9c=>({'fileName':this[_0x5269b7(0x19e)+_0x5269b7(0x1e6)](_0x51ff9c[_0x5269b7(0x1fa)]),'fileContent':_0x51ff9c['fileConten'+'t']})),_0x3d242f=0x64*0x400*0x400,_0x54787a=_0x483bbf['reduce']((_0x3aa985,_0x8b0345)=>_0x3aa985+Buffer[_0x5269b7(0x1e2)](_0x8b0345[_0x5269b7(0x1cb)+'t'],_0x5269b7(0x253)),0x0);if(_0x54787a>_0x3d242f)throw new Error(_0x5269b7(0x203)+_0x5269b7(0x22f)+_0x58e90c['OdkWc'](_0x58e90c[_0x5269b7(0x188)](_0x3d242f,0x400),0x400)+(_0x5269b7(0x1c3)+'.'));const _0x4464dd=await this[_0x5269b7(0x20f)+_0x5269b7(0x1a4)+'eFiles'](_0x483bbf),_0x4efa7a=0x64*0x400*0x400;if(_0x4464dd[_0x5269b7(0x202)]>_0x4efa7a)throw new Error('압축된\x20파일\x20크기가'+_0x5269b7(0x1d4)+'대\x20'+_0x58e90c['OdkWc'](_0x4efa7a,0x400)/0x400+(_0x5269b7(0x1c3)+'.'));const _0x5cac0f=Date[_0x5269b7(0x1da)](),_0x65f21e=_0xaf2b71?this[_0x5269b7(0x19e)+_0x5269b7(0x1e6)](_0xaf2b71,_0x5269b7(0x269)):'multiple-f'+_0x5269b7(0x242)+_0x5cac0f+_0x5269b7(0x269),_0xb87747=_0x5269b7(0x27a)+_0x5cac0f+'-'+_0x65f21e;return await this['s3'][_0x5269b7(0x22c)](new PutObjectCommand({'Bucket':this[_0x5269b7(0x1eb)],'Key':_0xb87747,'Body':_0x4464dd,'ContentType':_0x5269b7(0x18d)+_0x5269b7(0x255)})),logger[_0x5269b7(0x278)](_0x5269b7(0x24d)+'성공:\x20'+_0xb87747+'\x20('+_0xbc59cf[_0x5269b7(0x202)]+_0x5269b7(0x206)),{'success':!![],'key':_0xb87747,'url':this['buildObjec'+_0x5269b7(0x225)](_0xb87747)};}catch(_0xd72774){logger['error']('스토리지\x20다중\x20파일'+_0x5269b7(0x1f1),_0xd72774);const _0x3de8b0={};return _0x3de8b0[_0x5269b7(0x1be)]=![],_0x3de8b0[_0x5269b7(0x1b0)]=_0xd72774 instanceof Error?_0xd72774[_0x5269b7(0x26d)]:_0x5269b7(0x21b)+_0x5269b7(0x277),_0x3de8b0;}}[a26_0x3ac4ec(0x19e)+a26_0x3ac4ec(0x1e6)](_0x20dda6,_0x421ad4){const _0x42e1dd=a26_0x3ac4ec;if(!_0x20dda6||_0x20dda6[_0x42e1dd(0x1ca)]()[_0x42e1dd(0x202)]===0x0)return'file_'+Date[_0x42e1dd(0x1da)]()+(_0x421ad4||'');let _0x2509e4=_0x20dda6[_0x42e1dd(0x24a)](/\.\./g,'')[_0x42e1dd(0x24a)](/[\/\\]/g,'_')[_0x42e1dd(0x24a)](/^[\/\\]+/,'')[_0x42e1dd(0x1ca)]();_0x2509e4=_0x2509e4['replace'](/[<>:"|?*\x00-\x1f]/g,'_');if(_0x2509e4[_0x42e1dd(0x202)]>0xff){const _0x29793f=_0x2509e4[_0x42e1dd(0x1f8)](/\.([^.]+)$/),_0x49aaf1=_0x29793f?'.'+_0x29793f[0x1]:'',_0x11f072=_0x2509e4[_0x42e1dd(0x20d)](0x0,_0x2509e4[_0x42e1dd(0x202)]-_0x49aaf1['length']);_0x2509e4=_0x11f072[_0x42e1dd(0x20d)](0x0,0xff-_0x49aaf1[_0x42e1dd(0x202)])+_0x49aaf1;}if(_0x421ad4&&!_0x2509e4[_0x42e1dd(0x274)](_0x421ad4)){const _0x23223c=_0x2509e4[_0x42e1dd(0x1f8)](/\.[^.]+$/)?.[0x0];!_0x23223c&&(_0x2509e4+=_0x421ad4);}return _0x2509e4||'file_'+Date[_0x42e1dd(0x1da)]()+(_0x421ad4||'');}async[a26_0x3ac4ec(0x20f)+a26_0x3ac4ec(0x1a4)+a26_0x3ac4ec(0x275)](_0x2b01c9){const _0x48d098=a26_0x3ac4ec,_0x5a8e94={};_0x5a8e94[_0x48d098(0x1d6)]=_0x48d098(0x189);const _0x2be43d=_0x5a8e94,_0x320dee=await import(_0x48d098(0x22b));return new Promise((_0x51218a,_0xa89533)=>{const _0x147ef2=_0x48d098,_0x4cf76f=[],_0x1279e5={};_0x1279e5[_0x147ef2(0x1ba)]=0x9;const _0x30487f={};_0x30487f[_0x147ef2(0x1c9)]=_0x1279e5;const _0x4cc8fe=_0x320dee[_0x147ef2(0x264)](_0x147ef2(0x200),_0x30487f);_0x4cc8fe['on'](_0x147ef2(0x1ed),_0x377454=>_0x4cf76f['push'](_0x377454)),_0x4cc8fe['on'](_0x2be43d[_0x147ef2(0x1d6)],()=>_0x51218a(Buffer['concat'](_0x4cf76f))),_0x4cc8fe['on'](_0x147ef2(0x1b0),_0xa89533);for(const _0x37279c of _0x2b01c9){_0x4cc8fe[_0x147ef2(0x1bd)](_0x37279c[_0x147ef2(0x1cb)+'t'],{'name':_0x37279c[_0x147ef2(0x1fa)]});}_0x4cc8fe[_0x147ef2(0x1ef)]();});}async['uploadFile'+a26_0x3ac4ec(0x240)](_0x378607,_0x14096b){const _0x2dbdb2=a26_0x3ac4ec;try{const _0x165ad4=await import('fs'),_0x5a3924=await import('path');if(!_0x378607||_0x378607[_0x2dbdb2(0x202)]===0x0)throw new Error(_0x2dbdb2(0x1a8)+_0x2dbdb2(0x226));const _0x1fa013=[],_0x375e7a=[];for(const _0x28c9b7 of _0x378607){try{const _0x3ce24a=_0x5a3924[_0x2dbdb2(0x264)]['isAbsolute'](_0x28c9b7)?_0x28c9b7:_0x5a3924[_0x2dbdb2(0x264)][_0x2dbdb2(0x1d7)](process['cwd'](),_0x28c9b7);if(!_0x165ad4[_0x2dbdb2(0x23d)](_0x3ce24a)){_0x375e7a['push'](_0x2dbdb2(0x1a0)+_0x2dbdb2(0x1ac)+_0x28c9b7);continue;}const _0x248687=_0x165ad4[_0x2dbdb2(0x272)](_0x3ce24a);if(!_0x248687[_0x2dbdb2(0x233)]()){_0x375e7a['push']('파일이\x20아닙니다:\x20'+_0x28c9b7);continue;}_0x1fa013['push'](_0x3ce24a);}catch(_0x3da89b){_0x375e7a[_0x2dbdb2(0x224)](_0x2dbdb2(0x249)+_0x28c9b7+_0x2dbdb2(0x1b3)+(_0x3da89b instanceof Error?_0x3da89b[_0x2dbdb2(0x26d)]:'Unknown\x20er'+'ror'));}}if(_0x1fa013[_0x2dbdb2(0x202)]===0x0)throw new Error(_0x2dbdb2(0x23b)+_0x2dbdb2(0x20e)+_0x375e7a['join']('\x0a'));_0x375e7a[_0x2dbdb2(0x202)]>0x0&&logger[_0x2dbdb2(0x18e)](_0x375e7a[_0x2dbdb2(0x202)]+(_0x2dbdb2(0x267)+_0x2dbdb2(0x1fc))+_0x375e7a['join']('\x0a'));const _0x942591=await this['createZipF'+_0x2dbdb2(0x1ce)+'hs'](_0x1fa013),_0x1e2e1e=0x64*0x400*0x400;if(_0x942591[_0x2dbdb2(0x202)]>_0x1e2e1e)throw new Error(_0x2dbdb2(0x19b)+'\x20너무\x20큽니다.\x20최'+'대\x20'+_0x1e2e1e/0x400/0x400+(_0x2dbdb2(0x1c3)+'.'));const _0x29f122=Date[_0x2dbdb2(0x1da)](),_0x5cbe0a=_0x14096b?this['sanitizeFi'+_0x2dbdb2(0x1e6)](_0x14096b,_0x2dbdb2(0x269)):_0x2dbdb2(0x235)+_0x2dbdb2(0x242)+_0x29f122+_0x2dbdb2(0x269),_0xdbee44=_0x2dbdb2(0x27a)+_0x29f122+'-'+_0x5cbe0a;return await this['s3']['send'](new PutObjectCommand({'Bucket':this[_0x2dbdb2(0x1eb)],'Key':_0xdbee44,'Body':_0x942591,'ContentType':_0x2dbdb2(0x18d)+_0x2dbdb2(0x255)})),logger['info']('파일\x20경로\x20기반\x20업'+_0x2dbdb2(0x27b)+_0xdbee44+'\x20('+_0x1fa013[_0x2dbdb2(0x202)]+'개\x20파일)'),{'success':!![],'key':_0xdbee44,'url':this[_0x2dbdb2(0x1e5)+'tUrl'](_0xdbee44)};}catch(_0x2ef745){logger[_0x2dbdb2(0x1b0)](_0x2dbdb2(0x273)+_0x2dbdb2(0x18a)+':',_0x2ef745);const _0x32ac3e={};return _0x32ac3e[_0x2dbdb2(0x1be)]=![],_0x32ac3e[_0x2dbdb2(0x1b0)]=_0x2ef745 instanceof Error?_0x2ef745['message']:_0x2dbdb2(0x21b)+_0x2dbdb2(0x277),_0x32ac3e;}}async[a26_0x3ac4ec(0x20f)+a26_0x3ac4ec(0x1ce)+'hs'](_0x333126){const _0x5ae155=a26_0x3ac4ec,_0x5b9c9f={};_0x5b9c9f['JaIKG']=_0x5ae155(0x189),_0x5b9c9f[_0x5ae155(0x1c6)]=_0x5ae155(0x1ab);const _0x29338f=_0x5b9c9f,_0x51b2b3=await import(_0x5ae155(0x22b)),_0x1c350c=await import('fs'),_0x32c68e=await import(_0x29338f[_0x5ae155(0x1c6)]);return new Promise((_0x1ac9e7,_0x85f675)=>{const _0x5bc7e2=_0x5ae155,_0x3d3512={};_0x3d3512[_0x5bc7e2(0x21a)]=function(_0x34e712,_0x13bd92){return _0x34e712>=_0x13bd92;};const _0x188025=_0x3d3512,_0x12dc91=[],_0xa04ae9={};_0xa04ae9['level']=0x9;const _0x54376d={};_0x54376d[_0x5bc7e2(0x1c9)]=_0xa04ae9;const _0x44cdec=_0x51b2b3[_0x5bc7e2(0x264)](_0x5bc7e2(0x200),_0x54376d);_0x44cdec['on']('data',_0x59a0a3=>_0x12dc91[_0x5bc7e2(0x224)](_0x59a0a3)),_0x44cdec['on'](_0x29338f['JaIKG'],()=>_0x1ac9e7(Buffer[_0x5bc7e2(0x258)](_0x12dc91))),_0x44cdec['on'](_0x5bc7e2(0x1b0),_0x85f675);const _0x4fb940=0x14;let _0x351855=0x0,_0x46f3f7=0x0,_0x4e9e30=![];const _0x53d45d=()=>{const _0x4dba7d=_0x5bc7e2;if(_0x4e9e30||_0x188025['eHVVg'](_0x351855,_0x333126['length'])){_0x46f3f7===0x0&&_0x351855>=_0x333126[_0x4dba7d(0x202)]&&_0x44cdec[_0x4dba7d(0x1ef)]();return;}while(_0x46f3f7<_0x4fb940&&_0x351855<_0x333126['length']){const _0x523c25=_0x333126[_0x351855++];_0x46f3f7++;try{const _0x39aa27=_0x32c68e['default'][_0x4dba7d(0x256)](_0x523c25),_0x2f1818=this[_0x4dba7d(0x19e)+_0x4dba7d(0x1e6)](_0x39aa27),_0x174c91=_0x1c350c[_0x4dba7d(0x1b9)+_0x4dba7d(0x1f0)](_0x523c25);_0x174c91['on'](_0x4dba7d(0x1b0),_0x3f1590=>{const _0x2ac8f3=_0x4dba7d;_0x46f3f7--,logger[_0x2ac8f3(0x18e)](_0x2ac8f3(0x23e)+_0x2ac8f3(0x1dc)+_0x523c25,_0x3f1590),_0x53d45d();}),_0x174c91['on'](_0x4dba7d(0x1b7),()=>{_0x46f3f7--,_0x53d45d();});const _0x4460e8={};_0x4460e8[_0x4dba7d(0x1a6)]=_0x2f1818,_0x44cdec[_0x4dba7d(0x1bd)](_0x174c91,_0x4460e8);}catch(_0x5d7d52){_0x46f3f7--,logger[_0x4dba7d(0x1b0)](_0x4dba7d(0x208)+_0x4dba7d(0x1de)+_0x523c25,_0x5d7d52),_0x53d45d();}}};_0x53d45d(),_0x44cdec['on']('error',()=>{_0x4e9e30=!![];});});}async['uploadZipF'+a26_0x3ac4ec(0x227)](_0x4b6656,_0x77dc4b){const _0x59db2a=a26_0x3ac4ec,_0x13621e={};_0x13621e[_0x59db2a(0x1f6)]=function(_0x2f3f24,_0x33f39c){return _0x2f3f24/_0x33f39c;};const _0x4ad1ce=_0x13621e;try{const _0x4242aa=await import('fs'),_0x505bc8=await import('path'),_0x2cf0df=_0x505bc8['default']['isAbsolute'](_0x4b6656)?_0x4b6656:_0x505bc8['default'][_0x59db2a(0x1d7)](process[_0x59db2a(0x1b4)](),_0x4b6656);if(!_0x4242aa[_0x59db2a(0x23d)](_0x2cf0df))throw new Error(_0x59db2a(0x211)+_0x59db2a(0x192)+_0x4b6656);const _0x6e81ab=_0x4242aa['statSync'](_0x2cf0df);if(!_0x6e81ab[_0x59db2a(0x233)]())throw new Error('ZIP\x20파일이\x20아닙'+_0x59db2a(0x1b8)+_0x4b6656);const _0x5e9761=_0x6e81ab[_0x59db2a(0x21d)],_0x57d68b=0xc8*0x400*0x400;if(_0x5e9761>_0x57d68b)throw new Error(_0x59db2a(0x18c)+_0x59db2a(0x1d4)+'대\x20'+_0x4ad1ce[_0x59db2a(0x1f6)](_0x57d68b,0x400)/0x400+(_0x59db2a(0x1c3)+'.'));const _0x544d8c=_0x4242aa[_0x59db2a(0x1b9)+_0x59db2a(0x1f0)](_0x2cf0df),_0x244704=[];for await(const _0x1e0f26 of _0x544d8c){_0x244704[_0x59db2a(0x224)](_0x1e0f26);}const _0x46b316=Buffer['concat'](_0x244704),_0x94db47=Date[_0x59db2a(0x1da)](),_0x3120d1=_0x505bc8['default'][_0x59db2a(0x256)](_0x2cf0df),_0x374c1b=this[_0x59db2a(0x19e)+_0x59db2a(0x1e6)](_0x3120d1,_0x59db2a(0x269)),_0x5ca96f=_0x77dc4b||_0x59db2a(0x27a)+_0x94db47+'-'+_0x374c1b;return await this['s3']['send'](new PutObjectCommand({'Bucket':this[_0x59db2a(0x1eb)],'Key':_0x5ca96f,'Body':_0x46b316,'ContentType':_0x59db2a(0x18d)+_0x59db2a(0x255)})),logger[_0x59db2a(0x278)]('ZIP\x20파일\x20업로드'+'\x20성공:\x20'+_0x5ca96f+'\x20('+(_0x5e9761/0x400)[_0x59db2a(0x25d)](0x2)+_0x59db2a(0x1d0)),{'success':!![],'key':_0x5ca96f,'url':this['buildObjec'+_0x59db2a(0x225)](_0x5ca96f)};}catch(_0xc43322){logger[_0x59db2a(0x1b0)](_0x59db2a(0x21c)+_0x59db2a(0x279),_0xc43322);const _0x3485d2={};return _0x3485d2['success']=![],_0x3485d2['error']=_0xc43322 instanceof Error?_0xc43322['message']:'Unknown\x20er'+_0x59db2a(0x277),_0x3485d2;}}async['uploadFold'+a26_0x3ac4ec(0x26f)](_0x8a21c9,_0x39ffcb){const _0x376646=a26_0x3ac4ec,_0x1f4da4={};_0x1f4da4[_0x376646(0x1c4)]=function(_0x25788c,_0x14fa91){return _0x25788c===_0x14fa91;},_0x1f4da4[_0x376646(0x254)]=function(_0x53628b,_0x341468){return _0x53628b>_0x341468;},_0x1f4da4[_0x376646(0x1f4)]=function(_0x464151,_0x33b77d){return _0x464151/_0x33b77d;};const _0x4f0b99=_0x1f4da4;try{const _0x433d2a=await import('fs'),_0x22f82e=await import('path'),_0x5c6bba=_0x22f82e['default'][_0x376646(0x1d8)](_0x8a21c9)?_0x8a21c9:_0x22f82e[_0x376646(0x264)][_0x376646(0x1d7)](process[_0x376646(0x1b4)](),_0x8a21c9);if(!_0x433d2a['existsSync'](_0x5c6bba))throw new Error(_0x376646(0x231)+_0x376646(0x1ac)+_0x8a21c9);const _0x25cd4b=_0x433d2a[_0x376646(0x272)](_0x5c6bba);if(!_0x25cd4b[_0x376646(0x24f)+'y']())throw new Error(_0x376646(0x1d3)+_0x8a21c9);const _0x172cec=await this[_0x376646(0x20f)+'romFolder'](_0x5c6bba),{buffer:_0x3db488,skippedFolders:_0x8e2ab}=_0x172cec;_0x4f0b99[_0x376646(0x254)](_0x8e2ab['length'],0x0)&&logger[_0x376646(0x278)](_0x376646(0x1aa)+_0x8e2ab[_0x376646(0x202)]+_0x376646(0x1e0)+_0x8e2ab['join'](',\x20'));const _0x312ea0=0xc8*0x400*0x400;if(_0x4f0b99[_0x376646(0x254)](_0x3db488[_0x376646(0x202)],_0x312ea0))throw new Error('압축된\x20파일\x20크기가'+_0x376646(0x1d4)+'대\x20'+_0x4f0b99[_0x376646(0x1f4)](_0x312ea0/0x400,0x400)+(_0x376646(0x1c3)+'.'));const _0x4a7f1d=Date[_0x376646(0x1da)](),_0x49d754=_0x22f82e[_0x376646(0x264)][_0x376646(0x256)](_0x5c6bba),_0x2d4004=_0x39ffcb?this[_0x376646(0x19e)+_0x376646(0x1e6)](_0x39ffcb,_0x376646(0x269)):_0x49d754+'-'+_0x4a7f1d+_0x376646(0x269),_0x2d3500=_0x376646(0x27a)+_0x4a7f1d+'-'+_0x2d4004;return await this['s3'][_0x376646(0x22c)](new PutObjectCommand({'Bucket':this['bucket'],'Key':_0x2d3500,'Body':_0x3db488,'ContentType':'applicatio'+_0x376646(0x255)})),logger[_0x376646(0x278)](_0x376646(0x213)+_0x376646(0x245)+_0x2d3500+'\x20('+(_0x3db488[_0x376646(0x202)]/0x400)[_0x376646(0x25d)](0x2)+_0x376646(0x1d0)),{'success':!![],'key':_0x2d3500,'url':this[_0x376646(0x1e5)+_0x376646(0x225)](_0x2d3500),'skippedFolders':_0x8e2ab[_0x376646(0x202)]>0x0?_0x8e2ab:undefined};}catch(_0x3d6cb0){if('BCSKN'==='BCSKN'){logger[_0x376646(0x1b0)](_0x376646(0x1a5)+_0x376646(0x1f1),_0x3d6cb0);const _0xa5e1ff={};return _0xa5e1ff[_0x376646(0x1be)]=![],_0xa5e1ff[_0x376646(0x1b0)]=_0x3d6cb0 instanceof Error?_0x3d6cb0[_0x376646(0x26d)]:_0x376646(0x21b)+_0x376646(0x277),_0xa5e1ff;}else{_0x4f0b99[_0x376646(0x1c4)](_0x2c64cc,0x0)&&_0xa62b57>=_0x14ab23[_0x376646(0x202)]&&_0x58a65f['finalize']();return;}}}async['createZipF'+a26_0x3ac4ec(0x215)](_0x4dbe06){const _0x5ad1dd=a26_0x3ac4ec,_0x24d779={};_0x24d779['AJfvk']=_0x5ad1dd(0x189);const _0x91683e=_0x24d779,_0x4b6e2e=await import('archiver'),_0x399b88=await import('fs'),_0xb59d5b=await import(_0x5ad1dd(0x1ab));return new Promise((_0x1f6a2a,_0x56998b)=>{const _0x2626c1=_0x5ad1dd,_0x2e3278={};_0x2e3278[_0x2626c1(0x1db)]='jHsiR';const _0x446209=_0x2e3278,_0x397f49=[],_0x2b21b5={};_0x2b21b5[_0x2626c1(0x1ba)]=0x9;const _0x2b79b6={};_0x2b79b6[_0x2626c1(0x1c9)]=_0x2b21b5;const _0x124ce3=_0x4b6e2e[_0x2626c1(0x264)](_0x2626c1(0x200),_0x2b79b6);_0x124ce3['on']('data',_0x287f23=>_0x397f49[_0x2626c1(0x224)](_0x287f23)),_0x124ce3['on'](_0x91683e[_0x2626c1(0x259)],()=>_0x1f6a2a({'buffer':Buffer[_0x2626c1(0x258)](_0x397f49),'skippedFolders':_0x46e35b})),_0x124ce3['on'](_0x2626c1(0x1b0),_0x56998b);const _0x29f411=0x32,_0x3245d7=new Set(),_0x46e35b=[],_0x33b1cb=(_0x500238,_0x7a2f99)=>{const _0x40e9a4=_0x2626c1;try{const _0x53ced7=_0xb59d5b['resolve'](_0x500238),_0x5d25eb=_0xb59d5b[_0x40e9a4(0x1d7)](_0x7a2f99);if(!_0x53ced7[_0x40e9a4(0x260)](_0x5d25eb+_0xb59d5b[_0x40e9a4(0x193)])&&_0x53ced7!==_0x5d25eb)return logger['warn'](_0x40e9a4(0x1c5)+_0x40e9a4(0x26e)+_0x40e9a4(0x1ad)+_0x500238),null;return _0x53ced7;}catch(_0x28335a){return logger[_0x40e9a4(0x18e)](_0x40e9a4(0x1ae)+_0x40e9a4(0x1dc)+_0x500238,_0x28335a),null;}};let _0x9b7faa=0x0;const _0x35df93=0x3e8,_0x55a5dc=0x64*0x400*0x400;let _0x31addc=0x0;const _0x5971ee=(_0x4341ea,_0x35bd1d,_0x5aacaf=0x0)=>{const _0x1b0955=_0x2626c1,_0x2a5b20={};_0x2a5b20['pPmHc']=function(_0x5ff1d,_0x2e2636){return _0x5ff1d/_0x2e2636;};const _0x498254=_0x2a5b20;if(_0x5aacaf>_0x29f411){const _0x4de51e={};return _0x4de51e[_0x1b0955(0x1fd)]=0x0,_0x4de51e[_0x1b0955(0x196)]=0x0,_0x4de51e;}let _0x3f7664=0x0,_0x39e20f=0x0;try{if(_0x1b0955(0x257)!==_0x446209[_0x1b0955(0x1db)]){_0x45d72f(new _0x4bee2c(_0x1b0955(0x203)+_0x1b0955(0x22f)+_0x48a492/0x400/0x400+('MB까지\x20허용됩니다'+_0x1b0955(0x220))+_0x498254['pPmHc'](_0x32fa3b['totalSize']/0x400,0x400)[_0x1b0955(0x25d)](0x2)+_0x1b0955(0x187)));return;}else{const _0x5edd52=_0x33b1cb(_0x4341ea,_0x35bd1d);if(!_0x5edd52){const _0x1e446c={};return _0x1e446c[_0x1b0955(0x1fd)]=0x0,_0x1e446c['totalSize']=0x0,_0x1e446c;}const _0x47b387={};_0x47b387[_0x1b0955(0x1a9)+_0x1b0955(0x1d2)]=!![];const _0x4ac280=_0x399b88[_0x1b0955(0x21f)+'c'](_0x5edd52,_0x47b387);for(const _0x1221f1 of _0x4ac280){const _0x15054e=_0xb59d5b[_0x1b0955(0x19c)](_0x5edd52,_0x1221f1['name']),_0x8307f9=_0x33b1cb(_0x15054e,_0x35bd1d);if(!_0x8307f9)continue;try{const _0x5478d8=_0x399b88[_0x1b0955(0x26a)](_0x8307f9);if(_0x5478d8[_0x1b0955(0x265)+_0x1b0955(0x20a)]())continue;const _0x300736=_0x399b88['statSync'](_0x8307f9);if(_0x300736['isDirector'+'y']()){if(DEFAULT_EXCLUDE_FOLDERS['includes'](_0x1221f1[_0x1b0955(0x1a6)])){const _0x1a10ce=_0xb59d5b[_0x1b0955(0x204)](_0x35bd1d,_0x8307f9);!_0x46e35b[_0x1b0955(0x1cf)](_0x1a10ce)&&_0x46e35b[_0x1b0955(0x224)](_0x1a10ce);continue;}const _0x1f5f4e=_0x5971ee(_0x8307f9,_0x35bd1d,_0x5aacaf+0x1);_0x3f7664+=_0x1f5f4e[_0x1b0955(0x1fd)],_0x39e20f+=_0x1f5f4e[_0x1b0955(0x196)];}else{if(_0x300736[_0x1b0955(0x233)]()){_0x3f7664++,_0x39e20f+=_0x300736[_0x1b0955(0x21d)];if(_0x3f7664>_0x35df93||_0x39e20f>_0x55a5dc){const _0x5ac51f={};return _0x5ac51f[_0x1b0955(0x1fd)]=_0x3f7664,_0x5ac51f[_0x1b0955(0x196)]=_0x39e20f,_0x5ac51f;}}}}catch(_0x53faed){logger[_0x1b0955(0x18e)](_0x1b0955(0x19a)+'\x20오류\x20무시:',_0x53faed);}}}}catch(_0x52f2fa){logger['warn'](_0x1b0955(0x186)+_0x1b0955(0x1e8),_0x52f2fa);}const _0x46b16f={};return _0x46b16f[_0x1b0955(0x1fd)]=_0x3f7664,_0x46b16f[_0x1b0955(0x196)]=_0x39e20f,_0x46b16f;},_0x377c3c=_0xb59d5b['resolve'](_0x4dbe06),_0x5c0695=_0x5971ee(_0x4dbe06,_0x377c3c);if(_0x5c0695[_0x2626c1(0x196)]>_0x55a5dc){_0x56998b(new Error(_0x2626c1(0x203)+_0x2626c1(0x22f)+_0x55a5dc/0x400/0x400+(_0x2626c1(0x1c3)+_0x2626c1(0x220))+(_0x5c0695['totalSize']/0x400/0x400)[_0x2626c1(0x25d)](0x2)+_0x2626c1(0x187)));return;}const _0x55ba84=[],_0x3d34c9=(_0x4fbe38,_0x28b631,_0x61d9d7=0x0)=>{const _0x3e47cb=_0x2626c1;if(_0x61d9d7>_0x29f411){logger['warn'](_0x3e47cb(0x250)+'에\x20도달했습니다\x20('+_0x29f411+'):\x20'+_0x4fbe38);return;}try{const _0x8cbf3f=_0x33b1cb(_0x4fbe38,_0x28b631);if(!_0x8cbf3f)return;const _0x5a60b4={};_0x5a60b4[_0x3e47cb(0x1a9)+_0x3e47cb(0x1d2)]=!![];const _0x189887=_0x399b88['readdirSyn'+'c'](_0x8cbf3f,_0x5a60b4);for(const _0x2649ef of _0x189887){const _0x43a917=_0xb59d5b[_0x3e47cb(0x19c)](_0x8cbf3f,_0x2649ef['name']),_0x461d6b=_0x33b1cb(_0x43a917,_0x28b631);if(!_0x461d6b)continue;try{let _0x1e5fdb=_0x399b88[_0x3e47cb(0x26a)](_0x461d6b);const _0x23756c=_0x1e5fdb[_0x3e47cb(0x265)+_0x3e47cb(0x20a)]();if(_0x23756c){const _0x584298=_0x399b88[_0x3e47cb(0x251)+'nc']['native'](_0x461d6b),_0x2379d5=_0x33b1cb(_0x584298,_0x28b631);if(!_0x2379d5){logger[_0x3e47cb(0x18e)](_0x3e47cb(0x1e3)+_0x3e47cb(0x25c)+_0x3e47cb(0x252)+_0x43a917+_0x3e47cb(0x27d)+_0x584298);continue;}const _0x2547b8=_0x461d6b+'->'+_0x2379d5;if(_0x3245d7[_0x3e47cb(0x262)](_0x2547b8)){logger['warn'](_0x3e47cb(0x22a)+_0x3e47cb(0x18b)+_0x43a917);continue;}_0x3245d7['add'](_0x2547b8);try{_0x1e5fdb=_0x399b88[_0x3e47cb(0x272)](_0x2379d5);}catch(_0x5e7df8){logger[_0x3e47cb(0x18e)]('심볼릭\x20링크\x20대상\x20'+_0x3e47cb(0x1fb)+_0x3e47cb(0x198)+_0x43a917,_0x5e7df8);continue;}}const _0x29bad6=_0x1e5fdb;if(_0x29bad6['isDirector'+'y']()){if(DEFAULT_EXCLUDE_FOLDERS[_0x3e47cb(0x1cf)](_0x2649ef[_0x3e47cb(0x1a6)]))continue;const _0x3bb507=_0x23756c?_0x33b1cb(_0x399b88['realpathSy'+'nc'][_0x3e47cb(0x1b5)](_0x461d6b),_0x28b631):_0x461d6b;_0x3bb507&&_0x3d34c9(_0x3bb507,_0x28b631,_0x61d9d7+0x1);}else{if(_0x29bad6[_0x3e47cb(0x233)]()){if(_0x3e47cb(0x1cd)===_0x3e47cb(0x1cd)){const _0x3cb35d=_0x23756c?_0x33b1cb(_0x399b88[_0x3e47cb(0x251)+'nc'][_0x3e47cb(0x1b5)](_0x461d6b),_0x28b631):_0x461d6b;if(_0x3cb35d){const _0x1c7d42=_0xb59d5b[_0x3e47cb(0x204)](_0x28b631,_0x461d6b),_0x45367f=_0x1c7d42['replace'](/\\/g,'/'),_0x533cf9=this[_0x3e47cb(0x25b)+_0x3e47cb(0x1f2)](_0x45367f),_0x416325={};_0x416325[_0x3e47cb(0x191)]=_0x3cb35d,_0x416325['zipPath']=_0x533cf9,_0x55ba84[_0x3e47cb(0x224)](_0x416325);}}else throw new _0xc4c00a(_0x3e47cb(0x1a8)+_0x3e47cb(0x226));}}}catch(_0x75745e){if(_0x3e47cb(0x195)==='DptYZ'){const _0x392cd8=_0x2ee4ff[_0x3e47cb(0x1d7)](_0x30faa4),_0xc10cc0=_0x596018[_0x3e47cb(0x1d7)](_0x3ac5ca);if(!_0x392cd8[_0x3e47cb(0x260)](_0xc10cc0+_0x9121d4[_0x3e47cb(0x193)])&&_0x392cd8!==_0xc10cc0)return _0x5593f3['warn'](_0x3e47cb(0x1c5)+_0x3e47cb(0x26e)+_0x3e47cb(0x1ad)+_0x4d314f),null;return _0x392cd8;}else logger[_0x3e47cb(0x18e)](_0x3e47cb(0x212)+_0x3e47cb(0x1b6)+_0x43a917,_0x75745e);}}}catch(_0x4c9e4e){logger['error'](_0x3e47cb(0x21e)+_0x4fbe38,_0x4c9e4e);}};_0x3d34c9(_0x377c3c,_0x377c3c);const _0x228ade=0x14;let _0x173414=0x0,_0x1c9c03=0x0,_0x5b375c=![];const _0x594bd8=()=>{const _0xc6e49c=_0x2626c1;if(_0x5b375c||_0x173414>=_0x55ba84[_0xc6e49c(0x202)]){_0x1c9c03===0x0&&_0x173414>=_0x55ba84[_0xc6e49c(0x202)]&&_0x124ce3[_0xc6e49c(0x1ef)]();return;}while(_0x1c9c03<_0x228ade&&_0x173414<_0x55ba84['length']){const _0x200ffe=_0x55ba84[_0x173414++];_0x1c9c03++;try{const _0x266f04=_0x399b88['createRead'+_0xc6e49c(0x1f0)](_0x200ffe[_0xc6e49c(0x191)]);_0x266f04['on'](_0xc6e49c(0x1b0),_0x12567a=>{const _0x232086=_0xc6e49c;_0x1c9c03--,logger['warn'](_0x232086(0x23e)+_0x232086(0x1dc)+_0x200ffe[_0x232086(0x191)],_0x12567a),_0x594bd8();}),_0x266f04['on'](_0xc6e49c(0x1b7),()=>{_0x1c9c03--,_0x594bd8();});const _0x3c6f5f={};_0x3c6f5f['name']=_0x200ffe[_0xc6e49c(0x201)],_0x124ce3[_0xc6e49c(0x1bd)](_0x266f04,_0x3c6f5f);}catch(_0x4c7762){_0x1c9c03--,logger[_0xc6e49c(0x1b0)]('파일\x20압축\x20추가\x20실'+_0xc6e49c(0x1de)+_0x200ffe[_0xc6e49c(0x191)],_0x4c7762),_0x594bd8();}}};_0x594bd8(),_0x124ce3['on']('error',()=>{_0x5b375c=!![];});});}[a26_0x3ac4ec(0x25b)+a26_0x3ac4ec(0x1f2)](_0x53d6ad){const _0x1817b5=a26_0x3ac4ec;if(!_0x53d6ad||_0x53d6ad['trim']()[_0x1817b5(0x202)]===0x0)return'file_'+Date[_0x1817b5(0x1da)]();let _0x36d7ab=_0x53d6ad[_0x1817b5(0x24a)](/\.\./g,'')[_0x1817b5(0x24a)](/^[\/\\]+/,'')[_0x1817b5(0x1ca)]();_0x36d7ab=_0x36d7ab[_0x1817b5(0x24a)](/\\/g,'/'),_0x36d7ab=_0x36d7ab[_0x1817b5(0x24a)](/[<>:"|?*\x00-\x1f]/g,'_');if(_0x36d7ab['length']>0x1f4){const _0x29cded=_0x36d7ab[_0x1817b5(0x270)]('/'),_0x25b20d=_0x29cded[_0x29cded[_0x1817b5(0x202)]-0x1];_0x36d7ab=_0x29cded[_0x1817b5(0x20d)](0x0,-0x1)[_0x1817b5(0x19c)]('/')[_0x1817b5(0x20d)](0x0,0x1f4-_0x25b20d['length'])+'/'+_0x25b20d;}return _0x36d7ab||'file_'+Date['now']();}async[a26_0x3ac4ec(0x239)+'le'](_0x1c5ec6){const _0x5db36f=a26_0x3ac4ec;try{const _0x8f7bcf=await this['s3'][_0x5db36f(0x22c)](new GetObjectCommand({'Bucket':this[_0x5db36f(0x1eb)],'Key':_0x1c5ec6}));if(!_0x8f7bcf[_0x5db36f(0x205)])throw new Error(_0x5db36f(0x1c2)+_0x5db36f(0x1c1));const _0xbb0c13=[];for await(const _0x2911ef of _0x8f7bcf[_0x5db36f(0x205)]){_0xbb0c13[_0x5db36f(0x224)](_0x2911ef);}const _0x11311f=Buffer[_0x5db36f(0x258)](_0xbb0c13),_0x4022d7=_0x11311f[_0x5db36f(0x228)]('utf-8');logger[_0x5db36f(0x278)](_0x5db36f(0x221)+':\x20'+_0x1c5ec6);const _0x265af5={};return _0x265af5[_0x5db36f(0x1be)]=!![],_0x265af5[_0x5db36f(0x234)]=_0x4022d7,_0x265af5;}catch(_0x20ca18){logger[_0x5db36f(0x1b0)]('파일\x20다운로드\x20실패'+':',_0x20ca18);const _0x55c78f={};return _0x55c78f[_0x5db36f(0x1be)]=![],_0x55c78f[_0x5db36f(0x1b0)]=_0x20ca18 instanceof Error?_0x20ca18[_0x5db36f(0x26d)]:_0x5db36f(0x21b)+_0x5db36f(0x277),_0x55c78f;}}['buildObjec'+'tUrl'](_0x491c72){const _0x51542c=a26_0x3ac4ec;if(this['endpoint']){const _0x2e203d=this[_0x51542c(0x27c)][_0x51542c(0x24a)](/\/$/,'');return _0x2e203d+'/'+this[_0x51542c(0x1eb)]+'/'+_0x491c72;}return'https://'+this[_0x51542c(0x1eb)]+_0x51542c(0x1dd)+this[_0x51542c(0x20b)]+(_0x51542c(0x266)+_0x51542c(0x1c0))+_0x491c72;}}
|
|
@@ -3,29 +3,17 @@ export declare class SparrowService {
|
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private apiKey;
|
|
5
5
|
constructor();
|
|
6
|
-
/**
|
|
7
|
-
* 암호화된 Access Key ID 복호화
|
|
8
|
-
*/
|
|
9
6
|
private getDecryptedAccessKey;
|
|
10
|
-
/**
|
|
11
|
-
* 암호화된 Secret Access Key 복호화
|
|
12
|
-
*/
|
|
13
7
|
private getDecryptedSecretKey;
|
|
14
|
-
/**
|
|
15
|
-
* 암호화된 버킷 이름 복호화
|
|
16
|
-
*/
|
|
17
8
|
private getDecryptedBucket;
|
|
18
|
-
/**
|
|
19
|
-
* 리전 가져오기
|
|
20
|
-
*/
|
|
21
9
|
private getRegion;
|
|
22
|
-
/**
|
|
23
|
-
* 엔드포인트 가져오기
|
|
24
|
-
*/
|
|
25
10
|
private getEndpoint;
|
|
26
11
|
requestAnalysis(request: SparrowAnalysisRequest & {
|
|
27
12
|
s3Key: string;
|
|
28
13
|
}): Promise<SparrowAnalysisResponse>;
|
|
14
|
+
requestScaAnalysis(request: SparrowAnalysisRequest & {
|
|
15
|
+
s3Key: string;
|
|
16
|
+
}): Promise<SparrowAnalysisResponse>;
|
|
29
17
|
getAnalysisStatus(id: string): Promise<SparrowAnalysisResult>;
|
|
30
18
|
downloadAnalysisResults(analysisId: string): Promise<any[]>;
|
|
31
19
|
pollAnalysisCompletion(analysisId: string, maxAttempts?: number, intervalMs?: number): Promise<SparrowAnalysisResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a27_0x4f784a=a27_0x1d29;(function(_0x12ba71,_0x18342e){const _0xd524e5=a27_0x1d29,_0x525871=_0x12ba71();while(!![]){try{const _0x110b8b=-parseInt(_0xd524e5(0x109))/0x1+-parseInt(_0xd524e5(0x101))/0x2+-parseInt(_0xd524e5(0x119))/0x3*(parseInt(_0xd524e5(0x113))/0x4)+parseInt(_0xd524e5(0x121))/0x5+parseInt(_0xd524e5(0xde))/0x6*(-parseInt(_0xd524e5(0x99))/0x7)+parseInt(_0xd524e5(0x126))/0x8*(parseInt(_0xd524e5(0x12a))/0x9)+parseInt(_0xd524e5(0xf3))/0xa;if(_0x110b8b===_0x18342e)break;else _0x525871['push'](_0x525871['shift']());}catch(_0x4ef1a0){_0x525871['push'](_0x525871['shift']());}}}(a27_0x58f5,0x5e480));const a27_0x1c6ef0=(function(){let _0xd4254a=!![];return function(_0x2f51a6,_0x47afbe){const _0x2322ff=_0xd4254a?function(){if(_0x47afbe){const _0x851b4f=_0x47afbe['apply'](_0x2f51a6,arguments);return _0x47afbe=null,_0x851b4f;}}:function(){};return _0xd4254a=![],_0x2322ff;};}()),a27_0x23aba6=a27_0x1c6ef0(this,function(){const _0x4e1a51=a27_0x1d29;return a27_0x23aba6[_0x4e1a51(0x134)]()['search'](_0x4e1a51(0xfc)+'+$')[_0x4e1a51(0x134)]()['constructo'+'r'](a27_0x23aba6)['search'](_0x4e1a51(0xfc)+'+$');});a27_0x23aba6();import a27_0x3c72c3 from'axios';import a27_0x5af640 from'adm-zip';function a27_0x58f5(){const _0x34935e=['region','s3Key','호화\x20실패','requestAna','entryName','ey\x20복호화\x20실패','post','분석\x20진행\x20중...','endPoint','sastOption','maxSourceS','push','parse','\x20실패\x20(400):','result','getRegion','3792782lKfMtb','패\x20(400):\x20','xist','object','bucket','accessKeyI','\x20->\x20실제\x20분석\x20','ageInfo','us-east-1','.com','FDDhEJ','A1PA0SHi0K','endsWith','수\x20없습니다.\x20존재','alysis/','스토리지\x20컨테이너\x20','.amazonaws','AzUol','실패:\x20','\x20잘못된\x20ID입니다','accessKey','스토리지\x20Secre','getDecrypt','auth','\x20찾을\x20수\x20없음.\x20','Z8Rw==','P\x20SCA\x20요청\x20-','/api/v1/an','extensions','D만\x20사용:\x20','warn','/api/v2/an','ion','analysisLi','분석\x20ID를\x20찾을\x20','료:\x20','secretKey','st-2','lts','SCA\x20분석\x20ID\x20','data','l/sca','analysisSo','하지\x20않는\x20분석\x20I','requestId','baseUrl','fileName','OBJECT_STO','status','n/json','JaKD4uJUEZ','공:\x20','error','from','analysisId','YRkjQ','추출\x20완료:\x20','패:\x20','Access\x20Key','type','LNagI','edBucket','info','OnDemand\x20분','scaOptions','EngWClY3G3','RAGE','알\x20수\x20없는\x20오류','does\x20not\x20e','6zHwRRp','statusText','패\x20(시도\x20','SCA\x20분석\x20요청\x20','get','ess\x20Key\x20복호','/api/v3/an','요청\x20ID\x20','니다.\x20존재하지\x20않','toUpperCas','ror','includes','ize','l/sast','석\x20요청\x20성공:\x20','excludedPa','s\x20Key\x20ID\x20복','lysis','분석\x20ID\x20\x27','분석\x20상태\x20조회\x20실','\x20실패:\x20','9627760hRyVYC','분석\x20ID\x20추출\x20완','존재하지\x20않습니다','석\x20요청\x20실패:','alysis/too','찾을\x20수\x20없습니다','Unknown\x20er','length','urce','(((.+)+)+)','applicatio','분석\x20완료:\x20','pollAnalys','\x27의\x20결과를\x20찾을\x20','857990dNgFFV','/result','COMPLETE','getEntries','PF07LggYMS','\x27를\x20찾을\x20수\x20없습','edAccessKe','callbacks','249136jtJrjd','objectStor','SCA\x20분석\x20ID를','getData','.json','config','alysisResu','\x20완료:\x20','D이거나\x20아직\x20분석','stringify','4108ftBHLS','니다.','endpoint','getEndpoin','ID\x20','targetType','159eYeHsZ','Analysis','sYTeG','Sparrow\x20MC','석\x20상태\x20조회\x20실패','\x20(요청\x20ID:\x20','resultVers','processing','2915295amQOuN','response','WYQKt','이름\x20복호화\x20실패','memo','8ulhsoB','이\x20완료되지\x20않았습','JSON\x20파싱\x20실패','분석\x20시간\x20초과','1032561pVVZpP','progress','headers','getAnalysi','downloadAn','FILE','utf8','개\x20파일','Bearer\x20','CA\x20분석\x20요청\x20실','toString','t\x20Access\x20K','apiKey','P\x20요청\x20-\x20','OnDemand\x20S','**/dev/**','url','수\x20없음.\x20요청\x20I','docs/**','message','secretAcce','edSecretKe','잘못된\x20요청입니다.','분석이\x20실패했습니다'];a27_0x58f5=function(){return _0x34935e;};return a27_0x58f5();}import{appConfig}from'../config/appConfig.js';function a27_0x1d29(_0x3552d3,_0x41c0cb){_0x3552d3=_0x3552d3-0x99;const _0x5e241a=a27_0x58f5();let _0x23aba6=_0x5e241a[_0x3552d3];return _0x23aba6;}import{logger}from'../utils/logger.js';import{decryptInternal}from'../utils/crypto.util.js';const ENCRYPTED_ACCESS_KEY_ID=a27_0x4f784a(0xda)+a27_0x4f784a(0xcb)+'ZGh/Ygc=',ENCRYPTED_SECRET_ACCESS_KEY='Jn4eEwgeMz'+'ZYTDc1ICIq'+'W1dZRgF/PA'+a27_0x4f784a(0xa4)+'HRknHVVUYw'+a27_0x4f784a(0xb2),ENCRYPTED_BUCKET_NAME=a27_0x4f784a(0x105)+a27_0x4f784a(0xa3),STORAGE_REGION_DEFAULT='ap-northea'+a27_0x4f784a(0xbe);export class SparrowService{['baseUrl'];[a27_0x4f784a(0x136)];constructor(){const _0x535e84=a27_0x4f784a;this['baseUrl']=appConfig['sparrow'][_0x535e84(0xc6)],this[_0x535e84(0x136)]=appConfig['sparrow']['apiKey'];}[a27_0x4f784a(0xaf)+'edAccessKe'+'y'](){const _0xfe685c=a27_0x4f784a;if(appConfig['s3']['accessKeyI'+'d'])return appConfig['s3'][_0xfe685c(0x9e)+'d'];try{return decryptInternal(ENCRYPTED_ACCESS_KEY_ID);}catch(_0x3612e5){logger[_0xfe685c(0xcd)](_0xfe685c(0xd3)+'\x20ID\x20복호화\x20실패'+':',_0x3612e5);throw new Error('스토리지\x20Acces'+_0xfe685c(0xee)+_0xfe685c(0x144));}}[a27_0x4f784a(0xaf)+a27_0x4f784a(0x13f)+'y'](){const _0x20c760=a27_0x4f784a;if(appConfig['s3'][_0x20c760(0x13e)+'ssKey'])return appConfig['s3'][_0x20c760(0x13e)+'ssKey'];try{return decryptInternal(ENCRYPTED_SECRET_ACCESS_KEY);}catch(_0x16eadd){logger['error']('Secret\x20Acc'+_0x20c760(0xe3)+'화\x20실패:',_0x16eadd);throw new Error(_0x20c760(0xae)+_0x20c760(0x135)+_0x20c760(0x147));}}['getDecrypt'+a27_0x4f784a(0xd6)](){const _0x172b4c=a27_0x4f784a,_0x2e4213={};_0x2e4213[_0x172b4c(0xd0)]='버킷\x20이름\x20복호화\x20'+'실패:';const _0x322fa4=_0x2e4213;if(appConfig['s3']['bucket'])return appConfig['s3'][_0x172b4c(0x9d)];try{return decryptInternal(ENCRYPTED_BUCKET_NAME);}catch(_0x362e79){logger[_0x172b4c(0xcd)](_0x322fa4[_0x172b4c(0xd0)],_0x362e79);throw new Error(_0x172b4c(0xa8)+_0x172b4c(0x124));}}[a27_0x4f784a(0x151)](){const _0x41c555=a27_0x4f784a;return appConfig['s3'][_0x41c555(0x142)]&&appConfig['s3'][_0x41c555(0x142)]!==_0x41c555(0xa1)?appConfig['s3'][_0x41c555(0x142)]:STORAGE_REGION_DEFAULT;}[a27_0x4f784a(0x116)+'t'](){const _0x4e650b=a27_0x4f784a;return appConfig['s3'][_0x4e650b(0x115)]||'https://s3'+'.'+this[_0x4e650b(0x151)]()+(_0x4e650b(0xa9)+_0x4e650b(0xa2));}async[a27_0x4f784a(0x145)+a27_0x4f784a(0xef)](_0x2103b4){const _0xe748c9=a27_0x4f784a,_0x2ee752={};_0x2ee752[_0xe748c9(0xaa)]=_0xe748c9(0x139);const _0x52d99e=_0x2ee752;try{const _0x44000a=this[_0xe748c9(0xaf)+_0xe748c9(0xd6)](),_0x59a3d4=this['getDecrypt'+_0xe748c9(0x107)+'y'](),_0x561b13=this['getDecrypt'+'edSecretKe'+'y'](),_0x25a7d8=this[_0xe748c9(0x116)+'t'](),_0x3a5ee7={};_0x3a5ee7[_0xe748c9(0xad)]=_0x59a3d4,_0x3a5ee7[_0xe748c9(0xbd)]=_0x561b13;const _0x19f84c={};_0x19f84c[_0xe748c9(0x11f)+_0xe748c9(0xb9)]=0x2,_0x19f84c[_0xe748c9(0x125)]='Sparrow\x20MC'+_0xe748c9(0x137)+_0x2103b4['fileName'],_0x19f84c[_0xe748c9(0x108)]=[],_0x19f84c[_0xe748c9(0x14b)+'s']={},_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0x14c)+_0xe748c9(0xea)]=0x64,_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)]={},_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xb5)]=['*'],_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xed)+'th']=[_0x52d99e[_0xe748c9(0xaa)],'test/**',_0xe748c9(0x13c)],_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)][_0xe748c9(0xd4)]=_0xe748c9(0xc8)+_0xe748c9(0xdb),_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)][_0xe748c9(0x10a)+_0xe748c9(0xa0)]={},_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)][_0xe748c9(0x10a)+_0xe748c9(0xa0)]['bucket']=_0x44000a,_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)][_0xe748c9(0x10a)+_0xe748c9(0xa0)][_0xe748c9(0x14a)]=_0x25a7d8,_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)][_0xe748c9(0x10a)+_0xe748c9(0xa0)][_0xe748c9(0x9c)]=_0x2103b4[_0xe748c9(0x143)],_0x19f84c[_0xe748c9(0x14b)+'s'][_0xe748c9(0xc3)+_0xe748c9(0xfb)][_0xe748c9(0x10a)+_0xe748c9(0xa0)][_0xe748c9(0xb0)]=_0x3a5ee7;const _0x531a7c=_0x19f84c,_0x306036=await a27_0x3c72c3[_0xe748c9(0x148)](this['baseUrl']+(_0xe748c9(0xb4)+_0xe748c9(0xf7)+_0xe748c9(0xeb)),_0x531a7c,{'headers':{'Authorization':_0xe748c9(0x132)+this['apiKey'],'Content-Type':_0xe748c9(0xfd)+_0xe748c9(0xca)}});logger[_0xe748c9(0xd7)](_0xe748c9(0xd8)+_0xe748c9(0xec)+_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xc5)]);const _0x2b4832=_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xba)+'st']?.[0x0]?.[_0xe748c9(0xcf)]||_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xcf)];return _0x2b4832?logger['info'](_0xe748c9(0xf4)+_0xe748c9(0xbc)+_0x2b4832+'\x20(요청\x20ID:\x20'+_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xc5)]+')'):logger[_0xe748c9(0xb7)](_0xe748c9(0xbb)+_0xe748c9(0x13b)+_0xe748c9(0xb6)+_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xc5)]),{'requestId':_0x306036[_0xe748c9(0xc1)]['requestId'],'analysisId':_0x2b4832?String(_0x2b4832):undefined,'status':_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xba)+'st']?.[0x0]?.['status']||_0x306036[_0xe748c9(0xc1)][_0xe748c9(0xc9)],'message':_0x306036[_0xe748c9(0xc1)]['message']};}catch(_0x1c64ce){logger['error'](_0xe748c9(0xd8)+_0xe748c9(0xf6),_0x1c64ce);throw new Error('분석\x20요청\x20실패:\x20'+(_0x1c64ce instanceof Error?_0x1c64ce[_0xe748c9(0x13d)]:'Unknown\x20er'+_0xe748c9(0xe8)));}}async['requestSca'+a27_0x4f784a(0x11a)](_0x599c2c){const _0x5a8a8d=a27_0x4f784a,_0x1c0eb7={'IQWqB':function(_0x394cba,_0x31aad1){return _0x394cba(_0x31aad1);}};try{const _0x4141d3=this[_0x5a8a8d(0xaf)+_0x5a8a8d(0xd6)](),_0x485abb=this[_0x5a8a8d(0xaf)+_0x5a8a8d(0x107)+'y'](),_0x448e83=this['getDecrypt'+_0x5a8a8d(0x13f)+'y'](),_0x168612=this[_0x5a8a8d(0x116)+'t'](),_0x80b2f7={};_0x80b2f7[_0x5a8a8d(0xad)]=_0x485abb,_0x80b2f7['secretKey']=_0x448e83;const _0xa9183d={};_0xa9183d[_0x5a8a8d(0x11f)+_0x5a8a8d(0xb9)]=0x2,_0xa9183d['memo']=_0x5a8a8d(0x11c)+_0x5a8a8d(0xb3)+'\x20'+_0x599c2c[_0x5a8a8d(0xc7)],_0xa9183d[_0x5a8a8d(0x108)]=[],_0xa9183d[_0x5a8a8d(0xd9)]={},_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)]={},_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0x118)]=_0x5a8a8d(0x12f),_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)][_0x5a8a8d(0xd4)]='OBJECT_STO'+_0x5a8a8d(0xdb),_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)][_0x5a8a8d(0x10a)+_0x5a8a8d(0xa0)]={},_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)][_0x5a8a8d(0x10a)+_0x5a8a8d(0xa0)][_0x5a8a8d(0x9d)]=_0x4141d3,_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)][_0x5a8a8d(0x10a)+_0x5a8a8d(0xa0)][_0x5a8a8d(0x14a)]=_0x168612,_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)][_0x5a8a8d(0x10a)+_0x5a8a8d(0xa0)][_0x5a8a8d(0x9c)]=_0x599c2c['s3Key'],_0xa9183d[_0x5a8a8d(0xd9)][_0x5a8a8d(0xc3)+_0x5a8a8d(0xfb)][_0x5a8a8d(0x10a)+_0x5a8a8d(0xa0)]['auth']=_0x80b2f7;const _0x200953=_0xa9183d,_0x40fdd1=await a27_0x3c72c3[_0x5a8a8d(0x148)](this[_0x5a8a8d(0xc6)]+(_0x5a8a8d(0xb4)+_0x5a8a8d(0xf7)+_0x5a8a8d(0xc2)),_0x200953,{'headers':{'Authorization':_0x5a8a8d(0x132)+this[_0x5a8a8d(0x136)],'Content-Type':_0x5a8a8d(0xfd)+_0x5a8a8d(0xca)}});logger[_0x5a8a8d(0xd7)](_0x5a8a8d(0x138)+'CA\x20분석\x20요청\x20성'+_0x5a8a8d(0xcc)+_0x40fdd1[_0x5a8a8d(0xc1)][_0x5a8a8d(0xc5)]);const _0x22c9aa=_0x40fdd1['data'][_0x5a8a8d(0xba)+'st']?.[0x0]?.['analysisId']||_0x40fdd1['data'][_0x5a8a8d(0xcf)];return _0x22c9aa?logger[_0x5a8a8d(0xd7)](_0x5a8a8d(0xc0)+_0x5a8a8d(0xd1)+_0x22c9aa+_0x5a8a8d(0x11e)+_0x40fdd1['data'][_0x5a8a8d(0xc5)]+')'):logger['warn'](_0x5a8a8d(0x10b)+_0x5a8a8d(0xb1)+'요청\x20ID만\x20사용:'+'\x20'+_0x40fdd1[_0x5a8a8d(0xc1)][_0x5a8a8d(0xc5)]),{'requestId':_0x40fdd1[_0x5a8a8d(0xc1)][_0x5a8a8d(0xc5)],'analysisId':_0x22c9aa?_0x1c0eb7['IQWqB'](String,_0x22c9aa):undefined,'status':_0x40fdd1['data'][_0x5a8a8d(0xba)+'st']?.[0x0]?.['status']||_0x40fdd1['data'][_0x5a8a8d(0xc9)],'message':_0x40fdd1[_0x5a8a8d(0xc1)]['message']};}catch(_0x3fd672){const _0x434af9=_0x3fd672;_0x434af9[_0x5a8a8d(0x122)]?logger['error'](_0x5a8a8d(0x138)+_0x5a8a8d(0x133)+'패\x20-\x20상세\x20정보:',{'status':_0x434af9[_0x5a8a8d(0x122)]['status'],'statusText':_0x434af9['response'][_0x5a8a8d(0xdf)],'data':JSON[_0x5a8a8d(0x112)](_0x434af9[_0x5a8a8d(0x122)]['data']),'requestUrl':_0x434af9[_0x5a8a8d(0x10e)]?.[_0x5a8a8d(0x13a)],'requestData':_0x434af9[_0x5a8a8d(0x10e)]?.[_0x5a8a8d(0xc1)]}):logger[_0x5a8a8d(0xcd)]('OnDemand\x20S'+_0x5a8a8d(0x133)+'패:',_0x3fd672);const _0x23c68e=_0x434af9[_0x5a8a8d(0x122)]?.[_0x5a8a8d(0xc1)]?.[_0x5a8a8d(0x13d)]||_0x434af9['response']?.[_0x5a8a8d(0xc1)]?.['error']||(_0x3fd672 instanceof Error?_0x3fd672[_0x5a8a8d(0x13d)]:_0x5a8a8d(0xf9)+_0x5a8a8d(0xe8));throw new Error(_0x5a8a8d(0xe1)+_0x5a8a8d(0xab)+_0x23c68e);}}async[a27_0x4f784a(0x12d)+'sStatus'](_0x4b2729){const _0x37e298=a27_0x4f784a,_0x1242f1={};_0x1242f1[_0x37e298(0xd5)]=function(_0x4e424b,_0x21540f){return _0x4e424b!==_0x21540f;},_0x1242f1['sYTeG']=function(_0x292c46,_0x2bb273){return _0x292c46===_0x2bb273;};const _0x1f07a0=_0x1242f1;try{const _0x4999ca={};_0x4999ca['Authorizat'+'ion']=_0x37e298(0x132)+this[_0x37e298(0x136)];const _0x10b8b2=_0x4999ca,_0x689484=[_0x37e298(0xe4)+_0x37e298(0xa7)+_0x4b2729,_0x37e298(0xb8)+_0x37e298(0xa7)+_0x4b2729,_0x37e298(0xb4)+_0x37e298(0xa7)+_0x4b2729];let _0x5e8a7f;for(const _0x34d4ee of _0x689484){try{const _0x550e83={};_0x550e83[_0x37e298(0x12c)]=_0x10b8b2;const _0x1bd33b=await a27_0x3c72c3[_0x37e298(0xe2)](''+this[_0x37e298(0xc6)]+_0x34d4ee,_0x550e83),_0xd43199=_0x1bd33b['data']['analysisLi'+'st']?.[0x0]||_0x1bd33b[_0x37e298(0xc1)],_0x3a1aeb=_0xd43199?.[_0x37e298(0xcf)]||_0x1bd33b[_0x37e298(0xc1)]['analysisId']||_0x4b2729;return _0x3a1aeb!==_0x4b2729&&_0x3a1aeb!==String(_0x4b2729)&&logger['info']('분석\x20ID\x20추출:\x20'+_0x37e298(0xe5)+_0x4b2729+(_0x37e298(0x9f)+_0x37e298(0x117))+_0x3a1aeb),{'requestId':String(_0x1bd33b[_0x37e298(0xc1)][_0x37e298(0xc5)]||_0x4b2729),'analysisId':_0x3a1aeb?String(_0x3a1aeb):undefined,'status':String(_0xd43199?.[_0x37e298(0xc9)]||_0x1bd33b[_0x37e298(0xc1)]['status']||_0x37e298(0x120)),'result':_0xd43199?.[_0x37e298(0x150)]||_0x1bd33b[_0x37e298(0xc1)]['result']||undefined,'progress':_0xd43199?.[_0x37e298(0x12b)]!==null&&_0x1f07a0[_0x37e298(0xd5)](_0xd43199?.['progress'],undefined)?Number(_0xd43199['progress']):undefined,'downloadUrl':undefined,'vulnerabilities':undefined};}catch(_0x9009ce){_0x5e8a7f=_0x9009ce;const _0x3c0d82=_0x9009ce?.['response']?.[_0x37e298(0xc9)];if(_0x1f07a0[_0x37e298(0x11b)](_0x3c0d82,0x194)){if(_0x37e298(0x123)!==_0x37e298(0x123))_0x321471[_0x37e298(0xcd)](_0x37e298(0x138)+_0x37e298(0x133)+'패:',_0x10a19f);else{if(_0x34d4ee===_0x689484[_0x689484[_0x37e298(0xfa)]-0x1])throw new Error(_0x37e298(0xf0)+_0x4b2729+(_0x37e298(0x106)+_0x37e298(0xe6)+'는\x20분석\x20ID이거나'+_0x37e298(0xac)+'.'));continue;}}if(_0x3c0d82===0x190){const _0x31b5e9=_0x9009ce?.[_0x37e298(0x122)]?.[_0x37e298(0xc1)]?.['message']||_0x9009ce?.[_0x37e298(0x13d)]||_0x37e298(0x140);throw new Error('분석\x20상태\x20조회\x20실'+_0x37e298(0x9a)+_0x31b5e9);}continue;}}throw _0x5e8a7f instanceof Error?_0x5e8a7f:new Error(_0x37e298(0xdc));}catch(_0x3998c8){logger[_0x37e298(0xcd)](_0x37e298(0xd8)+_0x37e298(0x11d)+':',_0x3998c8);throw new Error(_0x37e298(0xf1)+_0x37e298(0xd2)+(_0x3998c8 instanceof Error?_0x3998c8[_0x37e298(0x13d)]:_0x37e298(0xf9)+_0x37e298(0xe8)));}}async[a27_0x4f784a(0x12e)+a27_0x4f784a(0x10f)+a27_0x4f784a(0xbf)](_0x316728){const _0x37d4c7=a27_0x4f784a;try{const _0x1384d0=await a27_0x3c72c3[_0x37d4c7(0xe2)](this[_0x37d4c7(0xc6)]+(_0x37d4c7(0xb8)+_0x37d4c7(0xa7))+_0x316728+_0x37d4c7(0x102),{'responseType':'arraybuffe'+'r','headers':{'Authorization':_0x37d4c7(0x132)+this[_0x37d4c7(0x136)]}}),_0x44290f=new a27_0x5af640(Buffer[_0x37d4c7(0xce)](_0x1384d0['data'])),_0x10b063=_0x44290f[_0x37d4c7(0x104)](),_0x3cbbc6=[];for(const _0x250172 of _0x10b063){if(_0x250172['isDirector'+'y'])continue;if(_0x250172[_0x37d4c7(0x146)][_0x37d4c7(0xa5)](_0x37d4c7(0x10d)))try{const _0xff92a2=_0x250172[_0x37d4c7(0x10c)]()[_0x37d4c7(0x134)](_0x37d4c7(0x130)),_0x3eeddd=JSON[_0x37d4c7(0x14e)](_0xff92a2);_0x3cbbc6[_0x37d4c7(0x14d)](_0x3eeddd);}catch(_0x3440d8){logger[_0x37d4c7(0xb7)](_0x37d4c7(0x128)+':\x20'+_0x250172['entryName'],_0x3440d8);}}return logger[_0x37d4c7(0xd7)]('분석\x20결과\x20다운로드'+_0x37d4c7(0x110)+_0x3cbbc6[_0x37d4c7(0xfa)]+_0x37d4c7(0x131)),_0x3cbbc6;}catch(_0x3ac4ce){logger['error']('분석\x20결과\x20다운로드'+'\x20실패:',_0x3ac4ce);const _0x4acd08=_0x3ac4ce?.[_0x37d4c7(0x122)]?.[_0x37d4c7(0xc9)];if(_0x4acd08===0x194)throw new Error(_0x37d4c7(0xf0)+_0x316728+(_0x37d4c7(0x100)+_0x37d4c7(0xa6)+_0x37d4c7(0xc4)+_0x37d4c7(0x111)+_0x37d4c7(0x127)+_0x37d4c7(0x114)));else{if(_0x4acd08===0x190){const _0x31fc90=_0x3ac4ce?.[_0x37d4c7(0x122)]?.[_0x37d4c7(0xc1)]?.['message']||_0x3ac4ce?.['message']||_0x37d4c7(0x140);throw new Error('분석\x20결과\x20다운로드'+_0x37d4c7(0x14f)+'\x20'+_0x31fc90);}}throw new Error('분석\x20결과\x20다운로드'+_0x37d4c7(0xf2)+(_0x3ac4ce instanceof Error?_0x3ac4ce['message']:_0x37d4c7(0xf9)+_0x37d4c7(0xe8)));}}async[a27_0x4f784a(0xff)+'isCompleti'+'on'](_0x4a756c,_0x103235=0x3c,_0x4edca1=0x1388){const _0x45e057=a27_0x4f784a;let _0x85ed6a=0x0;while(_0x85ed6a<_0x103235){try{const _0x3ec89d=await this[_0x45e057(0x12d)+'sStatus'](_0x4a756c);if(String(_0x3ec89d['status'])[_0x45e057(0xe7)+'e']()===_0x45e057(0x103))return logger[_0x45e057(0xd7)](_0x45e057(0xfe)+_0x4a756c),_0x3ec89d;else{if(String(_0x3ec89d[_0x45e057(0xc9)])[_0x45e057(0xe7)+'e']()==='FAIL')throw new Error(_0x45e057(0x141)+'.');}logger[_0x45e057(0xd7)](_0x45e057(0x149)+'\x20('+(_0x85ed6a+0x1)+'/'+_0x103235+')'),await new Promise(_0x5a2923=>setTimeout(_0x5a2923,_0x4edca1)),_0x85ed6a++;}catch(_0x4157cf){logger[_0x45e057(0xcd)]('분석\x20상태\x20확인\x20실'+_0x45e057(0xe0)+(_0x85ed6a+0x1)+'):',_0x4157cf);const _0x26492b=_0x4157cf instanceof Error?_0x4157cf[_0x45e057(0x13d)]:String(_0x4157cf);if(_0x26492b[_0x45e057(0xe9)](_0x45e057(0xf5))||_0x26492b[_0x45e057(0xe9)](_0x45e057(0xf8))||_0x26492b['includes'](_0x45e057(0xdd)+_0x45e057(0x9b))||_0x26492b[_0x45e057(0xe9)]('not\x20found'))throw _0x4157cf;_0x85ed6a++;if(_0x85ed6a>=_0x103235)throw _0x4157cf;await new Promise(_0x26d9f7=>setTimeout(_0x26d9f7,_0x4edca1));}}throw new Error(_0x45e057(0x129));}}
|