-
Notifications
You must be signed in to change notification settings - Fork 1
chore(ci): GH Actions 폐기 + 로컬 4 계층 게이트 (RFC 0002, ADR 0009) #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Local 4-tier gate (RFC 0002 — GH Actions 영구 금지). ADR 0009 참조. | ||
| # | ||
| # 도입: | ||
| # pre-commit install --hook-type pre-commit --hook-type pre-push | ||
| # | ||
| # 우회: | ||
| # `--no-verify`는 사고 보고 의무 (incident-kb.md). 남용 금지. | ||
| # | ||
| # 매핑: | ||
| # L1 pre-commit — lint (빠른 피드백) | ||
| # L2 pre-push — test (unit + envtest), audit (trivy fs), secrets (gitleaks), | ||
| # go.mod drift check | ||
| # L3 Makefile — e2e (kind), matrix-build (docker buildx) — 수동 실행 | ||
| # L4 PR review — PR body의 "로컬 게이트 PASS" 증거 블록 확인 | ||
|
|
||
| repos: | ||
| - repo: local | ||
| hooks: | ||
| # ================================================================ | ||
| # L1 pre-commit — fast feedback (< 30s 목표) | ||
| # ================================================================ | ||
| - id: golangci-lint | ||
| name: golangci-lint (with .custom-gcl) | ||
| language: system | ||
| entry: bash -c 'make lint-config && make lint' | ||
| pass_filenames: false | ||
| always_run: true | ||
| stages: [pre-commit] | ||
|
|
||
| # ================================================================ | ||
| # L2 pre-push — comprehensive verification (1-3 min 목표) | ||
| # ================================================================ | ||
| - id: go-mod-tidy-drift | ||
| name: go.mod / go.sum drift check | ||
| language: system | ||
| entry: bash -c 'go mod tidy && git diff --exit-code go.mod go.sum' | ||
| pass_filenames: false | ||
| always_run: true | ||
| stages: [pre-push] | ||
|
|
||
| - id: go-test | ||
| name: Unit + envtest (make test) | ||
| language: system | ||
| entry: make test | ||
| pass_filenames: false | ||
| always_run: true | ||
| stages: [pre-push] | ||
|
|
||
| - id: trivy-fs-audit | ||
| name: Trivy fs (HIGH+CRITICAL — make audit) | ||
| language: system | ||
| entry: make audit | ||
| pass_filenames: false | ||
| always_run: true | ||
| stages: [pre-push] | ||
|
|
||
| - id: gitleaks | ||
| name: gitleaks (staged secrets scan) | ||
| language: system | ||
| entry: bash -c 'command -v gitleaks >/dev/null 2>&1 && gitleaks protect --staged --redact || { echo "[warn] gitleaks 미설치 — brew install gitleaks 권장"; exit 0; }' | ||
| pass_filenames: false | ||
| always_run: true | ||
| stages: [pre-push] | ||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gitleaks hook currently uses
command -v ... && gitleaks ... || { ...; exit 0; }, which means any non-zero exit fromgitleaks protect(including real secret detections) falls into the||branch and returns success, so pushes are not blocked even when secrets are found. In this repo, CI workflows were removed in the same commit, so this effectively disables secret-enforcement for contributors who do have gitleaks installed.Useful? React with 👍 / 👎.