[CHORE] CI 공급망을 굳힌다 — 액션 SHA 고정 · Dependabot · zizmor · Trivy - #374
Conversation
러너는 PR 코드를 컴파일·실행한다. 액션이 태그로 참조되면 그 태그는 언제든 다른
커밋을 가리킬 수 있고, 그때 러너의 토큰과 시크릿이 함께 나간다.
1) 액션 25개를 전부 full-length SHA 로 고정. 후행 태그 주석(# v4)을 남긴다 —
Dependabot 이 그 주석을 읽고 SHA 와 주석을 함께 올려준다. 주석을 지우면 그
액션은 갱신이 멈추므로 지우지 말 것.
(gate1 의 semgrep container 이미지는 태그 유지 — Dependabot 이 워크플로 container
를 갱신해주지 않아 digest 로 박으면 낡은 엔진에 영구히 묶인다. 기존 판단 유지.)
2) .github/dependabot.yml — gradle · github-actions 주간. 리포터.
3) zizmor 를 Gate 1 에 추가(차단). 워크플로 파일 자체의 보안을 본다.
도입 전 4건이 나왔고 전부 팀이 이미 지키던 규약과 어긋난 지점이라 고쳤다.
- artipacked 3건 : checkout 에 persist-credentials: false 누락 (backend-ci 3 · cd 1)
- excessive-permissions 1건 : gate1-semgrep 에 permissions 선언 없음 → contents: read
지금 findings 0 이다. baseline 부채가 없어 유예할 것이 없으므로 차단으로 켠다.
4) Trivy 2개 — 둘 다 리포터로 시작한다.
- image : develop push 에서 밀기 전에 스캔한다. 밀고 나서 스캔하면 취약한 이미지가
이미 레지스트리에 있다. Dockerfile 이 ffmpeg 를 설치하고 그게 회의 녹음을
파싱하므로 OS 패키지 CVE 표면이 실재한다.
- config : PR 에서 Dockerfile·compose 설정만 본다. 빌드가 없어 몇 초면 끝난다.
findings 를 아직 본 적이 없어 차단으로 켜면 첫날 배포·PR 이 멈출 수 있다.
첫 실행 결과를 보고 exit-code 를 올린다.
검증: 워크플로 5개 YAML 파싱 OK · zizmor findings 0 · 태그 참조 잔여 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughDependabot 업데이트 정책을 추가했다. CI/CD 워크플로의 외부 액션을 커밋 SHA로 고정했다. Docker 이미지와 설정을 Trivy로 검사하고, 워크플로 자체를 zizmor로 검사하도록 구성했다. ChangesCI/CD 보안 및 의존성 자동화
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/backend-ci.yml:
- Around line 49-52: Remove the duplicate with mapping in the workflow step,
keeping a single with block containing persist-credentials: false and preserving
the existing comment or intended context.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: fc990a5c-f6ec-47a1-bc34-e500cc2361bc
📒 Files selected for processing (5)
.github/dependabot.yml.github/workflows/backend-ci.yml.github/workflows/cd.yml.github/workflows/gate1-semgrep.yml.github/workflows/gate2-judge.yml
| with: | ||
| persist-credentials: false # 러너에 git 자격증명을 남기지 않는다 | ||
| with: | ||
| persist-credentials: false # PR 코드를 컴파일·실행하는 잡 — 러너에 git 자격증명을 남기지 않는다 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
중복된 with 키를 제거하십시오.
Line 51은 Line 49의 with 키를 중복 정의합니다. 이 매핑은 actionlint 및 YAMLlint 검증에서 오류입니다. 하나의 with 블록만 유지하십시오.
수정 예시
with:
persist-credentials: false # 러너에 git 자격증명을 남기지 않는다
- with:
- persist-credentials: false # PR 코드를 컴파일·실행하는 잡 — 러너에 git 자격증명을 남기지 않는다📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| with: | |
| persist-credentials: false # 러너에 git 자격증명을 남기지 않는다 | |
| with: | |
| persist-credentials: false # PR 코드를 컴파일·실행하는 잡 — 러너에 git 자격증명을 남기지 않는다 | |
| with: | |
| persist-credentials: false # 러너에 git 자격증명을 남기지 않는다 |
🧰 Tools
🪛 actionlint (1.7.12)
[error] 51-51: key "with" is duplicated in element of "steps" section. previously defined at line:49,col:9
(syntax-check)
🪛 YAMLlint (1.37.1)
[error] 51-51: duplication of key "with" in mapping
(key-duplicates)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/backend-ci.yml around lines 49 - 52, Remove the duplicate
with mapping in the workflow step, keeping a single with block containing
persist-credentials: false and preserving the existing comment or intended
context.
Source: Linters/SAST tools
cd53e85
into
security/tenant-authz-semgrep-rules
📌 연관 이슈
📝 작업 내용
러너는 PR 코드를 컴파일·실행합니다. 액션이 태그로 참조되면 그 태그는 언제든 다른 커밋을 가리킬 수 있고, 그때 러너의 토큰과 시크릿이 함께 나갑니다.
1) 액션 25개를 전부 full-length SHA 로 고정
후행 태그 주석(
# v4)을 남겼습니다 — Dependabot 이 그 주석을 읽고 SHA 와 주석을 함께 올려줍니다. 주석을 지우면 그 액션은 갱신이 멈추고 낡은 버전에 영구히 묶이니 지우지 마세요.2)
.github/dependabot.yml— gradle · github-actions 주간. 리포터.3) zizmor 를 Gate 1 에 추가 (차단)
워크플로 파일 자체의 보안을 봅니다. 도입 전 4건이 나왔는데 전부 팀이 이미 다른 워크플로에서 지키던 규약과 어긋난 지점이라 고쳤습니다.
artipackedpersist-credentials: false누락 (backend-ci 3 · cd 1)excessive-permissionsgate1-semgrep에permissions선언 없음 →contents: read추가지금 findings 0 입니다. baseline 부채가 없어 유예할 것이 없으므로 차단으로 켭니다.
4) Trivy 2개 — 둘 다 리포터로 시작
Dockerfile이ffmpeg를 설치하고 그게 회의 녹음을 파싱하므로 OS 패키지 CVE 표면이 실재합니다.💡 백엔드 리뷰 포인트
왜 Trivy 는 리포터로 시작하나
findings 를 아직 본 적이 없습니다. 차단으로 켜면 develop 배포나 모든 PR 이 첫날 멈출 수 있습니다. 첫 실행 결과를 보고
exit-code를 1 로 올립니다 — 워크플로 주석에 "올릴 때 이 주석도 함께 지울 것"이라고 적어뒀습니다(정책과 코드가 어긋난 채 남지 않게).zizmor 는 반대로 처음부터 차단입니다. 결정론 도구고 도입 시점 findings 가 0 이라 유예할 부채가 없습니다.
이미지를 두 번 빌드하는 것처럼 보이는 부분
load: true로 먼저 받아 스캔하고, 그 다음 push 합니다. 두 번째 빌드는 첫 번째의 GHA 캐시를 그대로 써서 실질 비용은 거의 없습니다.우려되는 부분
develop에서도Java heap space/OutOfMemoryError로 실패합니다(run 31485537291).gradle.properties가 없고maxHeapSize설정도 없어 기본 힙으로 돕니다. 이게 고쳐지지 않으면 Gradle Test 를 required check 로 못 묶습니다 — 별도 처리 필요.✅ 체크리스트
🤖 Generated with Claude Code
Summary by CodeRabbit