docs(supply-chain): require the distribution namespace in OS package PURLs - #302
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OS 패키지 PURL에 배포판 네임스페이스가 필수임을 요구사항에 명시하고, 서버 납품 스캔에서 이 값이 빠지는 조건을 안내합니다.
배경
서버 납품 SBOM 한 건이 제출 요구사항의 필수 항목을 모두 충족했는데도, 등록 후 컴포넌트가 한 건도 매칭되지 않았습니다. SPDX 2.3 형식에 262개 패키지, PURL 보유율 99.6%, 버전 필드도 같은 비율로 채워져 있었습니다. 반려 사유 어디에도 걸리지 않는 SBOM이었습니다.
원인은 rpm PURL에서 배포판이 빠진 것이었습니다.
PURL 명세는 rpm, deb, apk 타입의 네임스페이스를 필수로 두고, 취약점 분석 시스템도 이 값으로 패키지를 특정합니다. 실제로 조회해 보면 이렇게 갈립니다.
배포판만 채우면 그대로 매칭됩니다. 배포판 릴리스 태그(
.el8_10.6)는 문제가 아니었습니다.현행 문서에서 이 규칙을 알 수 있는 곳은 요구사항의 언어별 예시표에 있는
pkg:rpm/centos/glibc@...한 줄뿐입니다. 같은 표의 npm 예시에는 네임스페이스가 없어 선택 요소로 읽히기 쉽고, 규칙을 서술한 문장도 잘못된 예시도 없었습니다.변경 내용
OS 패키지 PURL에 배포판 누락행을 추가했습니다. 기존실제와 다른 배포판·버전의 PURL과는 다른 유형입니다. 그쪽은 매칭이 성공해 화면에 오류가 보이지 않는 반면, 이쪽은 매칭이 전량 실패해 BOM이 비어 버립니다./etc/os-release로 배포판을 정하므로 rootfs의 루트를 지정해야 하고, 하위 디렉터리만 주면 패키지 데이터베이스는 읽혀도 배포판이 판정되지 않습니다. 스캔 전 확인 명령도 함께 넣었습니다.기존 문장을 고치지 않고 세 곳에 18줄을 더하는 변경입니다. 한국어와 영어 양쪽에 반영했고
hugo빌드와 세 페이지 렌더를 확인했습니다.남은 부분
문서만으로는 부족합니다. 검증 도구의 PURL 문법 검사는 네임스페이스를 선택으로 두기 때문에 이런 SBOM에도 통과를 줍니다. npm이나 pypi에는 그게 맞는 판단이라 그 검사를 고칠 수는 없고, OS 패키지 타입만 보는 별도 검사가 필요합니다. 도구 쪽에서 따로 다루겠습니다.