Загрузка...

Git Never Forgets Your Secrets 🔑 #shorts #coding #security

You committed API keys to git. You reset hard. The commit is gone, the file is gone, git log is clean. But that commit is still inside your repo — every single byte.

What you're seeing:
→ Commit a file with AWS secret keys to a git repo
→ Run git reset --hard to delete the commit
→ Git log shows it's gone — clean history
→ But git reflog reveals every HEAD movement — including the "deleted" commit
→ git show recovers the exact file with your API key in plain text

Why git never forgets:
→ git reset only moves the branch pointer — the commit object stays
→ git reflog tracks every HEAD change for 90 days by default
→ Even without reflog, git fsck finds dangling/unreachable objects
→ Force push won't help — anyone who cloned already has it
→ The only real fix: rotate the secret immediately

TruffleHog:
→ Open-source secret scanner from Truffle Security
→ Crawls entire git history — deleted commits, orphaned branches, dangling objects
→ Over 800 detectors for API keys, passwords, tokens & more
→ Finds secrets you thought were gone

🔗 TruffleHog: https://github.com/trufflesecurity/trufflehog
🔗 git-filter-repo (rewrite history): https://github.com/newren/git-filter-repo
🔗 GitHub secret scanning: https://docs.github.com/en/code-security/secret-scanning

#git #secrets #security #cybersecurity #coding #shorts #trufflehog #infosec #programming #devops

Видео Git Never Forgets Your Secrets 🔑 #shorts #coding #security канала Kishore Newton
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять