"Lemon Grove's dev team has a public GitHub repo for their storefront. They're pretty confident there's nothing sensitive in it - after all, they cleaned up their commits before making it public."
No handout at all - the first job is finding the repo.
Hint
"Cleaning up commits" usually means rewriting one branch. It rarely means deleting the branch you rewrote from.
Finding the repo
gh wasn't installed, so the public GitHub search API does the job:
1curl -s "https://api.github.com/search/repositories?q=lemon-grove-storefront"
One match: lilo-and-stitch-blues/lemon-grove-storefront, owned by an
account created a few weeks before the event with exactly one public
repo - the challenge itself.
A clean history, on purpose
main's history looks genuinely clean:
6120158 Wire up product loading in entrypoint
867b908 Document CI in README
4cf360b Configure CI and add .gitattributes <- squashed/cleaned version
d6938e4 Add checkout flow
f9b9a54 Add product listing module
583a485 Initial commit: scaffold storefront
Insight
git clone fetches every remote ref, not just the default branch.
git branch -a / git ls-remote on this repo show the remote still
advertises an unmerged branch, feature/ci-and-config, whose commits
were squashed into the clean main history but never deleted from the
remote:
24f83cd Add .gitattributes for line-ending normalization <- leak
219a33b WIP: add CI workflow
The developer rewrote main to look clean and assumed that was
equivalent to deleting the messy work - it isn't. The old branch, and
every object it points to, is still sitting on the remote and still one
git fetch away.
Diffing the two versions of .gitattributes shows exactly what the
"cleanup" quietly removed:
* text=auto eol=lf
*.png binary
*.jpg binary
* text=auto eol=lf
*.png binary
*.jpg binary
# staging webhook debug token, remove before merge: TDNtMG57NGMzZjEyYWE2OGRjOGViZDhkMDNjZDg4N2RmM2U4MGV9
1import base64
2print(base64.b64decode("TDNtMG57NGMzZjEyYWE2OGRjOGViZDhkMDNjZDg4N2RmM2U4MGV9").decode())
3# L3m0n{4c3f12aa68dc8ebd8d03cd887df3e80e}
Note
Checked exhaustively before trusting it as the only answer: git fsck --full --unreachable --dangling --lost-found comes back empty (the
secret is reachable through the stale branch, not a dangling orphan
blob), the remote has exactly two refs (main and the feature branch, no
tags, no stray PR refs), and dumping every one of the repo's 12 blobs
finds the token string in exactly one of them - no other candidate flag
or base64 token exists anywhere in the object store.
Pitfall
"Squashing" or rewriting a branch to hide what's in it only works if the
old branch (and anyone's clone of it) actually gets deleted. As long as
the pre-cleanup branch exists on the remote - even unmerged, even never
linked from the README - git clone happily fetches it along with
everything else.