-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
area/securitySecurity and credentialsSecurity and credentialsarea/testingTest coverage and qualityTest coverage and qualitypriority/highImportant improvementImportant improvementsize/M<200 lines<200 lines
Description
Summary
보안 관련 핵심 코드가 테스트 0건.
대상
1. credentials 로드/저장
위치: packages/core/src/config/credentials.ts:18-71
테스트 케이스:
- API 키 로드 → process.env 설정
- 파일 퍼미션 0o600 아닌 경우 로드 거부
- stat 실패 시 로드 거부 (fail-closed)
- saveCredential → 파일 생성 + 0o600 퍼미션 검증
- 디렉토리 생성 시 0o700 퍼미션
2. Generic Webhook HMAC 서명
위치: packages/notifications/src/generic-webhook.ts:17-72
테스트 케이스:
- 올바른 시크릿 → 서명 일치 → 전송 성공
- 잘못된 시크릿 → 거부
- 시크릿 16자 미만 → 거부
- HTTP URL → HTTPS 강제
- 타이밍 공격 방어 (timingSafeEqual 사용 확인)
3. GitHub poster
위치: packages/github/src/poster.ts
테스트 케이스:
- postReview 정상 호출
- API 에러 시 graceful 처리
- rate limit 처리
4. sendDiscordPipelineSummary URL 검증
위치: packages/notifications/src/discord-live.ts:165-222
테스트 케이스:
- 유효한 Discord webhook URL → 성공
- 내부 네트워크 URL → SSRF 차단
- HTTP URL → HTTPS 강제
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/securitySecurity and credentialsSecurity and credentialsarea/testingTest coverage and qualityTest coverage and qualitypriority/highImportant improvementImportant improvementsize/M<200 lines<200 lines