Spaces:
Sleeping
Sleeping
File size: 20,404 Bytes
ac9d980 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 | <!-- Technical Analysis 컴포넌트 -->
<section class="technical-analysis">
<h2>🔍 상세 기술 분석</h2>
<!-- SSL/HTTPS 상태 분석 -->
<div class="ssl-status-analysis">
<h3>SSL/HTTPS 상태 분석</h3>
{% if ssl_case_type == 'no_ssl' %}
<!-- SSL 완전 부재 케이스 -->
<div class="analysis-result result-critical">
<div class="result-icon">❌</div>
<div class="result-content">
<h4>SSL/HTTPS 서비스 없음</h4>
<p><strong>상태:</strong> 443 포트가 닫혀있거나 SSL 인증서가 설치되지 않음</p>
<div class="technical-details">
<div class="detail-item">
<strong>포트 443 연결:</strong> <span class="status-failed">연결 실패</span>
</div>
<div class="detail-item">
<strong>HTTPS 접속:</strong> <span class="status-failed">Connection refused</span>
</div>
<div class="detail-item">
<strong>브라우저 표시:</strong> <span class="status-failed">"안전하지 않음" 경고</span>
</div>
</div>
<div class="command-example">
<strong>확인 명령어:</strong>
<code>curl -I https://{{ domain }}</code> → Connection refused
</div>
</div>
</div>
{% elif ssl_case_type == 'self_signed' %}
<!-- 자체 서명 인증서 케이스 -->
<div class="analysis-result result-warning">
<div class="result-icon">⚠️</div>
<div class="result-content">
<h4>자체 서명 인증서 사용</h4>
<p><strong>상태:</strong> SSL 인증서가 존재하나 신뢰할 수 없는 발급자</p>
<div class="certificate-details">
<div class="cert-info-grid">
<div class="cert-field">
<strong>Subject (발급 대상):</strong>
<span>{{ cert_subject }}</span>
</div>
<div class="cert-field">
<strong>Issuer (발급자):</strong>
<span class="self-signed-indicator">{{ cert_issuer }}</span>
</div>
<div class="cert-field">
<strong>자체 서명 여부:</strong>
<span class="status-warning">✓ Subject = Issuer (자체 서명)</span>
</div>
<div class="cert-field">
<strong>유효 기간:</strong>
<span>{{ cert_valid_from }} ~ {{ cert_valid_to }}</span>
</div>
</div>
</div>
{% if has_server_error %}
<div class="server-error-details">
<h5>🚨 추가 서버 문제 발견</h5>
<div class="error-item">
<strong>HTTP 상태 코드:</strong> <span class="status-failed">{{ http_status_code }}</span>
</div>
{% if http_status_code == 406 %}
<p class="error-explanation">
<strong>406 Not Acceptable:</strong> 서버가 Accept 헤더를 처리하지 못하고 있습니다.
nginx 프록시 설정 또는 PHP 애플리케이션에서 HTTPS 요청 처리에 문제가 있을 수 있습니다.
</p>
{% endif %}
</div>
{% endif %}
</div>
</div>
{% elif ssl_case_type == 'expired' %}
<!-- 만료된 인증서 케이스 -->
<div class="analysis-result result-critical">
<div class="result-icon">⏰</div>
<div class="result-content">
<h4>SSL 인증서 만료</h4>
<p><strong>상태:</strong> 유효했던 인증서가 기간 만료됨</p>
<div class="expiry-details">
<div class="expiry-info">
<strong>만료일:</strong> <span class="expired-date">{{ cert_expiry_date }}</span>
</div>
<div class="expiry-info">
<strong>만료 경과:</strong> <span class="days-expired">{{ days_expired }}일 전 만료</span>
</div>
<div class="expiry-info">
<strong>발급자:</strong> <span>{{ cert_issuer }}</span>
</div>
</div>
</div>
</div>
{% elif ssl_case_type == 'domain_mismatch' %}
<!-- 도메인 불일치 케이스 -->
<div class="analysis-result result-warning">
<div class="result-icon">🔀</div>
<div class="result-content">
<h4>인증서 도메인 불일치</h4>
<p><strong>상태:</strong> 인증서가 다른 도메인용으로 발급됨</p>
<div class="domain-details">
<div class="domain-info">
<strong>접속 도메인:</strong> <span>{{ domain }}</span>
</div>
<div class="domain-info">
<strong>인증서 도메인:</strong>
{% for cert_domain in cert_domains %}
<span class="cert-domain">{{ cert_domain }}</span>{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
<div class="domain-info">
<strong>와일드카드 매칭:</strong>
<span class="{% if wildcard_match %}status-success{% else %}status-failed{% endif %}">
{% if wildcard_match %}✓ 매칭됨{% else %}✗ 매칭 안됨{% endif %}
</span>
</div>
</div>
</div>
</div>
{% elif ssl_case_type == 'valid' %}
<!-- 정상 SSL 케이스 -->
<div class="analysis-result result-success">
<div class="result-icon">✅</div>
<div class="result-content">
<h4>정상적인 SSL 인증서</h4>
<p><strong>상태:</strong> 신뢰할 수 있는 CA에서 발급된 유효한 인증서</p>
<div class="ssl-details-grid">
<div class="ssl-detail">
<strong>SSL Labs 등급:</strong>
<span class="ssl-grade grade-{{ ssl_labs_grade.lower() }}">{{ ssl_labs_grade }}</span>
</div>
<div class="ssl-detail">
<strong>발급 기관:</strong> <span>{{ cert_issuer }}</span>
</div>
<div class="ssl-detail">
<strong>암호화 강도:</strong> <span>{{ encryption_strength }} bit</span>
</div>
<div class="ssl-detail">
<strong>프로토콜 지원:</strong>
{% for protocol in supported_protocols %}
<span class="protocol-badge">{{ protocol }}</span>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
</div>
<!-- 브라우저별 경고 상황 -->
<div class="browser-warnings">
<h3>브라우저별 경고 상황</h3>
<div class="browser-grid">
{% for browser in browsers %}
<div class="browser-item {% if browser.has_warning %}browser-warning{% else %}browser-safe{% endif %}">
<div class="browser-icon">{{ browser.icon }}</div>
<div class="browser-info">
<h4>{{ browser.name }}</h4>
<p class="browser-status">{{ browser.warning_message }}</p>
{% if browser.additional_info %}
<div class="browser-detail">{{ browser.additional_info }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
<!-- 보안 헤더 분석 -->
<div class="security-headers">
<h3>보안 헤더 분석</h3>
<div class="headers-analysis">
{% for header_name, header_data in security_headers.items() %}
<div class="header-item">
<div class="header-status">
{% if header_data.present %}
<span class="status-success">✓</span>
{% else %}
<span class="status-failed">✗</span>
{% endif %}
</div>
<div class="header-info">
<h4>{{ header_name }}</h4>
{% if header_data.present %}
<p class="header-value">{{ header_data.value }}</p>
<div class="header-score">점수: {{ header_data.score }}/10</div>
{% else %}
<p class="header-missing">헤더가 설정되지 않음</p>
<div class="header-recommendation">{{ header_data.recommendation }}</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
<!-- 보안 점수 세부 분석 -->
<div class="security-score-breakdown">
<h3>📊 보안 점수 세부 분석</h3>
<div class="score-breakdown">
<div class="score-category">
<div class="category-name">SSL/TLS 인증서</div>
<div class="category-progress">
<div class="progress-bar">
<div class="progress-fill" style="width: {{ (ssl_score / 40 * 100)|round }}%"></div>
</div>
</div>
<div class="category-score">{{ ssl_score }}/40</div>
<div class="category-detail">{{ ssl_score_detail }}</div>
</div>
<div class="score-category">
<div class="category-name">보안 헤더</div>
<div class="category-progress">
<div class="progress-bar">
<div class="progress-fill" style="width: {{ (headers_score / 20 * 100)|round }}%"></div>
</div>
</div>
<div class="category-score">{{ headers_score }}/20</div>
<div class="category-detail">{{ headers_count }}개 헤더 중 {{ headers_present }}개 설정됨</div>
</div>
<div class="score-category">
<div class="category-name">프로토콜 지원</div>
<div class="category-progress">
<div class="progress-bar">
<div class="progress-fill" style="width: {{ (protocol_score / 15 * 100)|round }}%"></div>
</div>
</div>
<div class="category-score">{{ protocol_score }}/15</div>
<div class="category-detail">{{ protocol_detail }}</div>
</div>
<div class="score-category">
<div class="category-name">암호화 강도</div>
<div class="category-progress">
<div class="progress-bar">
<div class="progress-fill" style="width: {{ (cipher_score / 25 * 100)|round }}%"></div>
</div>
</div>
<div class="category-score">{{ cipher_score }}/25</div>
<div class="category-detail">{{ cipher_detail }}</div>
</div>
<div class="score-total">
<div class="total-label">총 보안 점수</div>
<div class="total-score">{{ total_score }}/100</div>
<div class="total-grade grade-{{ grade_class }}">{{ security_grade }}</div>
</div>
</div>
</div>
<!-- 성능 영향 분석 -->
<div class="performance-analysis">
<h3>⚡ 성능 영향 분석</h3>
<div class="performance-metrics">
<div class="perf-metric">
<strong>HTTP 응답 시간:</strong>
<span class="perf-time {{ 'slow' if http_response_time > 3000 else 'normal' }}">
{{ http_response_time }}ms
</span>
</div>
{% if https_available %}
<div class="perf-metric">
<strong>HTTPS 응답 시간:</strong>
<span class="perf-time {{ 'slow' if https_response_time > 3000 else 'normal' }}">
{{ https_response_time }}ms
</span>
</div>
<div class="perf-metric">
<strong>SSL 핸드셰이크 오버헤드:</strong>
<span class="perf-overhead">+{{ ssl_overhead_time }}ms</span>
</div>
{% endif %}
<div class="perf-metric">
<strong>HTTP/2 지원:</strong>
<span class="{% if http2_support %}status-success{% else %}status-warning{% endif %}">
{% if http2_support %}✓ 지원됨{% else %}✗ 지원 안됨{% endif %}
</span>
</div>
</div>
</div>
</section>
<style>
/* Technical Analysis 스타일 */
.technical-analysis {
margin-bottom: 30px;
}
/* 분석 결과 박스 */
.analysis-result {
display: flex;
align-items: flex-start;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
page-break-inside: avoid;
border-left: 5px solid;
}
.analysis-result.result-critical {
background-color: #fff5f5;
border-left-color: #dc3545;
border: 1px solid #f8d7da;
}
.analysis-result.result-warning {
background-color: #fffdf0;
border-left-color: #ffc107;
border: 1px solid #fff3cd;
}
.analysis-result.result-success {
background-color: #f5fff5;
border-left-color: #28a745;
border: 1px solid #d4edda;
}
.result-icon {
font-size: 24px;
margin-right: 15px;
flex-shrink: 0;
}
.result-content {
flex: 1;
}
.result-content h4 {
margin: 0 0 10px 0;
font-size: 16px;
font-weight: bold;
color: #333;
}
/* 기술 세부사항 */
.technical-details, .certificate-details {
margin-top: 15px;
background: rgba(255, 255, 255, 0.7);
padding: 15px;
border-radius: 6px;
}
.detail-item, .cert-field {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #e9ecef;
}
.detail-item:last-child, .cert-field:last-child {
border-bottom: none;
}
.detail-item strong, .cert-field strong {
min-width: 150px;
color: #495057;
}
/* 상태 표시 */
.status-failed {
color: #dc3545;
font-weight: bold;
}
.status-warning {
color: #fd7e14;
font-weight: bold;
}
.status-success {
color: #28a745;
font-weight: bold;
}
/* 명령어 예시 */
.command-example {
margin-top: 12px;
padding: 10px;
background-color: #f8f9fa;
border-radius: 4px;
font-family: 'Courier New', monospace;
}
.command-example code {
background-color: #e9ecef;
padding: 2px 6px;
border-radius: 3px;
font-size: 11px;
}
/* 인증서 정보 그리드 */
.cert-info-grid {
display: grid;
grid-template-columns: 1fr;
gap: 8px;
}
.self-signed-indicator {
color: #fd7e14;
font-weight: bold;
}
/* 서버 오류 상세 */
.server-error-details {
margin-top: 15px;
padding: 15px;
background-color: #fff5f5;
border: 1px solid #f8d7da;
border-radius: 6px;
}
.server-error-details h5 {
margin: 0 0 10px 0;
color: #721c24;
font-size: 14px;
}
.error-explanation {
font-size: 12px;
line-height: 1.4;
color: #721c24;
margin-top: 10px;
font-style: italic;
}
/* 브라우저 그리드 */
.browser-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
margin-top: 15px;
}
.browser-item {
display: flex;
align-items: center;
padding: 15px;
border-radius: 6px;
border: 1px solid #e9ecef;
}
.browser-item.browser-warning {
background-color: #fff3cd;
border-color: #ffeaa7;
}
.browser-item.browser-safe {
background-color: #d4edda;
border-color: #c3e6cb;
}
.browser-icon {
font-size: 20px;
margin-right: 12px;
flex-shrink: 0;
}
.browser-info h4 {
margin: 0 0 5px 0;
font-size: 14px;
font-weight: bold;
}
.browser-status {
margin: 0;
font-size: 12px;
line-height: 1.3;
}
.browser-detail {
font-size: 10px;
color: #6c757d;
margin-top: 5px;
}
/* 보안 헤더 */
.headers-analysis {
margin-top: 15px;
}
.header-item {
display: flex;
align-items: flex-start;
padding: 12px;
border-bottom: 1px solid #e9ecef;
background: rgba(255, 255, 255, 0.5);
}
.header-item:last-child {
border-bottom: none;
}
.header-status {
margin-right: 12px;
font-size: 16px;
}
.header-info h4 {
margin: 0 0 5px 0;
font-size: 13px;
font-weight: bold;
}
.header-value {
font-family: 'Courier New', monospace;
font-size: 11px;
background: #f8f9fa;
padding: 4px 6px;
border-radius: 3px;
margin: 0 0 5px 0;
}
.header-missing {
color: #6c757d;
font-size: 12px;
margin: 0;
}
.header-score {
font-size: 11px;
font-weight: bold;
color: #28a745;
}
.header-recommendation {
font-size: 11px;
color: #6c757d;
font-style: italic;
}
/* 점수 분석 */
.security-score-breakdown {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin-top: 25px;
}
.score-breakdown {
margin-top: 15px;
}
.score-category {
display: grid;
grid-template-columns: 150px 1fr 60px;
gap: 12px;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid #dee2e6;
}
.score-category:last-child {
border-bottom: none;
}
.category-name {
font-size: 12px;
font-weight: bold;
color: #495057;
}
.progress-bar {
height: 8px;
background-color: #e9ecef;
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background-color: #28a745;
transition: width 0.3s ease;
}
.category-score {
font-size: 12px;
font-weight: bold;
text-align: right;
}
.category-detail {
grid-column: 1 / -1;
font-size: 10px;
color: #6c757d;
margin-top: 5px;
}
.score-total {
display: grid;
grid-template-columns: 1fr auto auto;
gap: 15px;
align-items: center;
margin-top: 15px;
padding-top: 15px;
border-top: 2px solid #007bff;
font-weight: bold;
}
.total-label {
font-size: 14px;
color: #333;
}
.total-score {
font-size: 16px;
color: #007bff;
}
.total-grade {
font-size: 16px;
}
/* SSL Labs 등급 */
.ssl-grade {
display: inline-block;
padding: 4px 8px;
border-radius: 4px;
font-weight: bold;
color: white;
text-align: center;
min-width: 30px;
}
/* 프로토콜 배지 */
.protocol-badge {
display: inline-block;
padding: 2px 6px;
margin: 0 2px;
background-color: #007bff;
color: white;
font-size: 10px;
border-radius: 3px;
}
/* 성능 메트릭 */
.performance-metrics {
margin-top: 15px;
background: rgba(255, 255, 255, 0.7);
padding: 15px;
border-radius: 6px;
}
.perf-metric {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #e9ecef;
}
.perf-metric:last-child {
border-bottom: none;
}
.perf-time.slow {
color: #dc3545;
font-weight: bold;
}
.perf-time.normal {
color: #28a745;
}
.perf-overhead {
color: #fd7e14;
font-size: 11px;
}
/* 반응형 */
@media print {
.browser-grid {
grid-template-columns: repeat(2, 1fr);
}
.score-category {
grid-template-columns: 120px 1fr 50px;
gap: 8px;
}
}
</style> |