[FEATURE] 외부 DB 비의존 피싱 탐지 파이프라인 개발#28
Merged
Merged
Conversation
sunm2n
approved these changes
May 21, 2026
sunm2n
left a comment
Contributor
There was a problem hiding this comment.
수고하셨습니다! 바로 머지해도 될 거 같고 제가 드린 제안도 사소한거라 머지를 하는데 있어서는 문제가 되진 않아 보입니다 수고하셨습니다!
| return ContentAnalysisResult( | ||
| final_url=final_url, | ||
| fetched=False, | ||
| status_code=None, |
Contributor
There was a problem hiding this comment.
여기서 항상 None으로 생성되는데 실제 호출부에서는
result = _fetch_failed_result(final_url, fetch_result.error)
result.status_code = fetch_result.status_code
None으로 만들고 바로 외부에서 덮어쓰는 구조로 확인 됩니다.
함수 시그니처에 status_code를 추가하는 것이 어떨까 제안 드립니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
외부 위협 DB에 의존하지 않는 URL 분석 파이프라인을 추가했습니다. (혼동행렬을 위한 테스트용)

주요 변경 사항:
/api/v1/analyze/db-independent/sync엔드포인트 추가status_code추가ai_reason)를 쉬운 한국어 100자 이내로 제한make runreload 범위를app으로 제한응답 예시:
{ "status": "success", "analysis_id": "e58d42e8-3741-4a41-95ac-265d6a18ec07", "original_url": " https://www.naver.com/", "final_url": "https://www.naver.com/", "verdict": "safe", "score": 0, "timings": { "total_seconds": 2.799809, "stages": { "normalize": 0.000074, "unchain": 0.052175, "threat_db": null, "domain_heuristic": 0.940779, "content_analysis": 2.746444 } }, "stages": { "normalize": { "original_url": "https://www.naver.com/", "normalized_url": "https://www.naver.com/", "scheme_was_added": false }, "unchain": { "input_url": "https://www.naver.com/", "final_url": "https://www.naver.com/", "hops": [ { "url": "https://www.naver.com/", "status_code": 200, "raw_location": null, "location": null, "method": "HEAD" } ], "hop_count": 1, "timed_out": false, "error": null, "signals": [] }, "domain_heuristic": { "domain": "naver.com", "score": 0, "signals": [], "rdap": { "domain": "naver.com", "registrar": "Gabia, Inc.", "created_date": "1997-09-12T04:00:00Z", "expiry_date": "2032-09-11T04:00:00Z", "domain_age_days": 10478, "is_new_domain": false }, "rdap_error": null, "skipped_reason": null }, "content_analysis": { "final_url": "https://www.naver.com/", "fetched": true, "status_code": 200, "score": 0, "signals": [], "title": "NAVER", "has_password_field": false, "has_password_form_external_action": false, "has_meta_refresh": false, "has_external_meta_refresh": false, "external_link_ratio": 0, "brand_impersonation": false, "logo_alt_impersonation": false, "is_spa_shell": false, "ai_verdict": "benign", "ai_reason": "이 페이지는 공식 NAVER 사이트로 보이며, 의심스러운 요소가 없습니다.", "reason": null, "ai_error": null, "ai_model": "gpt-4o-mini", "ai_token_usage": { "prompt_tokens": 547, "completion_tokens": 29, "total_tokens": 576 }, "error": null } } }테스트 방법:
pytest -qruff check app testsmypy app검증 결과:
374 passed in 2.43sAll checks passedSuccess: no issues found in 63 source files연관 이슈 및 Close 할 이슈
close #25
Pull Request 체크리스트
TODO