ioncipher

Guide · updated Nov 30, 2026

Remove a secret from git history.

Rewriting history hides the key from new clones; only rotating it makes it useless, so rotate first.

highlights · fix ready

Move @xmldom/xmldom to 0.8.15.

15 advisoriesbuild tools only

- "@xmldom/xmldom": "0.7.13"

+ "@xmldom/xmldom": "0.8.15"

  • Verify passedinstall, build, 212 tests · 41 s
  • Rescan cleanall 15 advisories gone
  • Blast radiusbuild tools only, nothing in the app
Approve and mergeMerged · PR #318
Sample data

Step by step

  1. Rotate the key

    Revoke it at the provider and issue a new one. Anyone who cloned or forked the repo still has the old commits.

  2. Find every commit that holds it

    Scan the whole history, not just the latest tree.

    gitleaks git -v .
  3. Write a replacements file

    One line per secret: the literal value, then what to put in its place.

    echo 'sk_live_abc123==>REMOVED' > replacements.txt
  4. Rewrite history

    git filter-repo rewrites every commit on every branch. Drop a whole file with --invert-paths instead.

    git filter-repo --replace-text replacements.txt
    # or: git filter-repo --invert-paths --path .env
  5. Force-push branches and tags

    filter-repo removes the origin remote as a safety catch: add it back, then push.

    git remote add origin git@github.com:acme/web.git
    git push --force --all && git push --force --tags
  6. Ask GitHub to drop cached views

    Old commits stay reachable from pull request refs and caches until GitHub Support removes them. Forks keep their own copies.

  7. Stop the next one

    Ignore the file, re-clone everywhere, and turn on secret scanning push protection or a Gitleaks pre-commit hook.

    echo '.env' >> .gitignore

Or let IonCipher do it.

IonCipher checks the whole history once, names each key and where it's used, and hands the rotation steps to you or your coding agent.

Your first fix, on your phone tonight.

Connect GitHub; the first scan of every repo finishes in minutes.