A compose override that only exists in history
The working tree has no secrets, but a deleted docker-compose.override.yml did. Use git show with a commit and path to read the file as it was and judge what it exposed.
What you’re looking at
The working tree has no secrets, but a deleted docker-compose.override.yml did. Use git show with a commit and path to read the file as it was and judge what it exposed.
Your goal: Read a deleted file from history and judge what it exposed.
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.
Briefing
inventory-api is about to be open-sourced. The current tree passes the secret scan, but legal wants to know whether anything sensitive is in the history.
git log --stat lists files each commit touched, including deleted ones. git show <sha>:<path> prints a file exactly as it was in that commit, even if it is gone now.
dev-laptop · Secrets in Git
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
The whole walkthrough
Every step in order, written to be read aloud: 292 words, about 2 min. It gives away every answer, so try the steps first.