feat: 워크로드 securityContext 추가 (컨테이너 하드닝) (#61)#62
Merged
Conversation
- 전 워크로드 pod-level seccompProfile: RuntimeDefault - backend/ai/frontend/redis 컨테이너: allowPrivilegeEscalation: false + capabilities.drop [ALL] - postgres: allowPrivilegeEscalation: false만 (root→postgres 권한 드롭에 캡 필요해 drop ALL 제외) runAsNonRoot/readOnlyRootFilesystem은 이미지 검증 후 별도 적용(깨짐 방지). base에 적용 → kind/eks overlay 공통 상속. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
closes #61
개요
모든 워크로드에 securityContext가 없던 문제(코드리뷰 #7)를 이미지 깨짐 위험이 없는 안전 부분집합으로 하드닝.
적용
seccompProfile: RuntimeDefaultallowPrivilegeEscalation: false+capabilities.drop: [ALL]seccompProfile: RuntimeDefaultallowPrivilegeEscalation: false(drop ALL 제외)NET_BIND_SERVICE등 캡 불필요 →drop [ALL]안전.postgres유저로 권한 드롭(CHOWN/SETUID 등 캡 필요) →drop ALL/runAsNonRoot적용 시 initdb 실패하므로 제외,no_new_privs만 설정.의도적으로 제외 (후속, 이미지 검증 필요)
runAsNonRoot: true/runAsUser— 각 ECR 이미지가 non-root 사용자를 지원하는지 Dockerfile 확인 후readOnlyRootFilesystem: true— 앱이 쓰는 임시경로에 emptyDir 마운트 필요base 적용 → kind/eks overlay 공통 상속. YAML 검증 완료.
🤖 Generated with Claude Code