-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
area/securitySecurity and credentialsSecurity and credentialspriority/highImportant improvementImportant improvementsize/S<50 lines<50 lines
Description
Summary
자격증명 관련 보안 이슈 3건.
1. checkFilePermissions fail-open
위치: packages/core/src/config/credentials.ts:102-103
statSync 실패 시 true 반환 → 퍼미션 검증 못하면 그냥 로드.
수정: return false (1줄)
2. CONFIG_DIR 생성 시 퍼미션 미지정
위치: packages/core/src/config/credentials.ts:49
mkdirSync(CONFIG_DIR, { recursive: true }) — 기본 umask(0o755)로 생성.
수정: mkdirSync(CONFIG_DIR, { recursive: true, mode: 0o700 }) (1줄)
3. spawn()에 전체 환경변수 상속
위치: packages/core/src/l1/backend.ts:50-53
CLI 백엔드 spawn 시 모든 API 키가 자식 프로세스에 노출.
수정: 필요한 환경변수만 명시적으로 전달:
const child = spawn(cmd.bin, cmd.args, {
stdio: ['pipe', 'pipe', 'pipe'],
detached: true,
env: {
PATH: process.env['PATH'],
HOME: process.env['HOME'],
// 해당 백엔드에 필요한 키만
...getRequiredEnvForBackend(backend),
},
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/securitySecurity and credentialsSecurity and credentialspriority/highImportant improvementImportant improvementsize/S<50 lines<50 lines