chore(claude-config): secret-read + psycopg2 hooks, tradein.md rule, tradein-mvp globs #1975
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1975
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "chore/claude-config-hooks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
P0+P1 из config-аудита (2026-06-27). Non-guard файлы (скрипты + rules) → self-merge.
P0 security hooks (
scripts/claude-hooks/):check-secret-read.py— PreToolUse(Bash) guard. Блокирует чтение/передачу секрет-файлов (.env*,.pgpass, ssh-ключи) черезcat/type/Get-Content/base64/curl -F @file/< redirect. Закрывает дыру: blanketBash(*)обходитRead(./.env*)deny →cat backend/.envсливал prod DB-пароли + FORGEJO/GLITCHTIP токены без prompt. Allow:.env.example/templates,ls/stat. Протестирован 12/12 (6 block / 6 allow).check-sql-pitfalls.py— PostToolUse(Edit|Write|MultiEdit). Блокируетimport psycopg2вbackend/**+tradein-mvp/backend/**.py(psycopg v3, recurring bug). Cast-trap:p::typeнамеренно НЕ чекаем — FP на десятках comment/test-docstring которые документируют анти-паттерн (уже покрыт тестами). Протестирован 7/7.session-preflight.py— SessionStart. Печатает статусFORGEJO_ACCESS_TOKEN/OBSIDIAN_API_KEY/ db-tunnel(:15432) — ловит session-setup фейлы (tunnel-down, missing token) до начала работы.P1
.claude/rules/tradein.md(НОВОЕ, pathstradein-mvp/**): закрывает coverage-дыру — самый активный subtree (tradein-mvp/, 124 SQL-файла) не матчился ни одним path-rule. Содержит: 2 БД (postgres-tradein vs gendesign),:8000-туннель = gendesign не tradein (тест толькоdocker exec tradein-backend), scheduler вtradein-scraper, strict SQL auto-apply + NN-коллизии (108_*×2), rapid-merge trap.P1 globs:
backend.md/sql.md/frontend.mdpaths:расширены наtradein-mvp/**— backend/sql/frontend конвенции теперь авто-грузятся в trade-in.Wiring
Хуки активируются через
.claude/settings.jsonhooks(PreToolUse/PostToolUse/SessionStart) — это gitignored-local, делается отдельно (вне PR).Test plan