Skip to content

SH204: Secret in git history

Severity: high · Category: secrets · Applies to: all projects

Why it matters

A secret that was committed and later deleted is still readable in git history and must be treated as leaked.

How to fix

Revoke the credential. Rewrite history with git filter-repo only after rotating it.

Ignoring this rule

Skip it everywhere in devshield.yml:

ignore:
  - SH204

Or skip one line with a comment on that line or the line above:

devshield-ignore: SH204