Skip to content

Detection par la forme : retrait de la deny-list en clair - #1

Merged
Statyx merged 1 commit into
mainfrom
statyx-retrait-deny-list
Aug 3, 2026
Merged

Statyx merged 1 commit into
mainfrom
statyx-retrait-deny-list

Conversation

@Statyx

@Statyx Statyx commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Remplace la deny-list de noms en clair par une detection par la forme.

Pourquoi

Le garde-fou anti-fuite embarquait la liste des noms a proteger, en clair, dans un fichier
suivi par git. Sur un depot public, cela publie exactement ce qu'il devait masquer.

Ce qui change

  • La liste en clair est supprimee. Les noms se lisent depuis la variable d'environnement
    CLIENT_DENYLIST (secret GitHub Actions) ou un fichier .clientdeny gitignore.
  • Secret absent -> avertissement, jamais echec. Un job rouge des le premier jour finit desactive.
  • Le scanner detecte desormais par la forme : GUID hors allowlist, endpoint SQL Fabric,
    chemin utilisateur personnel. Une regle morphologique ne peut pas redevenir une fuite.
  • Le message d'erreur ne reimprime plus la valeur trouvee : les logs d'Action sont publics.
  • .gitattributes fixe eol=lf sur le scanner partage, sinon un checkout Windows
    reecrit le fichier en CRLF et invalide son empreinte publiee.

Verifications

  • Aucun nom client dans le contenu ni dans les messages de commit, sur tous les commits de la branche.
  • Fixtures de test : valeurs inventees uniquement, jamais de donnee reelle.
  • Clone frais + venv vierge : les deux jobs verts.

The tool meant to prevent a client name from leaking had become the leak:
.github/scripts/check_client_leak.py listed the whole client portfolio in
plaintext, in a public repository. Self-exemption fixed self-detection, not
exposure.

- scripts/check_no_client_leak.py: byte-identical copy of the frozen canonical
  scanner (Fab-Analyze-Data-Agent@6e4a65e, 4023 bytes). Never edited; every
  adaptation is applied from the wrapper.
- .gitattributes pins that one file to LF so core.autocrlf cannot silently
  break the published checksum on a Windows checkout.
- scripts/check_repo_leaks.py: CI entry point. Re-allows this repo structural
  GUID placeholders at runtime, and restores name detection from the
  CLIENT_DENYLIST secret (or a gitignored .clientdeny). No secret means a
  warning and success, never a failure. Findings report file:line only, since
  a public repo Actions log would otherwise re-publish what it is guarding.
- Colour tolerance is generalised to any entry and recognised by shape (CSS
  declaration, hex code, badge URL) instead of hardcoding a name to exempt it.
- tests/test_leak_scanner.py: 17 tests. Every fixture is assembled at runtime
  from opaque sentinels; no real GUID, endpoint or name is ever written down.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Statyx
Statyx merged commit d74c42e into main Aug 3, 2026
4 checks passed
@Statyx
Statyx deleted the statyx-retrait-deny-list branch August 3, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant