☆ 3 r/security ·by Zoe ·2026-11-05 I committed a .env with real API keys by mistake 861 views The repo is private but two teammates have access. The file has been in history for three weeks. What is the correct order of operations? ⧉ Copy link⚑ Report
☆ 0 D Dan H. ·2026-11-05#1 Rotate every key first. Assume it is compromised, even in a private repo. Then remove the file and rewrite history. ⧉ Copy link⚑ Report
☆ 0 H Hana ·2026-11-06#3 No. Existing clones still have it. Rotation is the only step that truly fixes the problem. History rewrite is cleanup after that. ⧉ Copy link⚑ Report
3 replies