fix(security): outbound URL 내부주소·host 검증 전수 강화

서버가 외부 입력으로 목적지가 제어되는 outbound HTTP 요청을 보내는 지점을
전수 조사해, 내부망(사설 IP·루프백·링크로컬·메타데이터)과 host 위조를 차단한다.
KVE-2026-1546(이니시스 인증 URL 접두사 매칭 우회)과 동일 클래스의
지점(언어팩 URL 설치, 스케줄 URL 호출, 배송비 계산 API, GitHub URL 판정)을
코어 공용 유틸 App\Support\OutboundUrlValidator 로 수렴시켰다.

- 접두사 매칭을 host 완전일치로 교체 — userinfo(@) 위장과 접미사 확장 도메인
 우회 벡터 차단.
- 사내 서버 호출이 정당한 관리자 지점(스케줄·외부 API)은 신규 설정
 security.allow_internal_outbound_urls(기본 off)로 옵트인.
- 언어팩 URL 설치는 원격 코드 다운로드라 옵트인과 무관하게 내부 주소 항상 차단.
- 웹소켓 연결 테스트는 localhost·사설 IP 가 정상 구성이므로 구조적 위조만 차단.

각 지점에 red 재현 → 수정 → green 회귀 테스트 + 실브라우저 E2E 로 검증.
수기 API 문서가 자동 재생성으로 소실되는 사고를 막는 PreToolUse 훅을 함께 추가한다.
This commit is contained in:
HeuJung committed 2026-07-14 09:17:00 +09:00
1 parent f848086fd6
commit c4beb116ad
46 files changed
+1297 -55

No files matched your search

