- 피싱 사이트
+ 신고 건수
- {reportPageData.reputation.summary.phishingCount}건
+ {reportPageData.reputation.summary.reportCount}건
- 악성코드 유포
+ 도메인 생성일
- {reportPageData.reputation.summary.malwareCount}건
-
-
-
-
- 스팸 기록
-
- {reportPageData.reputation.summary.spamCount}건
+ {reportPageData.reputation.summary.domainAgeText}
diff --git a/src/pages/Report/constants/riskDetectionCatalog.test.ts b/src/pages/Report/constants/riskDetectionCatalog.test.ts
new file mode 100644
index 0000000..8e8504f
--- /dev/null
+++ b/src/pages/Report/constants/riskDetectionCatalog.test.ts
@@ -0,0 +1,54 @@
+import { describe, expect, it } from 'vitest';
+
+import { resolveRiskDetectionContent } from './riskDetectionCatalog';
+
+const backendThreatCodes = [
+ 'SHORTENED_URL',
+ 'percent_encoding_detected',
+ 'double_encoding_suspected',
+ 'suspicious_query_param_detected',
+ 'embedded_url',
+ 'suspicious_query_keyword_detected',
+ 'suspicious_path_keyword_detected',
+ 'suspicious_fragment_keyword_detected',
+ 'MALWARE',
+ 'SOCIAL_ENGINEERING',
+ 'UNWANTED_SOFTWARE',
+ 'POTENTIALLY_HARMFUL_APPLICATION',
+ 'PHISHING',
+ 'RANSOMWARE',
+ 'BOTNET',
+ 'SPAM',
+ 'C2',
+ 'SUSPICIOUS',
+ 'hostname_missing',
+ 'certificate_request_timeout',
+ 'invalid certificate response',
+ 'peer certificate not available',
+] as const;
+
+describe('resolveRiskDetectionContent', () => {
+ it('maps every backend threat code to a dedicated catalog entry', () => {
+ backendThreatCodes.forEach((threatCode) => {
+ const content = resolveRiskDetectionContent(threatCode, 'safe');
+
+ expect(content.englishLabel).not.toBe('UNMAPPED LOW RISK SIGNAL');
+ expect(content.description).not.toContain('정책 테이블에 상세 설명이 등록되지 않았습니다.');
+ expect(content.title).not.toBe(`${threatCode} 감지`);
+ });
+ });
+
+ it('maps DNS hostname errors to the hostname failure description', () => {
+ const content = resolveRiskDetectionContent('[Errno -2] Name or service not known', 'safe');
+
+ expect(content.englishLabel).toBe('HOSTNAME MISSING');
+ expect(content.title).toBe('호스트명 확인 실패 감지');
+ });
+
+ it('ignores array-like punctuation around backend threat codes', () => {
+ const content = resolveRiskDetectionContent("'PHISHING']", 'safe');
+
+ expect(content.englishLabel).toBe('PHISHING');
+ expect(content.title).toBe('피싱 위협 감지');
+ });
+});
diff --git a/src/pages/Report/constants/riskDetectionCatalog.ts b/src/pages/Report/constants/riskDetectionCatalog.ts
index d0c1e37..f39c510 100644
--- a/src/pages/Report/constants/riskDetectionCatalog.ts
+++ b/src/pages/Report/constants/riskDetectionCatalog.ts
@@ -10,7 +10,7 @@ function normalizeRiskType(value: string): string {
return value
.trim()
.toLowerCase()
- .replace(/[\s\-_/.,:%@()]/g, '');
+ .replace(/[\s\-_/.,:%@()\[\]'"]/g, '');
}
const riskDetectionLookup = threatTextCatalog.reduce