fix(test): 토큰 파일의 실제 특수 권한 검증 복원 - #1956
Draft
seonghobae wants to merge 3 commits into
Draft
Conversation
chmod 요청이 성공해도 kernel이 setgid를 제거할 수 있으므로 loader 실행 전에 테스트 전제를 확인한다. 운영 loader와 거부 조건은 변경하지 않는다. Co-Authored-By: OpenAI Codex <noreply@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
task-owned fixture에 프로세스 그룹을 적용해 setgid 검사 입력을 실제로 유지한다. 테스트 subprocess는 PATH와 명시적 fixture 설정만 받아 운영 환경 변수를 상속하지 않는다. runtime loader, 권한 거부, symlink 및 multiline 검사는 유지한다. Co-Authored-By: OpenAI Codex <noreply@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
Co-Authored-By: OpenAI Codex <noreply@openai.com> Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
수정 범위
정확 HEAD
a8611e4b97a1c62ff2d2852b455f44fe15b1341f, 기준 main43024633eba9d96b0456970391360da5a171fbda.토큰 파일의 특수 권한 거부 테스트가 공유 임시 디렉터리에서도 실제 권한을
검사하도록 고쳤습니다. 운영 loader, workflow, 권한, 의존성 변경은 없습니다.
변경은 테스트 1파일과 CHANGELOG·doctoring 기록뿐입니다.
1600,2600,4600모드가 실제로 설정됐는지 확인한 뒤 실제 loader의 거부를 검사합니다.0600허용,0644·특수 비트·symlink·여러 줄 거부 및 Actions 마스킹 검사는 유지합니다.RED → GREEN
macOS에서 파일 GID가 프로세스의 소속 그룹이 아니면 Python
chmod(0o2600)이오류 없이 돌아와도 실제 파일 모드는
0600으로 남았습니다. 기존 loader가 이를받아들이는 것은 정상입니다. 보안 검증을 완화할 이유가 없습니다.
0600확인.952963caabfb17aa000dbac21b66f894b851f851: 실제 모드 assertion을 추가해 loader 실행 전에 실패를 재현했습니다.fbe8a1f086544d12b8eedcca76eda086247088a8: GID 준비 후 관련 파일 29개 테스트 통과.Python 3.14.6 / pytest 9.1.1의 기존 프로젝트 가상환경을 재사용했습니다.
새 lock 설치 및 Linux 실기 검증은 이번 결과에 포함하지 않습니다.
전체 검증은 아직 실패
env -i로 PATH와CI=true,GITHUB_ACTIONS=true만 전달하고python -m pytest -q -W error --basetemp=<task-owned-temp> tests/ --junitxml=<receipt>를 실행했습니다.최종 전체 실행은 368.70초, exit 1입니다. JUnit의 전체 실패 ID 집합을 비교해
토큰 권한 테스트 1개만 제거됐고 새 실패가 없음을 확인했습니다. 남은 HTTP 정리
실패 11개와
ResourceWarning은 여전히 실패 증거이며 #1879의기존 소스 수정 범위입니다. 이 PR에 해당 운영 코드를 복사하지 않았습니다.
기존 건너뜀 1개는 로컬 LLVM 19 미설치입니다.
interrogate scripts/ci는1140/1140 문서화, 100%이며 이 수치는 테스트/분기 커버리지를 뜻하지 않습니다.
JUnit SHA-256:
d37b5a7b76e5b25e8f856ddb341907d6b66b74f9f7e0ea0a6af0568c750bdefb0f4de97d5577cc2b246421bc17276ca8b806ea45ece17728d6ae7d011d2503a21b2c97331e58e3d6f94d11b61a41108988b3229d8e48ef8413ed8d19b3a6a8f4독립 Agent의 읽기 전용 코드 검토에는 유효 finding이 없었습니다. 이는 GitHub
승인이나 hosted Checks가 아닙니다. 전체 실패가 남아 있으므로 Draft를 유지하고,
#1879의 보호 병합 후 최신 main을 정상 승계해 정확 HEAD 전체 검증을 다시 실행합니다.
이 권한 fixture의 재현 실패는 1→0이지만 조직 전체 60-job 목표 달성률로 계산하지 않습니다.
근거
상세 실행 경계와 APA 참고문헌은
doctoring 기록에 있습니다.
Linux도 소속되지 않은 파일 그룹의 setgid를 오류 없이 제거할 수 있다고 설명하며,
Python
os.chown은 ID를-1로 지정하면 해당 ID를 유지합니다.(Linux man-pages,
Python 공식 문서)