fix(security): 스케줄 셸 인터프리터 인라인 코드 우회 차단
셸 스케줄 검증이 첫 토큰 basename 만 화이트리스트와 대조하고 뒤 인자를 검증하지 않아, 운영자가 bash 를 등록하면 `bash -c id` 로 임의 OS 명령이 실행됐다(KVE-2026-1653). 인터프리터는 범용 크론 용도로 등록을 허용하되, 스크립트 자리(첫 인자)에 형태 규칙을 적용해 인라인 코드·상대경로·트래버설· artisan 우회·완전거부형(env/awk/make 등)을 저장·실행 양쪽에서 거부한다.
This commit is contained in:
@@ -515,6 +515,7 @@ return [
|
||||
// Schedule command (shell/Artisan) validation messages — these run on the server
|
||||
'schedule_command' => [
|
||||
'shell_not_allowed' => 'This shell command is not allowed. Only executables registered on the server may be used, and special characters such as pipes (|) or semicolons (;) are not permitted.',
|
||||
'shell_interpreter_denied' => 'You cannot run inline commands/code through an interpreter or point it at an unsafe path. After an interpreter, specify only an absolute-path script file.',
|
||||
'artisan_denied' => 'This Artisan command cannot be run as a schedule for security reasons.',
|
||||
'artisan_not_allowlisted' => 'This Artisan command is not allowed to run on a schedule. Only maintenance commands such as cache clearing and queue processing can be registered.',
|
||||
'artisan_malformed' => 'The Artisan command format is invalid. Quotes, backslashes, and short options (-v) are not allowed; use "command --option[=value]" only.',
|
||||
|
||||
@@ -514,6 +514,7 @@ return [
|
||||
// 서버에서 실행되는 스케줄 command(쉘·Artisan) 검증 메시지
|
||||
'schedule_command' => [
|
||||
'shell_not_allowed' => '허용되지 않은 쉘 명령입니다. 서버에 등록된 실행 파일만 사용할 수 있으며, 파이프(|)·세미콜론(;) 등 특수문자는 쓸 수 없습니다.',
|
||||
'shell_interpreter_denied' => '인터프리터로 인라인 명령/코드를 실행하거나 안전하지 않은 경로를 지정할 수 없습니다. 인터프리터 뒤에는 절대경로 스크립트 파일만 지정하세요.',
|
||||
'artisan_denied' => '이 Artisan 명령은 보안상 스케줄로 실행할 수 없습니다.',
|
||||
'artisan_not_allowlisted' => '예약 실행이 허용된 Artisan 명령이 아닙니다. 캐시 정리·큐 처리 등 유지보수 명령만 등록할 수 있습니다.',
|
||||
'artisan_malformed' => 'Artisan 명령 형식이 올바르지 않습니다. 따옴표·역슬래시·단축 옵션(-v)은 쓸 수 없고 "명령명 --옵션[=값]" 형태만 등록할 수 있습니다.',
|
||||
|
||||
Reference in New Issue
Block a user