Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ spec:
- name: keys
secret:
secretName: pinit-keys
defaultMode: 0400
defaultMode: 0444
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1) 문제점: Secret 파일의 권한을 0444(모든 사용자에게 읽기 권한)로 변경하는 것은 보안 위험이 있습니다. 동일한 노드에서 실행되는 다른 파드나 프로세스가 해당 secret 파일을 읽을 수 있게 됩니다.

(2) 영향: 컨테이너 내의 모든 사용자(다른 그룹 포함)가 /etc/keys 경로의 secret 파일을 읽을 수 있어, 권한이 없는 프로세스나 악의적인 코드가 민감한 정보에 접근할 수 있습니다.

(3) 수정 제안: 원래 설정인 0400(소유자만 읽기 가능) 또는 0440(소유자와 그룹만 읽기 가능)을 유지하세요. 만약 애플리케이션이 secret 파일을 읽지 못하는 문제가 있다면, 컨테이너의 runAsUser/runAsGroup을 적절히 설정하거나, fsGroup을 사용하여 파일 소유권을 조정하는 것이 더 안전합니다.

Suggested change
defaultMode: 0444
defaultMode: 0400

Copilot uses AI. Check for mistakes.
containers:
- name: app
image: ghcr.io/pinit-scheduler/pinit-auth/app:${GITHUB_SHA} # ${{ github.sha }} 환경변수로 주입 필요
imagePullPolicy: IfNotPresent

env:
- name: SPRING_PROFILES_ACTIVE
value: prod

volumeMounts:
- mountPath: /etc/keys
name: keys
Expand Down