chore(seguridad): prevención de secretos en un repo público
gitleaks / gitleaks (push) Canceled after 0s

- .gitignore: .claude/settings.local.json (ahí van las claves), .env, *.pem, *.key
- .githooks/pre-push: bloquea el push si lo que sube contiene claves (gitleaks
  si está instalado; si no, grep de los formatos más comunes). Activar con
  git config core.hooksPath .githooks
- .gitea/workflows/gitleaks.yml: escaneo en cada push y pull request
- CLAUDE.md: regla 14, el repo es público y las claves nunca se versionan

Motivo: en 2026-03 se subió una clave de API en .claude/settings.json. Ya está
revocada y el historial reescrito para quitarla.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HPL66q9F33YZxbLPUT7KW8
This commit is contained in:
Jordan Diaz
2026-09-11 15:20:12 +00:00
co-authored by Claude Fable 5.1
parent ac6c8e1fbd
commit 05d4be1af0
4 changed files with 91 additions and 0 deletions
+1
View File
@@ -129,6 +129,7 @@ Do NOT modify web-base files — they are shared across all projects.
11. Twig concatenation uses `~` operator: `'value=' ~ variable`
12. `enlace` (link) fields already include slashes — **NEVER modify an existing enlace** unless explicitly asked
13. **NEVER modify the `controlador` field** of existing records — it defines whether a page is Builder or Standard
14. **This repository is PUBLIC. NEVER commit secrets** (API keys, `ANTHROPIC_*` tokens, passwords). Local Claude Code config with credentials goes in `.claude/settings.local.json` (git-ignored), never in `.claude/settings.json`. Enable the secret-scanning hook once per clone: `git config core.hooksPath .githooks`. A leaked key stays in git history even after deleting it: rotate it immediately.
## MCP Tools