chore(security): .gitignore + .gitleaks.toml защита от CMS-export leak
All checks were successful
deploy / deploy (push) Successful in 57s
security / security (push) Successful in 3m2s

Превентивная защита от случайной публикации content/logs, content/data, ghost.*.json (см. инцидент moovg_ru 2026-05-24).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dmitry Gusev
2026-05-24 20:09:31 +03:00
parent 4425bdc516
commit 8bff4ac086
2 changed files with 20 additions and 2 deletions

11
.gitignore vendored
View File

@@ -1,3 +1,13 @@
# Security: НЕ коммитить production logs и CMS data exports
# (могут содержать API keys, JWT, private_key). См. инцидент 2026-05-24.
content/logs/
content/data/
*.production.log
*.production.log.*
ghost.json
ghost.*.json
*.ghost.*.json
# ---> Node # ---> Node
# Logs # Logs
logs logs
@@ -135,4 +145,3 @@ dist
.yarn/build-state.yml .yarn/build-state.yml
.yarn/install-state.gz .yarn/install-state.gz
.pnp.* .pnp.*

View File

@@ -29,6 +29,15 @@ paths = [
'''.*\.min\.(js|css)$''', '''.*\.min\.(js|css)$''',
'''dist/.*''', '''dist/.*''',
'''build/.*''', '''build/.*''',
# Защита на случай возврата CMS exports / production logs в репо
# (см. инцидент 2026-05-24 с Ghost ghost_private_key + members_private_key).
# Сами файлы УЖЕ удалены из history через git filter-repo, allowlist —
# дополнительная защита для будущих commit'ов.
'''content/logs/.*''',
'''content/data/.*''',
'''.*\.production\.log(\.[0-9]+)?$''',
'''.*\.ghost\..*\.json$''',
] ]
# Конкретные паттерны, которые false-positive # Конкретные паттерны, которые false-positive