🇰🇷 한글 설명
GitHub CLI(gh) 2.97.0 미만 버전에서 attestation 검증 시 --signer-repo 및 --signer-workflow 플래그의 값을 정규 표현식 메타문자 처리 없이 사용합니다. 이로 인해 공격자가 유사한 이름의 저장소를 생성하여 정규 표현식 와일드카드를 통해 검증을 우회하고 공급망 보안을 무력화할 수 있습니다.
💡 쉬운 설명
GitHub 도구가 특정 저장소를 확인할 때 이름의 마침표(.)를 단순한 글자가 아닌 '아무 글자나 올 수 있는 기호'로 잘못 인식하는 문제입니다. 공격자가 이름이 비슷한 가짜 저장소를 만들어 마치 진짜인 것처럼 속여 보안 검사를 통과할 수 있습니다.
🇺🇸 원문 (English)
GitHub CLI (gh) is GitHub’s official command line tool. Prior to 2.97.0, gh attestation verify builds the certificate Subject Alternative Name matcher from the --signer-repo and --signer-workflow flag values without escaping regex metacharacters, so a user-supplied repository or workflow name is treated as a regular expression rather than a literal string. Because GitHub permits characters such as `.` in organization, repository, and workflow path names and `.` is a regex wildcard, an attacker can register a lookalike name (for example github/artifact.attestations-workflows) that satisfies a matcher intended for a different trusted signer (github/artifact-attestations-workflows), bypassing the intended Sigstore attestation verification. Exploitation requires the attacker to create a plausible lookalike repository and produce valid attestations from it, which could undermine supply chain verification for CI/CD pipelines or policy gates that pin trust to a specific signing workflow. This issue is fixed in version 2.97.0.
📍 영향받는 시스템
GitHub CLI (gh) version 2.97.0 미만
⚔️ 공격 벡터
정규 표현식 메타문자를 포함한 유사한 이름의 저장소 및 워크플로우를 생성하여 인증 검증 우회
🛡️ 대응 방법
GitHub CLI를 최신 버전인 2.97.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.97.0보다 낮으면 취약한 상태이며, 2.97.0 이상이면 안전합니다.
gh --version | grep -E 'gh version [0-9]+\.[0-9]+\.[0-9]+'