File tree Expand file tree Collapse file tree 6 files changed +41
-0
lines changed
Expand file tree Collapse file tree 6 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 2929 WALLET_COST : " 1"
3030
3131jobs :
32+ secrets-scan :
33+ runs-on : ubuntu-latest
34+
35+ steps :
36+ - name : Checkout
37+ uses : actions/checkout@v4
38+
39+ - name : Run gitleaks
40+ uses : docker://zricethezav/gitleaks:v8.24.2
41+ with :
42+ args : detect --source=. --no-git --redact --config=.gitleaks.toml
43+
3244 check :
3345 runs-on : ubuntu-latest
3446
Original file line number Diff line number Diff line change 1+ title = " mmwb gitleaks config"
2+
3+ [extend ]
4+ useDefault = true
5+
6+ [allowlist ]
7+ description = " Ignore local/generated files that are not part of tracked source"
8+ paths = [
9+ ''' ^\.env$''' ,
10+ ''' ^\.env\..*''' ,
11+ ''' ^\.mypy_cache/''' ,
12+ ''' ^bot/\.mypy_cache/''' ,
13+ ''' ^\.pytest_cache/''' ,
14+ ''' ^\.venv/''' ,
15+ ''' ^gitleaks-report\.json$''' ,
16+ ''' ^logs/''' ,
17+ ''' ^data/''' ,
18+ ''' ^db/''' ,
19+ ''' ^bot/tests/core/test_payment_use_cases\.py$''' ,
20+ ''' ^bot/tests/routers/test_add_wallet\.py$''' ,
21+ ]
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ an index. Detailed rules live in `docs/`.
2828- ` just test-e2e-smoke ` : deterministic user-flow smoke tests.
2929- ` just test-external ` : docker/external integration tests.
3030- ` just arch-test ` : architecture guardrails.
31+ - ` just secret-scan ` : repository secret leak scan (gitleaks).
3132- ` just check ` : full local gate (` fmt + lint + test + arch-test ` ).
3233- ` just check-fast ` : CI-safe gate (` lint + test-fast + arch-test ` ).
3334- ` just metrics ` : local repository metrics snapshot.
Original file line number Diff line number Diff line change @@ -130,13 +130,15 @@ domain ← application ← infrastructure
130130| ` just check ` | ` fmt ` + ` lint ` + ` test ` — полная проверка перед PR |
131131| ` just check-fast ` | CI-safe проверка: ` lint ` + ` test-fast ` + ` arch-test ` |
132132| ` just arch-test ` | Структурные тесты архитектурных границ |
133+ | ` just secret-scan ` | Скан на утечку секретов (gitleaks) |
133134| ` just metrics ` | Локальные метрики наблюдаемости |
134135| ` just start-task ` | Создать шаблон execution plan в ` docs/exec-plans/active/ ` |
135136| ` just finish-task ` | Перенести план в ` docs/exec-plans/completed/ ` |
136137
137138### Обязательные CI-проверки
138139
139140* CI выполняет минимум ` just check-fast ` для каждого PR.
141+ * Секрет-скан (` just secret-scan ` ) обязателен в CI.
140142* Автоформатирование проверяется отдельно (или пакетно, при форматирующем PR).
141143* Статические анализаторы и проверка типов.
142144* Структурные тесты (направление зависимостей, запрет циклов).
@@ -297,6 +299,7 @@ just start-task <task-id> title="..."
297299
298300# 4. После изменений — полная проверка
299301just check-fast
302+ just secret-scan
300303
301304# 4.1 Если задача завершена — закрой план
302305just finish-task < yyyy-mm-dd-task-id> .md
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ just test-fast # fast subset for local loop
1414just test-e2e-smoke # deterministic user-flow smoke tests
1515just test-external # external/docker integration tests
1616just arch-test # architectural guardrails
17+ just secret-scan # gitleaks secret scan
1718just check # fmt + lint + test + arch-test
1819just check-fast # lint + test-fast + arch-test
1920just metrics # local code health snapshot
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ arch-test:
6363 uv run python .linters/ check_import_boundaries.py
6464 uv run python .linters/ check_docs_contract.py
6565
66+ secret-scan :
67+ docker run --rm -v " $PWD:/repo" -w / repo zricethezav/ gitleaks:v8.24.2 detect --source=. --no-git --redact --config=.gitleaks.toml
68+
6669metrics :
6770 uv run python .linters/ metrics_snapshot.py
6871
You can’t perform that action at this time.
0 commit comments