Repository navigation
security(ci): Dependency Review 를 필수 체크로 건다 (#2258) - #2259
Merged
Merged
Conversation
paths 필터로만 돌던 dependency-review.yml 은 소스만 고친 PR 에 check 를 만들지 않아 required 로 걸 수 없었다. 같은 경로 목록을 resolve-pr-impact 분류로 옮기고, PR Validation 이 reusable workflow 로 매번 불러 검사 스텝만 조건부로 건너뛴다. 분류 실패는 검사 쪽으로 닫는다.
GITHUB_TOKEN 커밋 뒤 PR Validation 을 workflow_dispatch 로 다시 부르면 PR 스냅샷이 없어 검사 스텝이 빠진다. 건너뛰면 이전 head 의 실패를 검사 없는 초록이 덮으므로, merge group 만 건너뛰고 그 밖의 이벤트는 의존성 입력이 바뀌었으면 실패한다.
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.
핵심 파일:
.github/workflows/dependency-review.yml에서 이벤트별 처리,.github/workflows/pr-validation.yml에서 새 lane,.github/scripts/resolve-pr-impact.mjs에서 의존성 입력 분류를 확인할 수 있습니다.Dependency Review 는 high 이상 취약 의존성을 막는 게이트인데 develop 필수 체크가 아니었습니다. paths 필터로만 돌아서 소스만 고친 PR 에는 check 가 생기지 않았고, 필수로 걸면 그 PR 들이 대기 상태로 막히기 때문입니다. 그래서 #2124 처럼 빨간불이 떠도 머지 버튼이 열려 있었습니다.
다른 필수 lane 과 같은 구조로 옮깁니다. Repository Quality 가 PR 파일 API 로 하는 전체 분류에 예전 paths 목록을 그대로 옮긴 판정(
dependency_review_required)을 더하고, PR Validation 이 Dependency Review 를 reusable workflow 로 매번 부릅니다. job 은 항상 돌아Dependency Review / Review dependency changescheck 를 남기고, 검사 스텝만 조건에 따라 실행합니다.#1227 이 job 안 판정을 paths 필터로 바꾼 이유는 소스 PR 에 workflow 를 띄우지 않으려는 것이었습니다. 이번 구조는 새 runner job 하나가 수 초 안에 끝나는 비용으로 필수화를 얻습니다.
검증: Node 스크립트 전체 820개 통과·1개 건너뜀(기존 remote-dev 조건부 skip), 변경 workflow 3개 actionlint 통과,
scripts/repository-quality.sh통과. 분류 fail-closed 제거, 이벤트 조건 제거, PR Validation 의 fail-open 전환, dispatch 실패 스텝의exit 1제거와 조건 무력화 변이를 각각 정책 테스트가 잡는 것을 확인했습니다. 독립 리뷰 3관점에서 나온 bridge dispatch 우회를 두 번째 커밋으로 막았습니다.머지 뒤
required-checks (develop)룰셋(20911039)에Dependency Review / Review dependency changes를 추가합니다. 머지 전에 넣으면 이 lane 이 없는 열린 PR 이 전부 대기 상태로 막히므로 순서를 지킵니다.Closes #2258
🧪 CI Test Plan
{ "androidTest": { "mode": "none", "reason": "변경은 PR 검증 workflow 의 lane 구성·분류 스크립트·Node 정책 검사뿐이며 Android 런타임·계측 하네스·빌드 의존성은 바뀌지 않습니다.", "tests": [] } }