noseyparker: finds secrets and sensitive information in textual data and Git history
Nosey Parker: Find secrets in textual data
Nosey Parker is a command-line tool that finds secrets and sensitive information in textual data. It is useful both for offensive and defensive security testing.
Key features:
- It supports scanning files, directories, and the entire history of Git repositories
- It uses regular expression matching with a set of 60 patterns chosen for high signal-to-noise based on experience and feedback from offensive security engagements
- It groups matches together that share the same secret, further emphasizing signal over noise
- It is fast: it can scan at hundreds of megabytes per second on a single core and is able to scan 100GB of Linux kernel source history in less than 5 minutes on an older MacBook Pro
This open-source version of Nosey Parker is a reimplementation of part of the internal version in use at Praetorian, which has additional machine-learning capabilities. Read more in blog posts here and here.
Usage quick start

The datastore
Most Nosey Parker commands use a datastore. This is a special directory that Nosey Parker uses to record its findings and maintain its internal state. A datastore will be implicitly created by the scan command if needed. You can also create a datastore explicitly using the datastore init -d PATH command.
Scanning filesystem content for secrets
Nosey Parker has built-in support for scanning files, recursively scanning directories, and scanning the entire history of Git repositories.
For example, if you have a Git clone of CPython locally at cpython.git, you can scan its entire history with the scan command. Nosey Parker will create a new datastore at np.cpython and saves its findings there.
[pastacode lang=”markup” message=”” highlight=”” provider=”manual” manual=”%24%20noseyparker%20scan%20–datastore%20np.cpython%20cpython.git%0AFound%2028.30%20GiB%20from%2018%20plain%20files%20and%20427%2C712%20blobs%20from%201%20Git%20repos%20%5B00%3A00%3A04%5D%0AScanning%20content%20%20%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%E2%96%88%20100%25%20%2028.30%20GiB%2F28.30%20GiB%20%20%5B00%3A00%3A53%5D%0AScanned%2028.30%20GiB%20from%20427%2C730%20blobs%20in%2054%20seconds%20(538.46%20MiB%2Fs)%3B%204%2C904%2F4%2C904%20new%20matches%0A%0A%20Rule%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Distinct%20Groups%20%20%20Total%20Matches%0A%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%0A%20PEM-Encoded%20Private%20Key%20%20%20%20%20%20%20%20%20%20%20%20%201%2C076%20%20%20%20%20%20%20%20%20%20%201%2C192%0A%20Generic%20Secret%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20331%20%20%20%20%20%20%20%20%20%20%20%20%20478%0A%20netrc%20Credentials%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2042%20%20%20%20%20%20%20%20%20%20%203%2C201%0A%20Generic%20API%20Key%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%202%20%20%20%20%20%20%20%20%20%20%20%20%20%2031%0A%20md5crypt%20Hash%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201%20%20%20%20%20%20%20%20%20%20%20%20%20%20%202%0A%0ARun%20the%20%60report%60%20command%20next%20to%20show%20finding%20details.”/]
You can specify multiple inputs to scan at once in any combination of the supported input types (files, directories, and Git repos).
Summarizing findings
Nosey Parker prints out a summary of its findings when it finishes scanning. You can also run this step separately:
[pastacode lang=”markup” message=”” highlight=”” provider=”manual” manual=”%24%20noseyparker%20summarize%20–datastore%20np.cpython%0A%0A%20Rule%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Distinct%20Groups%20%20%20Total%20Matches%0A%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%E2%94%80%0A%20PEM-Encoded%20Private%20Key%20%20%20%20%20%20%20%20%20%20%20%20%201%2C076%20%20%20%20%20%20%20%20%20%20%201%2C192%0A%20Generic%20Secret%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20331%20%20%20%20%20%20%20%20%20%20%20%20%20478%0A%20netrc%20Credentials%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2042%20%20%20%20%20%20%20%20%20%20%203%2C201%0A%20Generic%20API%20Key%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%202%20%20%20%20%20%20%20%20%20%20%20%20%20%2031%0A%20md5crypt%20Hash%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201%20%20%20%20%20%20%20%20%20%20%20%20%20%20%202″/]
Reporting detailed findings
To see details of Nosey Parker’s findings, use the report command. This prints out a text-based report designed for human consumption:
[pastacode lang=”markup” message=”” highlight=”” provider=”manual” manual=”%24%20noseyparker%20report%20–datastore%20np.cpython%0AFinding%201%2F1452%3A%20Generic%20API%20Key%0AMatch%3A%20QTP4LAknlFml0NuPAbCdtvH4KQaokiQE%0AShowing%203%2F29%20occurrences%3A%0A%0A%20%20%20%20Occurrence%201%3A%0A%20%20%20%20Git%20repo%3A%20clones%2Fcpython.git%0A%20%20%20%20Blob%3A%2004144ceb957f550327637878dd99bb4734282d07%0A%20%20%20%20Lines%3A%2070%3A61-70%3A100%0A%0A%20%20%20%20%20%20%20%20e%20buildbottest%0A%0A%20%20%20%20%20%20%20%20notifications%3A%0A%20%20%20%20%20%20%20%20%20%20email%3A%20false%0A%20%20%20%20%20%20%20%20%20%20webhooks%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20urls%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-%20https%3A%2F%2Fpython.zulipchat.com%2Fapi%2Fv1%2Fexternal%2Ftravis%3Fapi_key%3DQTP4LAknlFml0NuPAbCdtvH4KQaokiQE%26stream%3Dcore%252Ftest%2Bruns%0A%20%20%20%20%20%20%20%20%20%20%20%20on_success%3A%20change%0A%20%20%20%20%20%20%20%20%20%20%20%20on_failure%3A%20always%0A%20%20%20%20%20%20%20%20%20%20irc%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20channels%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20This%20is%20set%20to%20a%20secure%20vari%0A%0A%20%20%20%20Occurrence%202%3A%0A%20%20%20%20Git%20repo%3A%20clones%2Fcpython.git%0A%20%20%20%20Blob%3A%200e24bae141ae2b48b23ef479a5398089847200b3%0A%20%20%20%20Lines%3A%20174%3A61-174%3A100%0A%0A%20%20%20%20%20%20%20%20j4%20-uall%2C-cpu%22%0A%0A%20%20%20%20%20%20%20%20notifications%3A%0A%20%20%20%20%20%20%20%20%20%20email%3A%20false%0A%20%20%20%20%20%20%20%20%20%20webhooks%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20urls%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-%20https%3A%2F%2Fpython.zulipchat.com%2Fapi%2Fv1%2Fexternal%2Ftravis%3Fapi_key%3DQTP4LAknlFml0NuPAbCdtvH4KQaokiQE%26stream%3Dcore%252Ftest%2Bruns%0A%20%20%20%20%20%20%20%20%20%20%20%20on_success%3A%20change%0A%20%20%20%20%20%20%20%20%20%20%20%20on_failure%3A%20always%0A%20%20%20%20%20%20%20%20%20%20irc%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20channels%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20This%20is%20set%20to%20a%20secure%20vari%0A…”/]
Install
Copyright (C) 2022 praetorian-inc
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.