---
title: "gitleaks secret scan"
description: "Runs gitleaks over the working tree (no git history) to detect hardcoded secrets, skipping dependencies and build output like the built-in auditors."
url: https://openaudit.se/auditors/code.gitleaks/
---

# gitleaks secret scan

`code.gitleaks`

Runs gitleaks over the working tree (no git history) to detect hardcoded secrets, skipping dependencies and build output like the built-in auditors.

- **Engine:** Wrapped scanner
- **Wraps:** `gitleaks`
- **Targets:** Codebase
- **Areas:** Security
- **Runs:** By default, when the target applies
- **Network:** Only the target itself

## Run only this auditor

```sh
bunx @openaudit/cli . --only code.gitleaks
```

Wraps gitleaks. When it isn't installed, the auditor is skipped with an install hint and the rest of the audit runs.

## More security auditors

- [Secrets in source](https://openaudit.se/auditors/code.secrets/) (`code.secrets`)
- [Static security analysis](https://openaudit.se/auditors/code.security/) (`code.security`)
- [Hidden Unicode](https://openaudit.se/auditors/code.unicode/) (`code.unicode`)
- [API definition and server configuration](https://openaudit.se/auditors/code.api/) (`code.api`)
- [AI agent configuration](https://openaudit.se/auditors/code.agent-config/) (`code.agent-config`)
- [Semgrep SAST](https://openaudit.se/auditors/code.semgrep/) (`code.semgrep`)
- [Trivy filesystem scan](https://openaudit.se/auditors/code.trivy-fs/) (`code.trivy-fs`)
- [trufflehog secret scan](https://openaudit.se/auditors/code.trufflehog/) (`code.trufflehog`)
