> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Secret Scanning

> Find secrets that were committed to your code, either on your own machine or in your GitHub, GitLab, and Bitbucket repositories.

Infisical Secret Scanning helps you find credentials, such as API keys, database passwords, and tokens, that were committed to source code.

You can scan code on your own machine (or in CI) using the Infisical CLI, or connect your GitHub, GitLab, and Bitbucket repositories so that Infisical scans them and records each secret it finds.

> [!TIP]
>
> To learn how Infisical scans your secrets, check out the [Concepts](https://infisical.com/docs/documentation/platform/secret-scanning/concepts/secret-scanning.md) page.

## Scanning locally

Scan your code with the Infisical CLI before you push it:

> [card] [Scan with the CLI](https://infisical.com/docs/documentation/platform/secret-scanning/scan-locally.md)
>
> Scan a Git repository's history or a directory for leaked secrets with `infisical scan`.

> [card] [Pre-commit hook](https://infisical.com/docs/documentation/platform/secret-scanning/pre-commit-hook.md)
>
> Prevent secrets from getting committed with a pre-commit hook that runs `infisical scan`.

> [card] [Ignore findings](https://infisical.com/docs/documentation/platform/secret-scanning/ignore-findings.md)
>
> Stop `infisical scan` from reporting secrets you've decided are safe to commit.

> [card] [Configuration](https://infisical.com/docs/documentation/platform/secret-scanning/local-configuration.md)
>
> Add your own detection rules to `infisical scan` and skip secrets you've decided are safe.

## Scanning repositories

Connect your repositories to Infisical, review the secrets it finds, and configure the rules it scans with:

> [card] [GitHub](https://infisical.com/docs/documentation/platform/secret-scanning/github.md)
>
> Scan the repositories a GitHub Radar connection can access.

> [card] [GitLab](https://infisical.com/docs/documentation/platform/secret-scanning/gitlab.md)
>
> Scan one GitLab project, or the projects in a group.

> [card] [Bitbucket](https://infisical.com/docs/documentation/platform/secret-scanning/bitbucket.md)
>
> Scan the repositories in a Bitbucket workspace.

> [card] [Findings](https://infisical.com/docs/documentation/platform/secret-scanning/findings.md)
>
> Review the secrets Infisical finds in your repositories.

> [card] [Configuration](https://infisical.com/docs/documentation/platform/secret-scanning/configuration.md)
>
> Add your own detection rules and skip secrets you've decided are safe.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.