Reconnaissance and Enumeration

A tester has read access to a client's Git repository. Developers say they deleted hardcoded passwords in later commits. Which approach BEST finds those passwords?

Show the answer

Correct answerD. Scan the full commit history with a secrets scanner such as TruffleHog

AWhy not this: Nmap scripts check services for vulnerabilities and do not read repository history.

BWhy not this: Waiting on one push captures only new data and not what is already stored in past commits.

CWhy not this: The working tree shows only current files, so passwords removed in later commits are missed.

DWhy this is right: Scanners such as TruffleHog inspect every past commit, where removed passwords still exist.

Deleted secrets remain in earlier commits, so a secrets scanner that walks the entire history can recover them. Searching the working tree only covers current files, where the passwords were already removed.