Claude Code v2.1.88 디컴파일 소스 코드 분석 기반.
언더커버 모드는 Anthropic 직원이 공개/오픈소스 저장소에 기여할 때 사용되는 안전 시스템이다. 활성화 시 모든 AI 저작 표시를 제거하고, 기여 내용을 사람이 작성한 것처럼 보이도록 모델에 지시한다.
출처: src/utils/undercover.ts
// src/utils/undercover.ts:28-37
export function isUndercover(): boolean {
if (process.env.USER_TYPE === 'ant') {
if (isEnvTruthy(process.env.CLAUDE_CODE_UNDERCOVER)) return true
// Auto: 내부 저장소로 확인되지 않으면 자동 활성화
return getRepoClassCached() !== 'internal'
}
return false
}주요 특성:
- 내부 전용: Anthropic 직원(
USER_TYPE === 'ant')만 해당 - 기본 활성화: 내부 허용 목록에 없는 모든 저장소에서 자동 활성화
- 강제 비활성화 불가: "There is NO force-OFF. This guards against model codename leaks"
- 외부 빌드: 번들러에 의해 데드 코드 제거됨; 실행되지 않음
// src/utils/undercover.ts:39-69
export function getUndercoverInstructions(): string {
return `## UNDERCOVER MODE — CRITICAL
You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Your commit
messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal
information. Do not blow your cover.
NEVER include in commit messages or PR descriptions:
- Internal model codenames (animal names like Capybara, Tengu, etc.)
- Unreleased model version numbers (e.g., opus-4-7, sonnet-4-8)
- Internal repo or project names (e.g., claude-cli-internal, anthropics/…)
- Internal tooling, Slack channels, or short links (e.g., go/cc, #claude-code-…)
- The phrase "Claude Code" or any mention that you are an AI
- Any hint of what model or version you are
- Co-Authored-By lines or any other attribution
Write commit messages as a human developer would — describe only what the code
change does.
GOOD:
- "Fix race condition in file watcher initialization"
- "Add support for custom key bindings"
BAD (never write these):
- "Fix bug found while testing with Claude Capybara"
- "1-shotted by claude-opus-4-6"
- "Generated with Claude Code"
- "Co-Authored-By: Claude Opus 4.6 <…>"`
}저작 표시 시스템(src/utils/attribution.ts, src/utils/commitAttribution.ts)은 언더커버 모드를 보완한다:
// src/utils/attribution.ts:70-72
// @[MODEL LAUNCH]: 아래 하드코딩된 폴백 모델 이름 업데이트
// (코드네임 유출 방지용).
// 외부 저장소에서 인식되지 않는 모델은 "Claude Opus 4.6"으로 폴백.// src/utils/model/model.ts:386-392
function maskModelCodename(baseName: string): string {
// e.g. capybara-v2-fast → cap*****-v2-fast
const [codename = '', ...rest] = baseName.split('-')
const masked = codename.slice(0, 3) + '*'.repeat(Math.max(0, codename.length - 3))
return [masked, ...rest].join('-')
}Anthropic 직원이 Claude Code로 오픈소스 프로젝트에 기여할 때:
- AI가 코드를 작성하지만 커밋은 사람이 작성한 것으로 표시된다
- "Co-Authored-By: Claude" 저작 표시가 없다
- "Generated with Claude Code" 마커가 없다
- 프로젝트 메인테이너와 커뮤니티는 AI 생성 기여를 식별할 수 없다
- 이는 AI 기여에 관한 오픈소스 투명성 규범을 잠재적으로 위반한다
명시된 주요 목적은 다음의 우발적 유출 방지:
- 내부 모델 코드네임 (경쟁 정보)
- 미공개 버전 번호 (시장 타이밍)
- 내부 인프라 세부 정보 (보안)
"Do not blow your cover(정체를 들키지 마라)"라는 표현은 AI를 잠입 요원으로 프레이밍한다. 공개 코드 기여에서의 의도적인 AI 저작 은폐는 다음과 같은 질문을 제기한다:
- 오픈소스 커뮤니티에서의 투명성
- 프로젝트 기여 가이드라인 준수 여부
- 영업비밀 보호와 기만 사이의 경계