+1
View File
@@ -34,6 +34,7 @@ return [
'downgrade_blocked' => 'Downgrade blocked (:from → :to).',
'protected_pack' => 'Protected language packs cannot be deactivated or removed.',
'download_failed' => 'Failed to download from URL: :url',
'download_url_not_public' => 'Language packs cannot be downloaded from internal network addresses (private IPs, localhost, etc.). Use a publicly reachable https address.',
'checksum_mismatch' => 'Checksum mismatch.',
'update_no_source' => 'No update source available (only GitHub-sourced packs can be updated).',
'update_already_latest' => 'Already on the latest version.',
+1
View File
@@ -28,6 +28,7 @@ return [
'copy' => 'Copy',
'shell_command_failed' => 'Shell command execution failed.',
'http_request_failed' => 'HTTP request failed with status: :status',
'url_not_public' => 'Internal network addresses (private IPs, localhost, etc.) cannot be called. To call an address inside your network, enable "Allow internal network addresses" under Settings > Security.',
// Task types
'type' => [
+1
View File
@@ -103,6 +103,7 @@ return [
// Websocket test messages
'websocket_test_success' => 'Successfully connected to Websocket server.',
'websocket_test_failed' => 'Failed to connect to Websocket server.',
'websocket_invalid_host' => 'The Websocket host setting is invalid. Enter the address only — credentials (@) and protocols other than http/https are not allowed.',
'websocket_connection_refused' => 'Could not connect to Websocket server. Please check if the server is running.',
// Test mail related messages
+7
View File
@@ -504,6 +504,12 @@ return [
'dangerous_scheme_detected' => 'Dangerous URI scheme detected: :scheme',
],
// Outbound URL (external API, schedule, etc.) validation messages
'outbound_url' => [
'invalid' => 'This is not a valid URL. Enter an address starting with http or https.',
'internal_not_allowed' => 'Internal network addresses (private IPs, localhost, etc.) are not allowed. Enter a publicly reachable address.',
],
// Component existence validation messages
'component' => [
'template_id_required' => 'template_id is required for component validation.',
@@ -824,6 +830,7 @@ return [
// Security settings
'force_https_required' => 'Please select the Force HTTPS setting.',
'force_https_boolean' => 'Force HTTPS must be true or false.',
'allow_internal_outbound_urls_boolean' => 'Allow internal network address calls must be true or false.',
'login_attempt_enabled_required' => 'Please select the login attempt limit setting.',
'login_attempt_enabled_boolean' => 'Login attempt limit must be true or false.',
'auth_token_lifetime_integer' => 'Auth token lifetime must be an integer.',
+1
View File
@@ -34,6 +34,7 @@ return [
'downgrade_blocked' => '다운그레이드가 차단되었습니다 (:from → :to).',
'protected_pack' => '보호된 언어팩은 비활성화/제거할 수 없습니다.',
'download_failed' => 'URL(:url) 에서 언어팩을 다운로드하지 못했습니다: :error',
'download_url_not_public' => '내부 네트워크 주소(사설 IP·localhost 등)에서는 언어팩을 내려받을 수 없습니다. 외부에서 접속 가능한 https 주소를 사용해주세요.',
'checksum_mismatch' => '체크섬이 일치하지 않습니다.',
'update_no_source' => '업데이트 소스 정보가 없습니다 (GitHub 소스 언어팩만 업데이트 가능).',
'update_already_latest' => '이미 최신 버전입니다.',
+1
View File
@@ -28,6 +28,7 @@ return [
'copy' => '복사본',
'shell_command_failed' => '쉘 명령 실행에 실패했습니다.',
'http_request_failed' => 'HTTP 요청 실패 (상태: :status)',
'url_not_public' => '내부 네트워크 주소(사설 IP·localhost 등)는 호출할 수 없습니다. 사내 주소를 호출해야 한다면 환경설정 > 보안에서 "내부 네트워크 주소 호출 허용"을 켜주세요.',
// 작업 유형
'type' => [
+1
View File
@@ -103,6 +103,7 @@ return [
// Websocket 테스트 메시지
'websocket_test_success' => 'Websocket 서버에 성공적으로 연결되었습니다.',
'websocket_test_failed' => 'Websocket 서버 연결에 실패했습니다.',
'websocket_invalid_host' => 'Websocket 호스트 설정이 올바르지 않습니다. 호스트에는 주소만 입력하고 계정 정보(@)나 http/https 이외의 프로토콜은 사용할 수 없습니다.',
'websocket_connection_refused' => 'Websocket 서버에 연결할 수 없습니다. 서버가 실행 중인지 확인해주세요.',
// 테스트 메일 관련 메시지
+7
View File
@@ -503,6 +503,12 @@ return [
'dangerous_scheme_detected' => '위험한 URI 스킴이 감지되었습니다: :scheme',
],
// 서버가 대신 호출하는 URL(외부 API·스케줄 등) 검증 메시지
'outbound_url' => [
'invalid' => '올바른 형식의 URL이 아닙니다. http 또는 https 로 시작하는 주소를 입력해 주세요.',
'internal_not_allowed' => '내부 네트워크 주소(사설 IP·localhost 등)는 사용할 수 없습니다. 외부에서 접속 가능한 주소를 입력해 주세요.',
],
// 컴포넌트 존재 여부 검증 메시지
'component' => [
'template_id_required' => '컴포넌트 검증을 위해서는 template_id가 필요합니다.',
@@ -897,6 +903,7 @@ return [
// 보안 설정
'force_https_required' => 'HTTPS 강제 적용 설정을 선택해주세요.',
'force_https_boolean' => 'HTTPS 강제 적용은 true 또는 false 값이어야 합니다.',
'allow_internal_outbound_urls_boolean' => '내부 네트워크 주소 호출 허용은 true 또는 false 값이어야 합니다.',
'login_attempt_enabled_required' => '로그인 시도 제한 설정을 선택해주세요.',
'login_attempt_enabled_boolean' => '로그인 시도 제한은 true 또는 false 값이어야 합니다.',
'auth_token_lifetime_integer' => '인증 토큰 유지시간은 정수여야 합니다.',