# Secret scanning and cloud storage tools

Credentials leak through public code more often than through break-ins: an API key committed to GitHub, a token left in an old branch, a storage bucket set to public. These scanners find them, in your own repositories or in the ones an organisation has published.

## 3 secret scanning and cloud storage tools compared

| Tool | What it does | Runs on | Kind |
|---|---|---|---|
| [gitleaks](https://otinstaller.com/tools/gitleaks/) | Find secrets and API keys committed to git repositories and files | Windows, macOS, Linux | passive |
| [trufflehog](https://otinstaller.com/tools/trufflehog/) | Find and verify leaked credentials in git history, files, buckets and more | Windows, macOS, Linux | passive |
| [s3scanner](https://otinstaller.com/tools/s3scanner/) | Find open S3-compatible storage buckets and list their contents | Windows, macOS, Linux | active |

```
ot install gitleaks trufflehog s3scanner
```

These are the command-line tools. For websites and search engines that do the same job, see [OSINT Framework and how ot fits with it](https://otinstaller.com/osint-framework/). New to the field? [What is OSINT?](https://otinstaller.com/what-is-osint/) covers the method and its legal limits, and [OSINT with AI agents](https://otinstaller.com/mcp/) shows how an agent can run these tools for you.

## Which secret scanning and cloud storage tool should you use?

- **gitleaks** scans a git repository's full history, or a plain directory, against a large set of secret patterns. It is fast and works offline.
- **trufflehog** goes a step further and tests the credentials it finds against the service they belong to, so you know which are still live. It also reads GitHub organisations, S3 buckets and Docker images.
- **s3scanner** checks whether S3-compatible buckets exist and are open, and lists their contents.

## Questions about secret scanning and cloud storage tools

### Should I use gitleaks or trufflehog?

Use both if you can. gitleaks is the quicker check to run on every commit. trufflehog is slower but tells you whether a leaked key still works, which decides how urgent the finding is.

### Can I scan a GitHub repository I do not own?

Reading a public repository is passive. Testing whether a credential found in it still works is not, and using it would be unauthorised access. Report what you find to the owner.

## Install ot

macOS and Linux:

```
curl -fsSL https://otinstaller.com/install.sh | sh
```

Windows (PowerShell):

```
irm https://otinstaller.com/install.ps1 | iex
```

Current version: 0.3.0. Both scripts verify the download against its [SHA-256 checksum](https://otinstaller.com/releases/v0.3.0/checksums.txt) before installing.
