크롤 쉼은 공개 인터넷 주소만 읽는다 - #28
Closed
nam-jaehyun wants to merge 1 commit into
Closed
nam-jaehyun wants to merge 1 commit into
nam-jaehyun wants to merge 1 commit into
Conversation
/tools/fetch 는 인증 없이 닿고 쉼은 LiteLLM·데이터베이스·다른 도구 서비스와 같은 사설 네트워크에 있어, 넘겨받은 URL 로 내부 서비스를 더듬을 수 있었다 (SSRF). file:// 같은 스킴도 그대로 브라우저에 넘어갔다. - netguard.refusal: http(s) 만 허용하고, 호스트를 IP 로 풀어 하나라도 공개 주소가 아니면(루프백·사설·링크로컬·CGNAT·메타데이터 이름·점 없는 서비스 이름·.local/.internal) 거절한다. - 브라우저가 리다이렉트를 따라간 뒤 도착한 주소도 같은 기준으로 다시 본다. - 시험 22건, CI 의 pytest 대상에 추가.
Member
Author
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.
변경
services/crawl4ai-shim/netguard.py: 스킴은 http(s)만, 호스트를 IP로 풀어 하나라도 공개 주소가 아니면 거절한다(루프백·사설·링크로컬·CGNAT·IPv4-mapped IPv6·메타데이터 이름·.local/.internal·점 없는 서비스 이름). URL에 자격 증명이 들어 있어도 거절.app.py: 브라우저를 열기 전에 검사하고, 리다이렉트를 따라간 뒤 도착한 주소(redirected_url)도 같은 기준으로 다시 본다. 거절은{"success": false, "error": …}로 돌아간다.netguard.py복사, CI pytest 대상에services/crawl4ai-shim/tests추가.확인
ruff check scheduler services통과.