🇰🇷 한글 설명
identrail은 AWS, GitHub/OIDC, Kubernetes를 위한 머신 아이덴티티 보안 플랫폼입니다. 1.0.2 이전 버전에서는 GitHub 연결 완료 엔드포인트가 installation_id의 소유권을 검증하지 않아, 인증된 테넌트가 다른 조직의 설치 ID를 사용해 해당 조직의 비공개 저장소 정보와 콘텐츠를 열람할 수 있습니다.
💡 쉬운 설명
로그인한 사용자가 다른 회사의 GitHub 설치 번호만 알면, 그 회사의 비공개 저장소 목록과 내용을 몰래 볼 수 있는 문제입니다. identrail의 GitHub App이 해당 회사에 설치되어 있으면 악용이 가능합니다.
🇺🇸 원문 (English)
identrail is a machine identity security platform for AWS, GitHub/OIDC, and Kubernetes. Prior to 1.0.2, the default-on `POST /v1/workspaces/:workspace_id/projects/:project_id/github/connect/complete` endpoint in `internal/api/router.go` accepts `installation_id` from the request body or `X-GitHub-Installation-ID` header without verifying the installation belongs to the caller's workspace. `CompleteGitHubConnection` in `internal/api/github_connect.go` rigorously binds `state` to the caller's tenant, workspace, and project, but checks only that the installation ID is positive before persisting it as the caller's connection. `ListInstallationRepositories` in `internal/connectors/github/repositories.go` invokes token creation through `internal/connectors/github/app.go` and `POST /app/installations/{installationId}/access_tokens`, using the application's JWT. An authenticated tenant who starts a legitimate connection can supply another customer's non-secret installation ID to read the victim organization's private repository inventory, content, and metadata or drive posture scans, provided identrail's GitHub App is installed there. The default-off V2 `CompleteGitHubConnector` path shares the installation-ownership gap and additionally matches pending `state` without rechecking caller scope. This issue is fixed in version 1.0.2.
📍 영향받는 시스템
identrail 1.0.2 이전 버전 (GitHub 연결 기능 사용 환경, V2 CompleteGitHubConnector 경로 포함)
⚔️ 공격 벡터
정상적인 연결을 시작한 인증 사용자가 POST /v1/workspaces/:workspace_id/projects/:project_id/github/connect/complete 요청에 피해자 조직의 installation_id를 넣어 전송
🛡️ 대응 방법
identrail을 1.0.2 이상으로 업그레이드하고, 설치 ID가 호출자의 워크스페이스에 속하는지 서버 측에서 검증하는지 확인
🔧 검증 코드
출력된 버전이 1.0.2 미만이면 취약하며, 1.0.2 이상이면 패치가 적용된 것입니다.
identrail version 2>/dev/null || grep -rn 'version' go.mod 2>/dev/null | head -1