2025-06-24 17:17:16 -07:00
# Kingfisher
<p align="center">
<img src="docs/kingfisher_logo.png" alt="Kingfisher Logo" width="126" height="173" style="vertical-align: right;" />
2025-10-22 17:00:15 -07:00
[](https://opensource.org/licenses/Apache-2.0)<br>
2025-10-31 16:32:35 -07:00
[](https://github.com/mongodb/kingfisher/pkgs/container/kingfisher)<br>
2025-10-22 17:00:15 -07:00
2025-10-31 16:21:23 -07:00
Kingfisher is a blazingly fast secret-scanning and **live validation ** tool built in Rust.
2025-06-24 17:17:16 -07:00
2025-10-31 16:34:09 -07:00
It combines Intel’ s SIMD-accelerated regex engine (Hyperscan) with language-aware parsing to achieve high accuracy at massive scale, and **ships with hundreds of built-in rules ** to detect, **validate ** , and triage secrets before they ever reach production.
2025-10-31 16:21:23 -07:00
For a look at how Kingfisher has grown from its early foundations into today's full-featured scanner, see [Lineage and Evolution ](#lineage-and-evolution ).
2025-06-24 17:17:16 -07:00
2025-10-31 16:21:23 -07:00
</p>
2025-10-15 22:47:40 -07:00
2025-06-24 17:17:16 -07:00
## Key Features
2025-09-23 16:23:12 -07:00
2025-10-05 16:37:15 -07:00
### Multiple Scan Targets
2025-10-05 16:38:10 -07:00
<div align="center">
2025-10-05 16:37:15 -07:00
2025-10-15 22:47:40 -07:00
| Files / Dirs | Local Git | GitHub | GitLab | Azure Repos | Bitbucket | Gitea | Hugging Face |
|:-------------:|:----------:|:------:|:------:|:-------------:|:----------:|:------:|:-------------:|
| <img src="./docs/assets/icons/files.svg" height="40" alt="Files / Dirs"/><br/><sub>Files / Dirs</sub> | <img src="./docs/assets/icons/local-git.svg" height="40" alt="Local Git"/><br/><sub>Local Git</sub> | <img src="./docs/assets/icons/github.svg" height="40" alt="GitHub"/><br/><sub>GitHub</sub> | <img src="./docs/assets/icons/gitlab.svg" height="40" alt="GitLab"/><br/><sub>GitLab</sub> | <img src="./docs/assets/icons/azure-devops.svg" height="40" alt="Azure Repos"/><br/><sub>Azure Repos</sub> | <img src="./docs/assets/icons/bitbucket.svg" height="40" alt="Bitbucket"/><br/><sub>Bitbucket</sub> | <img src="./docs/assets/icons/gitea.svg" height="40" alt="Gitea"/><br/><sub>Gitea</sub> |<img src="./docs/assets/icons/huggingface.svg" height="40" width="40" alt="Hugging Face"/><br/><sub>Hugging Face</sub> |
2025-10-05 16:37:15 -07:00
2025-10-15 22:47:40 -07:00
| Docker | Jira | Confluence | Slack | AWS S3 | Google Cloud |
|:------:|:----:|:-----------:|:-----:|:------:|:---:|
| <img src="./docs/assets/icons/docker.svg" height="40" alt="Docker"/><br/><sub>Docker</sub> | <img src="./docs/assets/icons/jira.svg" height="40" alt="Jira"/><br/><sub>Jira</sub> | <img src="./docs/assets/icons/confluence.svg" height="40" alt="Confluence"/><br/><sub>Confluence</sub> | <img src="./docs/assets/icons/slack.svg" height="40" alt="Slack"/><br/><sub>Slack</sub> | <img src="./docs/assets/icons/aws-s3.svg" height="40" alt="AWS S3"/><br/><sub>AWS S3</sub> | <img src="./docs/assets/icons/gcs.svg" height="40" alt="Google Cloud Storage"/><br/><sub>Cloud Storage</sub> |
2025-09-23 16:18:44 -07:00
2025-10-05 16:38:10 -07:00
</div>
2025-10-05 16:37:15 -07:00
### Performance, Accuracy, and Hundreds of Rules
2025-07-29 19:51:02 -07:00
- **Performance**: multithreaded, Hyperscan‑ powered scanning built for huge codebases
- **Extensible rules**: hundreds of built-in detectors plus YAML-defined custom rules ([docs/RULES.md ](/docs/RULES.md ))
2025-12-17 11:57:35 -08:00
- **Blast Radius Mapping**: instantly map leaked keys to their effective cloud identities and exposed resources with `--access-map`
- **Broad AI SaaS coverage**: finds and validates tokens for OpenAI, Anthropic, Google Gemini, Cohere, AWS Bedrock, Voyage AI, Mistral, Stability AI, Replicate, xAI (Grok), Ollama, Langchain, Perplexity, Weights & Biases, Cerebras, Friendli, Fireworks.ai, NVIDIA NIM, Together.ai, Zhipu, and many more
2025-08-06 19:15:50 -07:00
- **Compressed Files**: Supports extracting and scanning compressed files for secrets
2025-08-30 20:02:53 -07:00
- **Baseline management**: generate and track baselines to suppress known secrets ([docs/BASELINE.md ](/docs/BASELINE.md ))
2025-11-09 08:42:16 -08:00
- **Checksum-aware detection**: verifies tokens with built-in checksums (e.g., GitHub, Confluent, Zuplo) — no API calls required
2025-12-17 11:57:35 -08:00
- **Built-in Report Viewer**: Visualize and triage findings locally with `kingisher view ./report-file.json`
2025-06-24 17:17:16 -07:00
2025-07-29 19:51:02 -07:00
**Learn more:** [Introducing Kingfisher: Real‑ Time Secret Detection and Validation ](https://www.mongodb.com/blog/post/product-release-announcements/introducing-kingfisher-real-time-secret-detection-validation )
2025-06-24 17:17:16 -07:00
2025-07-29 20:54:22 -07:00
# Benchmark Results
See ([docs/COMPARISON.md ](docs/COMPARISON.md ))
<p align="center">
<img src="docs/runtime-comparison.png" alt="Kingfisher Runtime Comparison" style="vertical-align: center;" />
</p>
2025-12-16 21:13:00 -08:00
## Basic Usage Demo

## Report Viewer Demo
Explore Kingfisher’ s built-in report viewer and its `--access-map` feature for visualizing access relationships: [Access map outputs and viewer ](#access-map-outputs-and-viewer )

2025-10-15 22:47:40 -07:00
# Table of Contents
<details>
2025-09-05 07:54:50 -07:00
- [Kingfisher ](#kingfisher )
- [Key Features ](#key-features )
2025-10-05 16:37:15 -07:00
- [Multiple Scan Targets ](#multiple-scan-targets )
- [Performance, Accuracy, and Hundreds of Rules ](#performance-accuracy-and-hundreds-of-rules )
2025-09-05 07:54:50 -07:00
- [Benchmark Results ](#benchmark-results )
2025-12-16 21:13:00 -08:00
- [Basic Usage Demo ](#basic-usage-demo )
- [Report Viewer Demo ](#report-viewer-demo )
2025-10-15 22:47:40 -07:00
- [Table of Contents ](#table-of-contents )
2025-09-05 07:54:50 -07:00
- [Getting Started ](#getting-started )
- [Installation ](#installation )
2025-10-15 22:47:40 -07:00
- [Pre-built Releases ](#pre-built-releases )
- [Homebrew ](#homebrew )
- [Linux and macOS ](#linux-and-macos )
- [Windows ](#windows )
2025-12-09 12:56:55 -08:00
- [Pre-commit hooks ](#pre-commit-hooks )
- [macOS and Linux ](#macos-and-linux )
- [Windows PowerShell ](#windows-powershell )
- [Using the `pre-commit` framework ](#using-the-pre-commit-framework )
2025-10-15 22:47:40 -07:00
- [Compile ](#compile )
- [ Run Kingfisher in Docker ](#-run-kingfisher-in-docker )
2025-09-05 07:54:50 -07:00
- [🔐 Detection Rules at a Glance ](#-detection-rules-at-a-glance )
2025-10-15 22:47:40 -07:00
- [📝 Write Custom Rules! ](#-write-custom-rules )
2025-11-06 16:22:35 -08:00
- [Pattern requirements and placeholder filtering ](#pattern-requirements-and-placeholder-filtering )
2025-11-09 08:42:16 -08:00
- [🔍 Checksum Intelligence (New!) ](#-checksum-intelligence-new )
2025-10-15 22:47:40 -07:00
- [🎉 Usage ](#-usage )
2025-09-05 07:54:50 -07:00
- [Basic Examples ](#basic-examples )
- [Scan with secret validation ](#scan-with-secret-validation )
- [Scan a directory containing multiple Git repositories ](#scan-a-directory-containing-multiple-git-repositories )
- [Scan a Git repository without validation ](#scan-a-git-repository-without-validation )
- [Display only secrets confirmed active by third‑ party APIs ](#display-only-secrets-confirmed-active-by-thirdparty-apis )
- [Output JSON and capture to a file ](#output-json-and-capture-to-a-file )
- [Output SARIF directly to disk ](#output-sarif-directly-to-disk )
2025-12-05 16:06:02 -08:00
- [Access map outputs and viewer ](#access-map-outputs-and-viewer )
2025-12-05 21:57:20 -08:00
- [View access-map reports locally ](#view-access-map-reports-locally )
2025-09-05 07:54:50 -07:00
- [Pipe any text directly into Kingfisher by passing `-` ](#pipe-any-text-directly-into-kingfisher-by-passing-- )
- [Limit maximum file size scanned (`--max-file-size`) ](#limit-maximum-file-size-scanned---max-file-size )
- [Scan using a rule _family_ with one flag ](#scan-using-a-rule-family-with-one-flag )
- [Display rule performance statistics ](#display-rule-performance-statistics )
- [Scan while ignoring likely test files ](#scan-while-ignoring-likely-test-files )
- [Exclude specific paths ](#exclude-specific-paths )
2025-09-16 14:20:43 -07:00
- [Scan changes in CI pipelines ](#scan-changes-in-ci-pipelines )
2025-10-05 16:58:50 -07:00
- [ Scanning an AWS S3 Bucket ](#-scanning-an-aws-s3-bucket )
2025-10-15 22:47:40 -07:00
- [ Scanning a Google Cloud Storage Bucket ](#-scanning-a-google-cloud-storage-bucket )
2025-10-05 16:58:50 -07:00
- [ Scanning Docker Images ](#-scanning-docker-images )
- [ Scanning GitHub ](#-scanning-github )
- [Scan GitHub organization (requires `KF_GITHUB_TOKEN`) ](#scan-github-organization-requires-kf_github_token )
2025-09-15 21:26:51 -07:00
- [Skip specific GitHub repositories during enumeration ](#skip-specific-github-repositories-during-enumeration )
2025-09-05 07:54:50 -07:00
- [Scan remote GitHub repository ](#scan-remote-github-repository )
2025-10-05 16:58:50 -07:00
- [ Scanning GitLab ](#-scanning-gitlab )
2025-09-05 07:54:50 -07:00
- [Scan GitLab group (requires `KF_GITLAB_TOKEN`) ](#scan-gitlab-group-requires-kf_gitlab_token )
- [Scan GitLab user ](#scan-gitlab-user )
2025-09-15 21:26:51 -07:00
- [Skip specific GitLab projects during enumeration ](#skip-specific-gitlab-projects-during-enumeration )
2025-09-05 07:54:50 -07:00
- [Scan remote GitLab repository by URL ](#scan-remote-gitlab-repository-by-url )
- [List GitLab repositories ](#list-gitlab-repositories )
2025-10-05 16:58:50 -07:00
- [ Scanning Azure Repos ](#-scanning-azure-repos )
2025-10-15 22:47:40 -07:00
- [Scan Azure Repos organization or collection (requires `KF_AZURE_TOKEN` or `KF_AZURE_PAT`) ](#scan-azure-repos-organization-or-collection-requires-kf_azure_token-or-kf_azure_pat )
- [Scan specific Azure Repos projects ](#scan-specific-azure-repos-projects )
2025-10-05 16:37:15 -07:00
- [Skip specific Azure repositories during enumeration ](#skip-specific-azure-repositories-during-enumeration )
- [List Azure repositories ](#list-azure-repositories )
2025-10-05 16:58:50 -07:00
- [ Scanning Gitea ](#-scanning-gitea )
2025-09-23 13:07:45 -07:00
- [Scan Gitea organization (requires `KF_GITEA_TOKEN`) ](#scan-gitea-organization-requires-kf_gitea_token )
- [Scan Gitea user ](#scan-gitea-user )
- [Skip specific Gitea repositories during enumeration ](#skip-specific-gitea-repositories-during-enumeration )
- [Scan remote Gitea repository by URL ](#scan-remote-gitea-repository-by-url )
- [List Gitea repositories ](#list-gitea-repositories )
2025-10-05 16:58:50 -07:00
- [ Scanning Bitbucket ](#-scanning-bitbucket )
2025-09-22 18:21:03 -07:00
- [Scan Bitbucket workspace ](#scan-bitbucket-workspace )
- [Scan Bitbucket user ](#scan-bitbucket-user )
- [Skip specific Bitbucket repositories during enumeration ](#skip-specific-bitbucket-repositories-during-enumeration )
- [Scan remote Bitbucket repository by URL ](#scan-remote-bitbucket-repository-by-url )
- [List Bitbucket repositories ](#list-bitbucket-repositories )
- [Authenticate to Bitbucket ](#authenticate-to-bitbucket )
- [Self-hosted Bitbucket Server ](#self-hosted-bitbucket-server )
2025-10-15 22:47:40 -07:00
- [ Scanning Hugging Face ](#-scanning-hugging-face )
- [Scan Hugging Face user ](#scan-hugging-face-user )
- [Scan Hugging Face organization ](#scan-hugging-face-organization )
- [Scan specific Hugging Face resources ](#scan-specific-hugging-face-resources )
- [List Hugging Face repositories ](#list-hugging-face-repositories )
- [Authenticate to Hugging Face ](#authenticate-to-hugging-face )
2025-10-05 16:58:50 -07:00
- [ Scanning Jira ](#-scanning-jira )
2025-09-05 07:54:50 -07:00
- [Scan Jira issues matching a JQL query ](#scan-jira-issues-matching-a-jql-query )
- [Scan the last 1,000 Jira issues: ](#scan-the-last-1000-jira-issues )
2025-10-05 16:58:50 -07:00
- [ Scanning Confluence ](#-scanning-confluence )
2025-09-05 07:54:50 -07:00
- [Scan Confluence pages matching a CQL query ](#scan-confluence-pages-matching-a-cql-query )
2025-10-05 16:58:50 -07:00
- [ Scanning Slack ](#-scanning-slack )
2025-09-05 07:54:50 -07:00
- [Scan Slack messages matching a search query ](#scan-slack-messages-matching-a-search-query )
- [Environment Variables for Tokens ](#environment-variables-for-tokens )
- [Exit Codes ](#exit-codes )
- [Update Checks ](#update-checks )
2025-10-15 22:47:40 -07:00
- [🤓 Advanced Options ](#-advanced-options )
2025-09-05 07:54:50 -07:00
- [Build a Baseline / Detect New Secrets ](#build-a-baseline--detect-new-secrets )
- [List Builtin Rules ](#list-builtin-rules )
- [To scan using **only** your own `my_rules.yaml` you could run: ](#to-scan-using-only-your-own-my_rulesyaml-you-could-run )
- [To add your rules alongside the built‑ ins: ](#to-add-your-rules-alongside-the-builtins )
- [Other Examples ](#other-examples )
2025-09-18 14:11:54 -07:00
- [Customize the HTTP User-Agent ](#customize-the-http-user-agent )
2025-09-05 07:54:50 -07:00
- [Notable Scan Options ](#notable-scan-options )
- [Understanding `--confidence` ](#understanding---confidence )
- [Ignore known false positives ](#ignore-known-false-positives )
2025-10-16 10:50:07 -07:00
- [Skip Canary Tokens (AWS) ](#skip-canary-tokens-aws )
2025-10-15 22:47:40 -07:00
- [Common CLI flows ](#common-cli-flows )
2025-10-09 20:53:17 -07:00
- [Inline ignore directives ](#inline-ignore-directives )
2025-09-05 07:54:50 -07:00
- [Finding Fingerprint ](#finding-fingerprint )
- [Rule Performance Profiling ](#rule-performance-profiling )
- [CLI Options ](#cli-options )
2025-10-31 16:21:23 -07:00
- [Lineage and Evolution ](#lineage-and-evolution )
2025-09-05 07:54:50 -07:00
- [Roadmap ](#roadmap )
- [License ](#license )
2025-10-15 22:47:40 -07:00
</details>
2025-07-22 08:25:42 -07:00
# Getting Started
2025-07-17 15:17:45 -07:00
## Installation
2025-10-15 22:47:40 -07:00
### Pre-built Releases
Pre-built binaries are available from the [Releases ](https://github.com/mongodb/kingfisher/releases ) section.
### Homebrew
2025-10-31 16:32:35 -07:00

2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
brew install kingfisher
```
2025-10-15 22:47:40 -07:00
### Linux and macOS
<details>
2025-06-24 17:17:16 -07:00
2025-10-25 17:12:51 -07:00
Use the bundled installer script to fetch the latest release and place it in
`~/.local/bin` (or a directory of your choice):
2025-07-29 10:12:40 -07:00
```bash
# Linux, macOS
curl --silent --location \
2025-10-25 17:12:51 -07:00
https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher.sh | \
bash
2025-07-29 10:12:40 -07:00
```
2025-10-25 17:12:51 -07:00
To install into a custom location, pass the desired directory as an argument:
```bash
curl --silent --location \
https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher.sh | \
bash -s -- /opt/kingfisher
```
2025-10-15 22:47:40 -07:00
</details>
### Windows
<details>
2025-10-25 17:12:51 -07:00
Download and run the PowerShell installer to place the binary in
`$env:USERPROFILE\bin` (or another directory you specify):
2025-10-15 22:47:40 -07:00
2025-07-29 10:12:40 -07:00
```powershell
# Windows
2025-10-25 17:12:51 -07:00
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher.ps1' -OutFile install-kingfisher.ps1
./install-kingfisher.ps1
2025-07-29 10:12:40 -07:00
```
2025-10-25 17:12:51 -07:00
You can provide a custom destination using the `-InstallDir` parameter:
```powershell
./install-kingfisher.ps1 -InstallDir 'C:\Tools\Kingfisher'
```
2025-10-15 22:47:40 -07:00
</details>
2025-07-29 10:12:40 -07:00
2025-12-09 12:56:55 -08:00
### Pre-commit hooks
Install a Git pre-commit hook to block commits that introduce new secrets.
The installer:
- Preserves any existing `pre-commit` hook by chaining it **before ** Kingfisher.
- Supports custom hook directories via `--hooks-path` (or Git’ s `core.hooksPath` ).
- Can be installed either **per-repository ** or as a **global ** hook.
#### macOS and Linux
<details>
Install a **per-repository ** hook from the root of the repo you want to protect:
```bash
curl --silent --location \
https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher-pre-commit.sh | \
bash
```
Uninstall from that repository:
```bash
curl --silent --location \
https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher-pre-commit.sh | \
bash -s -- --uninstall
```
Install as a **global ** pre-commit hook (using core.hooksPath):
```bash
curl --silent --location \
https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher-pre-commit.sh | \
bash -s -- --global
```
Uninstall the **global ** hook:
```bash
curl --silent --location \
https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher-pre-commit.sh | \
bash -s -- --global --uninstall
```
</details>
#### Windows PowerShell
<details>
Install a **per-repository ** hook from the root of the target repo:
```powershell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
2025-12-12 21:59:37 -08:00
Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher-pre-commit.ps1' -OutFile install-kingfisher-pre-commit.ps1
2025-12-09 12:56:55 -08:00
./install-kingfisher-pre-commit.ps1
```
Uninstall from that repository:
```powershell
./install-kingfisher-pre-commit.ps1 -Uninstall
```
Install as a **global ** hook (using core.hooksPath):
```powershell
./install-kingfisher-pre-commit.ps1 -Global
```
Uninstall the **global ** hook:
```powershell
./install-kingfisher-pre-commit.ps1 -Global -Uninstall
```
> The installer automatically runs any existing `pre-commit` hook first, then
2025-12-12 17:21:17 -08:00
> executes `kingfisher scan . --staged --quiet --no-update-check`
2025-12-09 12:56:55 -08:00
> against the staged diff (anchored to `HEAD` when no commits exist yet).
</details>
#### Using the `pre-commit` framework
Add Kingfisher as a hook in your `.pre-commit-config.yaml` :
<details>
```yaml
repos:
- repo: https://github.com/mongodb/kingfisher
rev: <version-or-commit>
hooks:
# No local install required; runs Kingfisher from Docker at the repo root
- id: kingfisher-docker
# Fastest when you already have Kingfisher installed locally
- id: kingfisher
```
Then install the hook via `pre-commit install` . Every hook now drives Kingfisher
directly with the built-in `--staged` flag:
```bash
2025-12-12 17:21:17 -08:00
kingfisher scan . --staged --quiet --no-update-check
2025-12-09 12:56:55 -08:00
```
When `--staged` is set, Kingfisher snapshots the staged index into a temporary
commit, diffs it against `HEAD` (or an empty tree if no commits exist yet), and
2025-12-16 21:52:08 -08:00
scans only those staged changes.
2025-12-09 12:56:55 -08:00
> Exit codes: Kingfisher exits `0` when no findings are present and returns
> `205` when validated credentials are discovered (other findings use codes in
> the `200` range). The hook surfaces those exit codes directly to `pre-commit`,
> so no extra handling is required—the commit will fail automatically on
> non-zero exits.
To trigger a hook in CI without installing to `.git/hooks` , run (for example):
```bash
pre-commit run kingfisher-pre-commit --all-files
```
</details>
2025-10-15 22:47:40 -07:00
### Compile
You may compile for your platform via `make`
<details>
2025-06-24 17:17:16 -07:00
```bash
# NOTE: Requires Docker
make linux
2025-07-29 10:12:40 -07:00
# macOS --- must build from a macOS host
2025-06-24 17:17:16 -07:00
make darwin
# Windows x64 --- requires building from a Windows host with Visual Studio installed
./buildwin.bat -force
```
```bash
# Build all targets
make linux-all # builds both x64 and arm64
make darwin-all # builds both x64 and arm64
make all # builds for every OS and architecture supported
```
2025-10-15 22:47:40 -07:00
</details>
### <img src="./docs/assets/icons/docker.svg" height="40" style="vertical-align:text-bottom;" alt="Docker"/> Run Kingfisher in Docker
Run the dockerized Kingfisher container
<details>
2025-07-21 15:21:10 -07:00
```bash
# GitHub Container Registry
docker run --rm ghcr.io/mongodb/kingfisher:latest --version
# Scan the current working directory
# (mounts your code at /src and scans it)
docker run --rm \
-v "$PWD":/src \
ghcr.io/mongodb/kingfisher:latest scan /src
# Scan while providing a GitHub token
# Mounts your working dir at /proj and passes in the token:
docker run --rm \
-e KF_GITHUB_TOKEN=ghp_… \
-v "$PWD":/proj \
ghcr.io/mongodb/kingfisher:latest \
scan --git-url https://github.com/org/private_repo.git
2025-08-02 20:40:16 -07:00
# Scan an S3 bucket
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
# Credentials can come from KF_AWS_KEY/KF_AWS_SECRET, --role-arn, or --profile
2025-08-02 20:40:16 -07:00
docker run --rm \
-e KF_AWS_KEY=AKIA... \
-e KF_AWS_SECRET=g5nYW... \
ghcr.io/mongodb/kingfisher:latest \
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
scan s3 bucket-name
2025-08-02 20:40:16 -07:00
2025-07-21 15:21:10 -07:00
# Scan and write a JSON report locally
# Here we:
# 1. Mount $PWD → /proj
# 2. Tell Kingfisher to write findings.json inside /proj/reports
# 3. Ensure ./reports exists on your host so Docker can mount it
mkdir -p reports
# run and output into host’ s ./reports directory
docker run --rm \
-v "$PWD":/proj \
ghcr.io/mongodb/kingfisher:latest \
scan /proj \
--format json \
--output /proj/reports/findings.json
# Tip: you can combine multiple mounts if you prefer separating source vs. output:
# Here /src is read‑ only, and /out holds your generated reports
docker run --rm \
-v "$PWD":/src:ro \
-v "$PWD/reports":/out \
ghcr.io/mongodb/kingfisher:latest \
scan /src \
--format json \
--output /out/findings.json
```
2025-10-15 22:47:40 -07:00
</details>
2025-07-17 15:11:35 -07:00
# 🔐 Detection Rules at a Glance
2025-07-15 16:42:22 -07:00
2025-08-27 15:35:01 -07:00
Kingfisher ships with [hundreds of rules ](/data/rules/ ) that cover everything from classic cloud keys to the latest AI SaaS tokens. Below is an overview:
2025-07-15 16:42:22 -07:00
2025-07-17 15:11:35 -07:00
| Category | What we catch |
|----------|---------------|
2025-08-27 15:35:01 -07:00
| **AI SaaS APIs ** | OpenAI, Anthropic, Google Gemini, Cohere, Mistral, Stability AI, Replicate, xAI (Grok), Ollama, Langchain, Perplexity, Weights & Biases, Cerebras, Friendli, Fireworks.ai, NVIDIA NIM, together.ai, Zhipu, and more |
| **Cloud Providers ** | AWS, Azure, GCP, Alibaba Cloud, DigitalOcean, IBM Cloud, Cloudflare, and more |
| **Dev & CI/CD ** | GitHub/GitLab tokens, CircleCI, TravisCI, TeamCity, Docker Hub, npm, PyPI, and more |
| **Messaging & Comms ** | Slack, Discord, Microsoft Teams, Twilio, Mailgun, SendGrid, Mailchimp, and more |
| **Databases & Data Ops ** | MongoDB Atlas, PlanetScale, Postgres DSNs, Grafana Cloud, Datadog, Dynatrace, and more |
| **Payments & Billing ** | Stripe, PayPal, Square, GoCardless, and more |
| **Security & DevSecOps ** | Snyk, Dependency-Track, CodeClimate, Codacy, OpsGenie, PagerDuty, and more |
| **Misc. SaaS & Tools ** | 1Password, Adobe, Atlassian/Jira, Asana, Netlify, Baremetrics, and more |
2025-07-15 16:42:22 -07:00
2025-10-15 22:47:40 -07:00
## 📝 Write Custom Rules!
2025-06-24 17:17:16 -07:00
Kingfisher ships with hundreds of rules with HTTP and service‑ specific validation checks (AWS, Azure, GCP, etc.) to confirm if a detected string is a live credential.
However, you may want to add your own custom rules, or modify a detection to better suit your needs / environment.
First, review [docs/RULES.md ](/docs/RULES.md ) to learn how to create custom Kingfisher rules.
2025-11-05 17:19:11 -08:00
### Pattern requirements and placeholder filtering
Every rule can declare optional `pattern_requirements` to enforce additional character checks after a regex matches. Each field
is independent:
- `min_digits` , `min_uppercase` , `min_lowercase` , and `min_special_chars` enforce complexity thresholds.
- `special_chars` lets you override the set of characters counted as "special" when `min_special_chars` is used.
- `ignore_if_contains` lists case-insensitive substrings that should cause a match to be discarded (for example, to drop
2025-11-06 16:22:35 -08:00
`test` , `demo` , or `localhost` values).
2025-11-07 16:31:24 -08:00
- `checksum` lets you compare an extracted portion of the match against a Liquid-rendered expectation. Provide `actual.template`
and `expected` Liquid snippets (with access to `{{ MATCH }}` , `{{ FULL_MATCH }}` , and any named capture as both its original
case and uppercase alias) and Kingfisher will skip the finding when the rendered values differ. Optional keys such as
`requires_capture` and `skip_if_missing` help you guard against legacy formats while onboarding the checksum-aware variant.
2025-11-05 17:19:11 -08:00
2025-11-07 16:31:24 -08:00
When a match is skipped because of `ignore_if_contains` or a checksum mismatch, Kingfisher logs the event at the `DEBUG` level alongside the rule that was evaluated. If you need to keep those matches for a particular scan, pass `--no-ignore-if-contains` to `kingfisher scan` to disable the substring filter without editing any rule files. Verbose mode (`-v` ) will also show you the
checksum mismatch lengths so you can confirm why a finding was suppressed.
2025-11-05 17:19:11 -08:00
2025-06-24 17:17:16 -07:00
Once you've done that, you can provide your custom rules (defined in a YAML file) and provide it to Kingfisher at runtime --- no recompiling required!
2025-11-09 08:42:16 -08:00
### 🔍 Checksum Intelligence (New!)
Modern API tokens increasingly include **built-in checksums ** , short internal digests that make each credential self-verifiable. (For background, see [GitHub’ s write-up on their newer token formats ](https://github.blog/engineering/platform-security/behind-githubs-new-authentication-token-formats/ ) and why checksums slash false positives.)
Kingfisher supports **checksum-aware matching ** in rules, enabling **offline structural verification ** of credentials * without * calling third-party APIs.
By validating each token’ s internal checksum (for tokens that support checksums), Kingfisher eliminates nearly all false positives—automatically skipping structurally invalid or fake tokens before validation ever runs.
**Why this matters**
- ✅ **Offline verification ** — no API call required
- 🧠 **Industry-aligned ** — compatible with prefix + checksum token designs (e.g., modern PATs)
- ⚡ **Lower false positives ** — invalid tokens are filtered out by structure alone
**Learn more**: implementation details and templating are documented in * * [docs/RULES.md ](docs/RULES.md )**
---
<!-- Optional: add this one-liner to your “Performance, Accuracy, and Hundreds of Rules” bullets -->
- **Checksum-aware detection**: verifies tokens with embedded checksums (offline) to cut false positives — see [docs/RULES.md ](docs/RULES.md )
2025-10-15 22:47:40 -07:00
# 🎉 Usage
2025-06-24 17:17:16 -07:00
## Basic Examples
2025-08-19 09:30:26 -07:00
> **Note** `kingfisher scan` detects whether the input is a Git repository or a plain directory, no extra flags required.
2025-06-24 17:17:16 -07:00
### Scan with secret validation
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan /path/to/code
## NOTE: This path can refer to:
# 1. a local git repo
# 2. a directory with many git repos
# 3. or just a folder with files and subdirectories
## To explicitly prevent scanning git commit history add:
# `--git-history=none`
```
### Scan a directory containing multiple Git repositories
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan /projects/mono‑ repo‑ dir
```
### Scan a Git repository without validation
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan ~/src/myrepo --no-validate
```
### Display only secrets confirmed active by third‑ party APIs
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
2025-06-28 09:18:28 -07:00
kingfisher scan /path/to/repo --only-valid
2025-06-24 17:17:16 -07:00
```
### Output JSON and capture to a file
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan . --format json | tee kingfisher.json
```
### Output SARIF directly to disk
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
2025-06-28 09:18:28 -07:00
kingfisher scan /path/to/repo --format sarif --output findings.sarif
2025-06-24 17:17:16 -07:00
```
2025-12-05 16:06:02 -08:00
### Access map outputs and viewer
2025-12-17 11:57:35 -08:00
**Stop Guessing, Start Mapping: Understand Your True Blast Radius**
Finding a leaked credential is only the first step. The critical question isn’ t just “Is this a secret?”—it’ s “What can an attacker do with it?”
Kingfisher's `--access-map` feature transforms secret detection from a simple alert into a comprehensive threat assessment. Instead of leaving you with a cryptic API key, Kingfisher actively authenticates against your cloud provider (AWS or GCP) to map the full extent of the credential's power.
* Instant Identity Resolution: Immediately identify who the key belongs to—whether it's a specific IAM user, an assumed role, or a service account.
* Visualize the Blast Radius: See exactly which resources (S3 buckets, EC2 instances, projects) are exposed and at risk.
Add `--access-map` to enrich JSON, JSONL, BSON, pretty, and SARIF reports with an `access_map` containing the resources and the permissions that the key can access - for each resource (grouped when identical).
2025-12-05 16:06:02 -08:00
- If you validated cloud credentials without `--access-map` , Kingfisher will remind you on stderr to rerun with the flag so the access map appears in the output.
2025-12-05 21:57:20 -08:00
- Run `kingfisher view ./kingfisher.json` to explore a report locally in a local web UI
2025-12-16 21:13:00 -08:00
> **Use the access map functionality only when you are authorized to inspect the target account, as Kingfisher will issue additional network requests to determine what access the secret grants**

2025-12-05 21:57:20 -08:00
### View access-map reports locally
```bash
kingfisher view kingfisher.json
```
The `view` subcommand starts a local-only server (default port `7890` ) that bundles the HTML, CSS, and JavaScript for the access-map viewer directly into the Kingfisher binary. Provide a JSON or JSONL report to load it automatically, or open the page and upload a report in the browser. If port 7890 is already in use, Kingfisher will exit and tell you to re-run with `--port <PORT>` .
2025-12-05 16:06:02 -08:00
2025-06-24 17:17:16 -07:00
### Pipe any text directly into Kingfisher by passing `-`
```bash
cat /path/to/file.py | kingfisher scan -
2025-07-27 20:25:45 -07:00
```
2025-07-27 12:20:20 -07:00
2025-09-04 23:52:43 -07:00
### Limit maximum file size scanned (`--max-file-size`)
2025-09-09 22:40:00 -07:00
By default, Kingfisher skips files larger than **256 MB ** . You can raise or lower this cap per run with `--max-file-size` , which takes a value in **megabytes ** .
2025-09-04 23:52:43 -07:00
```bash
2025-09-09 22:40:00 -07:00
# Scan files up to 500 mb in size
kingfisher scan /some/file --max-file-size 500
2025-09-04 23:52:43 -07:00
```
2025-06-28 07:08:22 -07:00
### Scan using a rule _family_ with one flag
2025-09-05 07:57:14 -07:00
_(prefix matching: `--rule kingfisher.aws` loads `kingfisher.aws.*` )_
2025-06-24 17:17:16 -07:00
```bash
# Only apply AWS-related rules (kingfisher.aws.1 + kingfisher.aws.2)
kingfisher scan /path/to/repo --rule kingfisher.aws
```
2025-06-25 17:23:35 -07:00
### Display rule performance statistics
2025-06-28 07:08:22 -07:00
2025-06-25 17:23:35 -07:00
```bash
kingfisher scan /path/to/repo --rule-stats
```
2025-06-28 09:18:28 -07:00
### Scan while ignoring likely test files
2025-06-30 17:04:29 -07:00
2025-07-14 17:09:04 -07:00
`--exclude` skips any file or directory whose path matches this glob pattern (repeatable, uses gitignore-style syntax, case sensitive)
2025-06-28 09:18:28 -07:00
```bash
2025-06-29 21:45:43 -07:00
# Scan source but skip likely unit / integration tests
2025-07-14 16:55:19 -07:00
kingfisher scan ./my-project \
2025-07-14 17:09:04 -07:00
--exclude='[Tt]est' \
2025-07-14 16:55:19 -07:00
--exclude='spec' \
2025-07-14 17:09:04 -07:00
--exclude='[Ff]ixture' \
2025-07-14 16:55:19 -07:00
--exclude='example' \
--exclude='sample'
2025-06-28 09:18:28 -07:00
```
2025-07-14 13:18:24 -07:00
### Exclude specific paths
```bash
# Skip all Python files and any directory named tests
kingfisher scan ./my-project \
--exclude '*.py' \
2025-07-14 17:09:04 -07:00
--exclude '[Tt]ests'
2025-07-14 13:18:24 -07:00
```
2025-09-16 14:20:43 -07:00
### Scan changes in CI pipelines
Limit scanning to the delta between your default branch and a pull request branch by combining `--since-commit` with `--branch` (defaults to `HEAD` ). This only scans files that differ between the two references, which keeps CI runs fast while still blocking new secrets.
2025-10-25 17:12:51 -07:00
Use `--branch-root-commit` alongside `--branch` when you need to include a specific commit (and everything after it) in a diff-focused scan without re-examining earlier history. Provide the branch tip (or other comparison ref) via `--branch` , and pass the commit or merge-base you want to include with `--branch-root-commit` . If you omit `--branch-root-commit` , you can still enable `--branch-root` to fall back to treating the `--branch` ref itself as the inclusive root for backwards compatibility. This is especially useful in long-lived branches where you want to resume scanning from a previous review point or from the commit where a hotfix forked.
> **How is this different from `--since-commit`?**
> `--since-commit` computes a diff between the branch tip and another ref, so it only inspects files that changed between those two points in history. `--branch-root-commit` rewinds to the parent of the commit you provide and then scans everything introduced from that commit forward, even if the files are unchanged relative to another baseline. Reach for `--since-commit` to keep CI scans fast by checking only the latest delta, and use `--branch-root-commit` when you want to re-audit the full contents of a branch starting at a specific commit.
2025-09-16 14:20:43 -07:00
```bash
kingfisher scan . \
--since-commit origin/main \
--branch "$CI_BRANCH"
```
2025-10-23 17:37:40 -07:00
Another example:
```bash
cd /tmp
git clone https://github.com/micksmix/SecretsTest.git
cd /tmp/SecretsTest
git checkout feature-1
#
# scan diff between main and feature-1 branch
kingfisher scan /tmp/SecretsTest --branch feature-1 \
--since-commit=$(git -C /tmp/SecretsTest merge-base main feature-1)
#
# scan only a specific commit
2025-10-26 11:53:29 -07:00
kingfisher scan /tmp/SecretsTest \
2025-10-23 17:37:40 -07:00
--branch baba6ccb453963d3f6136d1ace843e48d7007c3f
2025-10-25 17:12:51 -07:00
#
# scan feature-1 starting at a specific commit (inclusive)
kingfisher scan /tmp/SecretsTest --branch feature-1 \
--branch-root-commit baba6ccb453963d3f6136d1ace843e48d7007c3f
#
# scan feature-1 starting from the commit where the branch diverged from main
kingfisher scan /tmp/SecretsTest --branch feature-1 \
--branch-root-commit $(git -C /tmp/SecretsTest merge-base main feature-1)
#
# scan from a hotfix commit that should be re-checked before merging
HOTFIX_COMMIT=$(git -C /tmp/SecretsTest rev-parse hotfix~1)
kingfisher scan /tmp/SecretsTest --branch hotfix \
--branch-root-commit "$HOTFIX_COMMIT"
2025-10-23 17:37:40 -07:00
```
2025-09-16 14:20:43 -07:00
When the branch under test is already checked out, `--branch HEAD` or omitting `--branch` entirely is sufficient. Kingfisher exits with `200` when any findings are discovered and `205` when validated secrets are present, allowing CI jobs to fail automatically if new credentials slip in.
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:35:26 -07:00
> **Tip:** You can point Kingfisher at a local working tree and scan another branch or commit without changing checkouts. The CLI now resolves repositories from their worktree roots, so commands like the following work without needing to pass the `.git` directory explicitly:
```bash
kingfisher scan /path/to/local/repo --branch <ref>
kingfisher scan C:\\src\\repo --branch <commit-hash>
```
2025-09-16 14:20:43 -07:00
The same diff-focused workflow works when cloning repositories on the fly with `--git-url` . Kingfisher automatically tries remote-tracking names like `origin/main` and `origin/feature-1` , so you can target the branches involved in a pull request without performing a local checkout first.
```bash
kingfisher scan \
--git-url https://github.com/org/repo.git \
2025-09-16 14:29:53 -07:00
--since-commit main \
--branch development
2025-09-16 14:20:43 -07:00
```
- Fixed kingfisher scan so that providing --branch without --since-commit now diffs the branch against the empty tree and scans every commit reachable from that branch.
- Added rules for meraki, duffel, finnhub, frameio, freshbooks, gitter, infracost, launchdarkly, lob, maxmind, messagebird, nytimes, prefect, salingo, sendinblue, sentry, shippo, twitch, typeform
2025-10-20 18:23:12 -07:00
When `--since-commit` is omitted, specifying `--branch` scans the requested ref directly. This makes it easy to analyze a feature branch without checking it out locally.
```bash
# Scan a branch from an existing checkout
kingfisher scan ~/tmp/repo --branch feature-123
# Or scan a branch when cloning on the fly
kingfisher scan \
--git-url https://github.com/org/repo.git \
--branch origin/feature-123
```
2025-09-16 14:20:43 -07:00
In CI systems that expose the base and head commits explicitly, you can pass those SHAs directly while still using `--git-url` :
```bash
kingfisher scan \
--git-url git@github .com:org/repo.git \
--since-commit "$BASE_COMMIT" \
--branch "$PR_HEAD_COMMIT"
```
2025-07-14 13:18:24 -07:00
If you want to know which files are being skipped, enable verbose debugging (-v) when scanning, which will report any files being skipped by the baseline file (or via --exclude):
```bash
# Skip all Python files and any directory named tests, and report to stderr any skipped files
kingfisher scan ./my-project \
--exclude '*.py' \
--exclude tests \
-v
```
2025-10-05 16:58:50 -07:00
2025-10-15 22:47:40 -07:00
## <img alt="GitHub" src="./docs/assets/icons/aws-s3.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning an AWS S3 Bucket
2025-08-03 09:45:52 -07:00
You can scan S3 objects directly:
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan s3 bucket-name [--prefix path/]
2025-08-03 09:45:52 -07:00
```
Credential resolution happens in this order:
1. `KF_AWS_KEY` and `KF_AWS_SECRET` environment variables
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
2. `--profile` pointing to a profile in `~/.aws/config` (works with AWS SSO)
2025-08-03 09:45:52 -07:00
3. anonymous access for public buckets
If `--role-arn` is supplied, the credentials from steps 1– 2 are used to assume that role.
2025-10-15 22:47:40 -07:00
Examples
2025-08-03 09:45:52 -07:00
```bash
# using explicit keys
export KF_AWS_KEY=AKIA...
export KF_AWS_SECRET=g5nYW...
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan s3 some-example-bucket
2025-08-03 09:45:52 -07:00
# Above can also be run as:
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_AWS_KEY=AKIA... KF_AWS_SECRET=g5nYW... kingfisher scan s3 some-example-bucket
2025-08-03 09:45:52 -07:00
# using a local profile (e.g., SSO) that exists in your AWS profile (~/.aws/config)
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan s3 some-example-bucket --profile default
2025-08-03 09:45:52 -07:00
# anonymous scan of a bucket, while providing an object prefix to only scan subset of the s3 bucket
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan s3 awsglue-datasets \
--prefix examples/us-legislators/all
2025-08-03 09:45:52 -07:00
# assuming a role when scanning
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan s3 some-example-bucket \
2025-08-03 09:45:52 -07:00
--role-arn arn:aws:iam::123456789012:role/MyRole
# anonymous scan of a public bucket
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan s3 some-example-bucket
2025-08-03 09:45:52 -07:00
```
Docker example:
```bash
docker run --rm \
-e KF_AWS_KEY=AKIA... \
-e KF_AWS_SECRET=g5nYW... \
ghcr.io/mongodb/kingfisher:latest \
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
scan s3 bucket-name
2025-08-03 09:45:52 -07:00
```
2025-10-05 16:58:50 -07:00
2025-10-15 22:47:40 -07:00
## <img src="./docs/assets/icons/gcs.svg" height="40" width="40" alt="Google Cloud Storage"/> Scanning a Google Cloud Storage Bucket
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
Use the `gcs` scan subcommand to stream objects directly from Google Cloud Storage. Authentication
uses Application Default Credentials, so you can provide a service-account JSON file via the
`GOOGLE_APPLICATION_CREDENTIALS` environment variable or by passing `--service-account` . Public
2025-10-15 22:47:40 -07:00
buckets work without credentials.
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gcs bucket-name
2025-10-15 22:47:40 -07:00
# scan a sub-tree inside the bucket
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gcs bucket-name --prefix path/to/data/
2025-10-15 22:47:40 -07:00
# supply a service-account key explicitly
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gcs bucket-name --service-account /path/to/key.json
2025-10-15 22:47:40 -07:00
```
Functional example:
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gcs cloud-samples-data --prefix "storage/"
2025-10-15 22:47:40 -07:00
```
## <img alt="Docker" src="./docs/assets/icons/docker.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Docker Images
2025-07-14 13:18:24 -07:00
2025-07-28 10:07:55 -07:00
Kingfisher will first try to use any locally available image, then fall back to pulling via OCI.
Authentication happens * in this order * :
1. * * `KF_DOCKER_TOKEN` ** env var
- If it contains `user:pass` , it’ s used as Basic auth
- Otherwise it’ s sent as a Bearer token
2. **Docker CLI credentials **
- Checks `credHelpers` (per-registry) and `credsStore` in `~/.docker/config.json` .
- Falls back to the legacy `auths` → `auth` (base64) entries.
3. **Anonymous ** (no credentials)
```bash
# 1) Scan public or already-pulled image
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan docker ghcr.io/owasp/wrongsecrets/wrongsecrets-master:latest-master
2025-07-28 10:07:55 -07:00
# 2) For private registries, explicitly set KF_DOCKER_TOKEN:
# - Basic auth: "user:pass"
# - Bearer only: "TOKEN"
export KF_DOCKER_TOKEN="AWS:$(aws ecr get-login-password --region us-east-1)"
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan docker some-private-registry.dkr.ecr.us-east-1.amazonaws.com/base/amazonlinux2023:latest
2025-07-28 10:07:55 -07:00
# 3) Or rely on your Docker CLI login/keychain:
# (e.g. aws ecr get-login-password … | docker login …)
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan docker private.registry.example.com/my-image:tag
2025-07-28 10:07:55 -07:00
```
2025-06-28 07:08:22 -07:00
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
> **Deprecated**
> Legacy scan flags such as `--github-user`, `--gitlab-group`,
> `--bitbucket-workspace`, `--azure-organization`, `--huggingface-user`,
> `--slack-query`, `--jira-url`, `--confluence-url`, `--s3-bucket`,
> `--gcs-bucket`, and `--docker-image` still work for now, but they trigger a
> warning and will be removed in a future release. Migrate to the
> `kingfisher scan <provider>` subcommands below to future-proof your automations.
2025-10-15 22:47:40 -07:00
## <img alt="GitHub" src="./docs/assets/icons/github.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning GitHub
2025-06-24 17:17:16 -07:00
2025-10-05 16:58:50 -07:00
### Scan GitHub organization (requires `KF_GITHUB_TOKEN`)
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan github --organization my-org
2025-06-24 17:17:16 -07:00
```
2025-09-15 21:26:51 -07:00
### Skip specific GitHub repositories during enumeration
Repeat `--github-exclude` for every repository you want to ignore when scanning
users or organizations. You can provide exact repositories like
`OWNER/REPO` or gitignore-style glob patterns such as `owner/*-archive`
(matching is case-insensitive).
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan github --organization my-org \
2025-09-15 21:26:51 -07:00
--github-exclude my-org/huge-repo \
--github-exclude my-org/*-archive
```
2025-06-24 17:17:16 -07:00
### Scan remote GitHub repository
2025-06-28 07:08:22 -07:00
2025-08-20 20:41:11 -07:00
`--git-url` clones the repository and scans its files and history. To also inspect
related server-side data, supply `--repo-artifacts` . This flag pulls down the
repository's issues (including pull requests), wiki, and any public gists owned by
the repository owner and scans them for secrets. Fetching these extras counts
against API rate limits and private artifacts require a `KF_GITHUB_TOKEN` .
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:35:26 -07:00
> **Why does `--git-url` sometimes report fewer findings than scanning a local checkout?**.
>
> Remote clones created via `--git-url` default to `--mirror`/bare mode so Kingfisher only
> reads the Git history. When you point Kingfisher at an existing working tree (for example
> `kingfisher scan ./repo`), it enumerates both the filesystem contents *and* the Git
> history. Any secrets that are present in the checked-out files therefore appear twice:
> once from the working tree path and once from the commit where the secret entered the
> history. To replicate the remote behavior locally, either scan a bare clone or disable
> history scanning with `--git-history none` when targeting a working tree.
2025-06-24 17:17:16 -07:00
```bash
2025-08-20 20:41:11 -07:00
# Scan the repository only
2025-06-24 17:17:16 -07:00
kingfisher scan --git-url https://github.com/org/repo.git
2025-08-20 20:41:11 -07:00
# Include issues, wiki, and owner gists
kingfisher scan --git-url https://github.com/org/repo.git --repo-artifacts
2025-06-24 17:17:16 -07:00
2025-08-20 20:41:11 -07:00
# Private repositories or artifacts
KF_GITHUB_TOKEN="ghp_…" kingfisher scan --git-url https://github.com/org/private_repo.git --repo-artifacts
2025-06-24 17:17:16 -07:00
```
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
---
2025-06-28 07:08:22 -07:00
2025-10-15 22:47:40 -07:00
## <img alt="GitLab" src="./docs/assets/icons/gitlab.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning GitLab
2025-06-24 17:17:16 -07:00
### Scan GitLab group (requires `KF_GITLAB_TOKEN`)
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --group my-group
2025-08-14 09:25:18 -07:00
# include repositories from all nested subgroups
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --group my-group --include-subgroups
2025-06-24 17:17:16 -07:00
```
### Scan GitLab user
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --user johndoe
2025-06-24 17:17:16 -07:00
```
2025-09-15 21:26:51 -07:00
### Skip specific GitLab projects during enumeration
Repeat `--gitlab-exclude` for every project path you want to ignore when scanning
users or groups. Specify project paths as `group/project` (case-insensitive) or
use gitignore-style glob patterns like `group/**/archive-*` to drop families of
projects across nested subgroups.
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --group my-group \
2025-09-15 21:26:51 -07:00
--gitlab-exclude my-group/huge-project \
--gitlab-exclude my-group/**/archive-*
```
2025-06-24 17:17:16 -07:00
### Scan remote GitLab repository by URL
2025-06-28 07:08:22 -07:00
2025-08-20 20:41:11 -07:00
`--git-url` by itself clones the project repository. To include server-side
artifacts owned by the project, add `--repo-artifacts` . Kingfisher will retrieve
the project's issues, wiki, and snippets and scan them for secrets. These extra
requests may take longer and require a `KF_GITLAB_TOKEN` for private projects.
2025-06-24 17:17:16 -07:00
```bash
2025-08-20 20:41:11 -07:00
# Scan the repository only
2025-06-24 17:17:16 -07:00
kingfisher scan --git-url https://gitlab.com/group/project.git
2025-08-20 20:41:11 -07:00
# Include issues, wiki, and snippets
kingfisher scan --git-url https://gitlab.com/group/project.git --repo-artifacts
# Private projects or artifacts
KF_GITLAB_TOKEN="glpat-…" kingfisher scan --git-url https://gitlab.com/group/private_project.git --repo-artifacts
2025-06-24 17:17:16 -07:00
```
### List GitLab repositories
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --group my-group --list-only
2025-08-14 09:25:18 -07:00
# include repositories from all nested subgroups
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --group my-group --include-subgroups --list-only
2025-09-15 21:26:51 -07:00
# skip specific projects when listing or scanning (supports glob patterns)
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitlab --group my-group --gitlab-exclude my-group/**/legacy-* --list-only
2025-06-24 17:17:16 -07:00
```
2025-10-15 22:47:40 -07:00
## <img alt="Azure Repos" src="./docs/assets/icons/azure-devops.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Azure Repos
2025-10-04 23:12:28 -07:00
2025-10-15 22:47:40 -07:00
### Scan Azure Repos organization or collection (requires `KF_AZURE_TOKEN` or `KF_AZURE_PAT`)
2025-10-04 23:12:28 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan azure --organization my-org
2025-10-04 23:12:28 -07:00
2025-10-15 22:47:40 -07:00
# Azure Repos Server example
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_AZURE_PAT="pat" kingfisher scan azure --organization DefaultCollection --azure-base-url https://ado.internal.example/tfs/
2025-10-04 23:12:28 -07:00
```
2025-10-15 22:47:40 -07:00
### Scan specific Azure Repos projects
2025-10-04 23:12:28 -07:00
Projects are specified as `ORGANIZATION/PROJECT` . Repeat the flag for multiple projects.
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan azure --project my-org/payments \
--project my-org/core-platform
2025-10-04 23:12:28 -07:00
```
### Skip specific Azure repositories during enumeration
Repeat `--azure-exclude` to ignore repositories when scanning organizations or projects.
2025-10-05 10:48:57 -07:00
Use identifiers like `ORGANIZATION/PROJECT/REPOSITORY` . Repositories that share the same
name as their project can be excluded with `ORGANIZATION/PROJECT` , and gitignore-style
patterns such as `my-org/*/archive-*` are also supported.
2025-10-04 23:12:28 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan azure --organization my-org \
2025-10-04 23:12:28 -07:00
--azure-exclude my-org/payments/legacy-service \
--azure-exclude my-org/**/archive-*
```
### List Azure repositories
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan azure --organization my-org --list-only
2025-10-04 23:12:28 -07:00
# list repositories for specific projects
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan azure --project my-org/app --project my-org/api --list-only
2025-10-04 23:12:28 -07:00
# skip specific repositories while listing (supports glob patterns)
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan azure --organization my-org --azure-exclude my-org/**/experimental-* --list-only
2025-10-04 23:12:28 -07:00
```
2025-10-15 22:47:40 -07:00
## <img alt="Gitea" src="./docs/assets/icons/gitea.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Gitea
2025-09-23 13:07:45 -07:00
### Scan Gitea organization (requires `KF_GITEA_TOKEN`)
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitea --organization my-org
2025-09-23 13:07:45 -07:00
# self-hosted example
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_GITEA_TOKEN="gtoken" kingfisher scan gitea --organization platform --gitea-api-url https://gitea.internal.example/api/v1/
2025-09-23 13:07:45 -07:00
```
### Scan Gitea user
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitea --user johndoe
2025-09-23 13:07:45 -07:00
```
### Skip specific Gitea repositories during enumeration
Repeat `--gitea-exclude` for each repository you want to ignore when scanning users
or organizations. Accepts `owner/repo` identifiers or gitignore-style glob patterns
like `team/**/archive-*` .
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitea --organization my-org \
2025-09-23 13:07:45 -07:00
--gitea-exclude my-org/legacy-repo \
--gitea-exclude my-org/**/archive-*
```
### Scan remote Gitea repository by URL
`--git-url` clones the repository and scans its history. Adding `--repo-artifacts`
also clones the repository wiki if one exists. Private repositories and wikis
require `KF_GITEA_TOKEN` (and `KF_GITEA_USERNAME` when cloning via HTTPS).
```bash
# Scan the repository only
kingfisher scan --git-url https://gitea.com/org/repo.git
# Include the repository wiki (if present)
KF_GITEA_TOKEN="gtoken" KF_GITEA_USERNAME="org" \
kingfisher scan --git-url https://gitea.com/org/repo.git --repo-artifacts
```
### List Gitea repositories
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan gitea --organization my-org --list-only
2025-09-23 13:07:45 -07:00
# enumerate every organization visible to the authenticated user
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_GITEA_TOKEN="gtoken" kingfisher scan gitea --all-gitea-organizations --list-only
2025-09-23 13:07:45 -07:00
# self-hosted example
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_GITEA_TOKEN="gtoken" kingfisher scan gitea --user johndoe --gitea-api-url https://gitea.internal.example/api/v1/ --list-only
2025-09-23 13:07:45 -07:00
```
2025-10-15 22:47:40 -07:00
## <img alt="Bitbucket" src="./docs/assets/icons/bitbucket.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Bitbucket
2025-09-22 18:21:03 -07:00
### Scan Bitbucket workspace
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --workspace my-team
2025-09-22 18:21:03 -07:00
# include Bitbucket Cloud repositories from every accessible workspace
2025-11-13 14:30:27 -08:00
KF_BITBUCKET_TOKEN="$BITBUCKET_TOKEN" \
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --all-workspaces
2025-09-22 18:21:03 -07:00
```
### Scan Bitbucket user
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --user johndoe
2025-09-22 18:21:03 -07:00
```
### Skip specific Bitbucket repositories during enumeration
Use `--bitbucket-exclude` to ignore repositories while scanning users, workspaces,
or projects. Patterns accept either `owner/repo` (case-insensitive) or
gitignore-style globs such as `workspace/**/archive-*` .
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --workspace my-team \
2025-09-22 18:21:03 -07:00
--bitbucket-exclude my-team/legacy-repo \
--bitbucket-exclude my-team/**/archive-*
```
### Scan remote Bitbucket repository by URL
`--git-url` clones the repository and scans its files and history. To inspect
Bitbucket artifacts such as issues, add `--repo-artifacts` . Private artifacts
require credentials (see [Authenticate to Bitbucket ](#authenticate-to-bitbucket )).
```bash
# Scan the repository only
kingfisher scan --git-url https://bitbucket.org/hashashash/secretstest.git
# Include repository issues
2025-11-13 14:30:27 -08:00
KF_BITBUCKET_TOKEN="$BITBUCKET_TOKEN" \
2025-09-22 18:21:03 -07:00
kingfisher scan --git-url https://bitbucket.org/workspace/project.git --repo-artifacts
```
### List Bitbucket repositories
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --workspace my-team --list-only
2025-09-22 18:21:03 -07:00
# enumerate all accessible workspaces or projects
2025-11-13 14:30:27 -08:00
KF_BITBUCKET_TOKEN="$BITBUCKET_TOKEN" \
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --all-workspaces --list-only
2025-09-22 18:21:03 -07:00
# filter out repositories using glob patterns
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan bitbucket --workspace my-team --bitbucket-exclude my-team/**/experimental-* --list-only
2025-09-22 18:21:03 -07:00
```
### Authenticate to Bitbucket
Kingfisher supports Bitbucket Cloud and Bitbucket Server credentials:
2025-11-24 23:45:10 -08:00
- **Workspace API token (Cloud)** – set `KF_BITBUCKET_TOKEN` . Kingfisher automatically uses the token for Bitbucket REST APIs and authenticates git operations as `x-token-auth` .
2025-11-13 14:30:27 -08:00
- **Bitbucket Server token** – set `KF_BITBUCKET_USERNAME` and either
`KF_BITBUCKET_TOKEN` or `KF_BITBUCKET_PASSWORD` .
- **Legacy app password (Cloud)** – set `KF_BITBUCKET_USERNAME` and
`KF_BITBUCKET_APP_PASSWORD` .
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
- **OAuth/PAT token** – set `KF_BITBUCKET_OAUTH_TOKEN` .
2025-09-22 18:21:03 -07:00
These credentials match the options described in the [ghorg setup
guide](https://github.com/gabrie30/ghorg/blob/master/README.md#bitbucket -setup).
2025-11-13 14:30:27 -08:00
Bitbucket no longer supports App Tokens as of September 9, 2025:
https://support.atlassian.com/bitbucket-cloud/docs/api-tokens/
> As of September 9, 2025, app passwords can no longer be created. Use API tokens with scopes instead. All existing app passwords will be disabled on June 9, 2026. Migrate any integrations before then to avoid disruptions.
2025-09-22 18:21:03 -07:00
### Self-hosted Bitbucket Server
Use `--bitbucket-api-url` to point Kingfisher at your server's REST endpoint, for example
`https://bitbucket.example.com/rest/api/1.0/` . Provide credentials with
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
`KF_BITBUCKET_USERNAME` plus either `KF_BITBUCKET_TOKEN` or `KF_BITBUCKET_PASSWORD` ,
and pass `--ignore-certs` when connecting to HTTP or otherwise insecure instances.
2025-10-15 22:47:40 -07:00
## <img src="./docs/assets/icons/huggingface.svg" height="40" width="40" alt="Hugging Face"/> Scanning Hugging Face
Hugging Face hosts git repositories for models, datasets, and Spaces. Kingfisher can enumerate and scan all three resource types.
### Scan Hugging Face user
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan huggingface --user <username>
2025-10-15 22:47:40 -07:00
```
### Scan Hugging Face organization
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan huggingface --organization <orgname>
2025-10-15 22:47:40 -07:00
```
### Scan specific Hugging Face resources
Scan individual repositories by ID (owner/name) or by passing the full HTTPS URL:
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan huggingface --model <owner/model>
kingfisher scan huggingface --dataset https://huggingface.co/datasets/<owner>/<dataset>
kingfisher scan huggingface --space <owner/space>
2025-10-15 22:47:40 -07:00
```
Use `--huggingface-exclude` to omit results returned by user or organization enumeration. Prefix values with `model:` , `dataset:` , or `space:` when you only want to skip a specific resource type.
### List Hugging Face repositories
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan huggingface --user <username> --list-only
2025-10-15 22:47:40 -07:00
```
### Authenticate to Hugging Face
Private repositories require an access token provided through the `KF_HUGGINGFACE_TOKEN` environment variable. For git authentication the helper also honours `KF_HUGGINGFACE_USERNAME` (default `hf_user` ).
## <img alt="Jira" src="./docs/assets/icons/jira.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Jira
2025-07-25 17:21:28 -07:00
### Scan Jira issues matching a JQL query
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_JIRA_TOKEN="token" kingfisher scan jira --url https://jira.company.com \
2025-07-25 17:21:28 -07:00
--jql "project = TEST AND status = Open" \
--max-results 500
```
### Scan the last 1,000 Jira issues:
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_JIRA_TOKEN="token" kingfisher scan jira --url https://jira.mongodb.org \
2025-07-25 17:21:28 -07:00
--jql 'ORDER BY created DESC' \
--max-results 1000
```
2025-08-10 21:51:31 -07:00
2025-10-15 22:47:40 -07:00
## <img alt="Confluence" src="./docs/assets/icons/confluence.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Confluence
2025-08-10 21:51:31 -07:00
### Scan Confluence pages matching a CQL query
```bash
# Bearer token
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_CONFLUENCE_TOKEN="token" kingfisher scan confluence --url https://confluence.company.com \
2025-08-10 21:51:31 -07:00
--cql "label = secret" \
--max-results 500
# Basic auth with username and token
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_CONFLUENCE_USER="user@example .com" KF_CONFLUENCE_TOKEN="token" \
kingfisher scan confluence --url https://confluence.company.com \
2025-08-10 21:55:45 -07:00
--cql "text ~ 'password'" \
2025-08-10 21:51:31 -07:00
--max-results 500
```
Use the base URL of your Confluence site for `--confluence-url` . Kingfisher
automatically adds `/rest/api` to the end, so `https://example.com/wiki` and
`https://example.com` both work depending on your server configuration.
2025-08-10 21:57:35 -07:00
Generate a personal access token and set it in the `KF_CONFLUENCE_TOKEN` environment variable. By default, Kingfisher sends the token as a bearer token in the `Authorization` header.
To use basic authentication instead, also set `KF_CONFLUENCE_USER` to your Confluence email address; Kingfisher will then send the username and `KF_CONFLUENCE_TOKEN` as a Basic auth header. If the server responds with a redirect to a login page, the credentials are invalid or lack the required permissions.
2025-10-15 22:47:40 -07:00
## <img alt="Slack" src="./docs/assets/icons/slack.svg" width="40" height="40" style="vertical-align:text-bottom;"> Scanning Slack
2025-07-29 19:00:49 -07:00
### Scan Slack messages matching a search query
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_SLACK_TOKEN="xoxp-1234..." kingfisher scan slack "from:username has:link" \
2025-07-29 19:00:49 -07:00
--max-results 1000
2025-07-29 19:51:02 -07:00
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_SLACK_TOKEN="xoxp-1234..." kingfisher scan slack "akia" \
2025-07-29 19:51:02 -07:00
--max-results 1000
2025-07-29 19:00:49 -07:00
```
*The Slack token must be a user token with the `search:read` scope. Bot tokens (those beginning with `xoxb-` ) cannot call the Slack search API.*
2025-07-25 17:21:28 -07:00
2025-06-24 17:17:16 -07:00
## Environment Variables for Tokens
2025-06-28 07:08:22 -07:00
| Variable | Purpose |
| ----------------- | ---------------------------- |
| `KF_GITHUB_TOKEN` | GitHub Personal Access Token |
| `KF_GITLAB_TOKEN` | GitLab Personal Access Token |
2025-09-23 13:07:45 -07:00
| `KF_GITEA_TOKEN` | Gitea Personal Access Token |
| `KF_GITEA_USERNAME` | Username for private Gitea clones (used with `KF_GITEA_TOKEN` ) |
2025-10-15 22:47:40 -07:00
| `KF_AZURE_TOKEN` / `KF_AZURE_PAT` | Azure Repos Personal Access Token |
| `KF_AZURE_USERNAME` | Username to use with Azure Repos PATs (defaults to `pat` when unset) |
2025-11-13 14:30:27 -08:00
| `KF_BITBUCKET_TOKEN` | Bitbucket Cloud workspace API token or Bitbucket Server PAT |
| `KF_BITBUCKET_USERNAME` | Optional Bitbucket username for legacy app passwords or server tokens |
| `KF_BITBUCKET_APP_PASSWORD` | Legacy Bitbucket app password (deprecated September 9, 2025; disabled June 9, 2026) |
2025-09-22 18:21:03 -07:00
| `KF_BITBUCKET_OAUTH_TOKEN` | Bitbucket OAuth or PAT token |
2025-10-15 22:47:40 -07:00
| `KF_HUGGINGFACE_TOKEN` | Hugging Face access token for API enumeration and git cloning |
| `KF_HUGGINGFACE_USERNAME` | Optional username for Hugging Face git operations (defaults to `hf_user` ) |
2025-07-25 17:21:28 -07:00
| `KF_JIRA_TOKEN` | Jira API token |
2025-08-10 21:51:31 -07:00
| `KF_CONFLUENCE_TOKEN` | Confluence API token |
2025-07-29 19:00:49 -07:00
| `KF_SLACK_TOKEN` | Slack API token |
2025-07-28 09:55:48 -07:00
| `KF_DOCKER_TOKEN` | Docker registry token (`user:pass` or bearer token). If unset, credentials from the Docker keychain are used |
2025-08-04 19:32:19 -07:00
| `KF_AWS_KEY` and `KF_AWS_SECRET` | AWS Credentials to use with S3 bucket scanning |
2025-06-24 17:17:16 -07:00
Set them temporarily per command:
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
KF_GITLAB_TOKEN="glpat-…" kingfisher scan gitlab --group my-group
2025-06-24 17:17:16 -07:00
```
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
Or export for the session:
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
export KF_GITLAB_TOKEN="glpat-…"
```
2025-07-25 17:21:28 -07:00
To authenticate Jira requests:
```bash
export KF_JIRA_TOKEN="token"
```
2025-08-10 21:51:31 -07:00
To authenticate Confluence requests:
```bash
export KF_CONFLUENCE_TOKEN="token"
```
2025-06-28 07:08:22 -07:00
_If no token is provided Kingfisher still works for public repositories._
2025-06-24 17:17:16 -07:00
---
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
## Exit Codes
2025-06-28 07:08:22 -07:00
| Code | Meaning |
| ---- | ----------------------------- |
| 0 | No findings |
| 200 | Findings discovered |
| 205 | Validated findings discovered |
2025-06-24 17:17:16 -07:00
2025-07-17 15:17:45 -07:00
## Update Checks
2025-06-28 07:08:22 -07:00
2025-07-08 17:49:12 -07:00
Kingfisher automatically queries GitHub for a newer release when it starts and tells you whether an update is available.
- **Hands-free updates** – Add `--self-update` to any Kingfisher command
2025-08-27 15:35:01 -07:00
* If a newer version exists, Kingfisher will download it, replace the running binary, and re-launch itself with the **exact same arguments ** .
2025-07-09 16:00:54 -07:00
* If the update fails or no newer release is found, the current run proceeds as normal
2025-07-08 17:49:12 -07:00
2025-08-27 15:35:01 -07:00
- **Manual update** – Run `kingfisher self-update` to update the binary without scanning
2025-07-09 16:00:54 -07:00
- **Disable version checks** – Pass `--no-update-check` to skip both the startup and shutdown checks entirely
2025-06-24 17:17:16 -07:00
2025-10-15 22:47:40 -07:00
# 🤓 Advanced Options
2025-07-17 15:17:45 -07:00
## Build a Baseline / Detect New Secrets
There are situations where a repository already contains checked‑ in secrets, but you want to ensure no **new ** secrets are introduced. A baseline file lets you document the known findings so future scans only report anything that is not already in that list.
The easiest way to create a baseline is to run a normal scan with the `--manage-baseline` flag (typically at a low confidence level to capture all potential matches):
```bash
kingfisher scan /path/to/code \
--confidence low \
--manage-baseline \
--baseline-file ./baseline-file.yml
```
2025-11-04 14:06:35 -05:00
`--manage-baseline` automatically enables `--no-dedup` so the baseline captures every individual occurrence.
2025-07-17 15:17:45 -07:00
Use the same YAML file with the `--baseline-file` option on future scans to hide all recorded findings:
```bash
kingfisher scan /path/to/code \
--baseline-file /path/to/baseline-file.yaml
```
2025-08-17 17:41:34 -07:00
Running the scan again with `--manage-baseline` refreshes the baseline by adding new findings and pruning entries for secrets that no longer appear. See [docs/BASELINE.md ](docs/BASELINE.md ) for full detail.
2025-06-24 17:17:16 -07:00
2025-07-17 15:17:45 -07:00
## List Builtin Rules
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher rules list
```
2025-06-28 07:08:22 -07:00
2025-07-17 15:17:45 -07:00
## To scan using **only** your own `my_rules.yaml` you could run:
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan \
--load-builtins=false \
--rules-path path/to/my_rules.yaml \
./src/
```
2025-07-17 15:17:45 -07:00
## To add your rules alongside the built‑ ins:
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan \
--rules-path ./custom-rules/ \
--rules-path my_rules.yml \
~/path/to/project-dir/
```
## Other Examples
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
# Check custom rules - this ensures all regular expressions compile, and can match the rule's `examples` in the YML file
kingfisher rules check --rules-path ./my_rules.yml
# List GitHub repos
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan github --user my-user --list-only
kingfisher scan github --organization my-org --list-only
2025-09-15 21:26:51 -07:00
# Skip specific repositories when listing or scanning (supports glob patterns)
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher scan github --organization my-org --github-exclude my-org/*-archive --list-only
2025-06-24 17:17:16 -07:00
```
2025-09-18 14:11:54 -07:00
## Customize the HTTP User-Agent
Kingfisher identifies its HTTP requests with a user-agent that includes the binary name and version followed by a browser-style
string. Some environments require extra context, such as a contact address, a change-ticket number, or a temporary test label.
Use the global `--user-agent-suffix` flag to append this information between the Kingfisher identifier and the browser portion:
```bash
# Attach a contact email to all outbound validation requests
kingfisher --user-agent-suffix "contact=security@example .com" scan path/
# Label a one-off experiment
- Added provider-specific kingfisher scan subcommands (for example kingfisher scan github …) that translate into the legacy flags under the hood. The new layout keeps backwards compatibility while removing the wall of provider options from kingfisher scan --help.
- Updated the README so every provider example (GitHub, GitLab, Bitbucket, Azure Repos, Gitea, Hugging Face, Slack, Jira, Confluence, S3, GCS, Docker) uses the new subcommand style.
- Restored the direct kingfisher scan /path/to/dir flow for local filesystem scans while adding a --list-only switch to each provider subcommand so repository enumeration no longer requires the standalone github repos, gitlab repos, etc. commands.
- Removed the legacy top-level provider commands (kingfisher github, kingfisher gitlab, kingfisher gitea, kingfisher bitbucket, kingfisher azure, kingfisher huggingface) now that enumeration lives under kingfisher scan <provider> --list-only.
- Fixed kingfisher scan github … (and other provider-specific subcommands) so they no longer demand placeholder path arguments before the CLI accepts the request.
- Removed the --bitbucket-username, --bitbucket-token, and --bitbucket-oauth-token flags in favour of KF_BITBUCKET_* environment variables when authenticating to Bitbucket.
2025-10-22 16:24:09 -07:00
kingfisher --user-agent-suffix "Sept 2025 testing" scan github --user my-user --list-only
2025-09-18 14:11:54 -07:00
```
When omitted, Kingfisher defaults to `kingfisher/<version> Mozilla/5.0 ...` . The suffix is trimmed; passing an empty string
leaves the default unchanged.
2025-06-24 17:17:16 -07:00
## Notable Scan Options
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
- `--no-dedup` : Report every occurrence of a finding (disable the default de-duplicate behavior)
2025-09-23 16:27:53 -07:00
- `--no-base64` : By default, Kingfisher finds and decodes base64 blobs and scans them for secrets. This adds a slight performance overhead; use this flag to disable
2025-06-24 17:17:16 -07:00
- `--confidence <LEVEL>` : (low|medium|high)
- `--min-entropy <VAL>` : Override default threshold
- `--no-binary` : Skip binary files
- `--no-extract-archives` : Do not scan inside archives
- `--extraction-depth <N>` : Specifies how deep nested archives should be extracted and scanned (default: 2)
- `--redact` : Replaces discovered secrets with a one-way hash for secure output
2025-07-14 17:09:04 -07:00
- `--exclude <PATTERN>` : Skip any file or directory whose path matches this glob pattern (repeatable, uses gitignore-style syntax, case sensitive)
2025-07-14 13:18:24 -07:00
- `--baseline-file <FILE>` : Ignore matches listed in a baseline YAML file
2025-11-04 14:06:35 -05:00
- `--manage-baseline` : Create or update the baseline file with current findings (automatically enables `--no-dedup` )
2025-08-19 19:18:25 -07:00
- `--skip-regex <PATTERN>` : Ignore findings whose text matches this regex (repeatable)
- `--skip-word <WORD>` : Ignore findings containing this case-insensitive word (repeatable)
2025-10-15 22:47:40 -07:00
- `--skip-aws-account <ACCOUNT_ID>` : Skip live AWS validation for findings tied to the specified AWS account number (repeatable, accepts comma-separated lists)
- `--skip-aws-account-file <FILE>` : Load AWS account numbers to skip from a file (one account per line; `#` comments allowed)
2025-10-10 16:23:41 -07:00
- `--ignore-comment <DIRECTIVE>` : Honor additional inline directives from other scanners (repeatable; e.g. `--ignore-comment "gitleaks:allow"` )
2025-10-09 20:11:31 -07:00
- `--no-ignore` : Disable inline directives entirely so every match is reported
2025-11-05 17:19:11 -08:00
- `--no-ignore-if-contains` : Ignore the `ignore_if_contains` filter in rules so placeholder words still produce findings
2025-09-04 23:52:43 -07:00
## Understanding `--confidence`
The `--confidence` flag sets a minimum confidence threshold, not an exact match.
- If you pass `--confidence medium` , findings with **medium and higher ** confidence (medium + high) will be included.
- If you pass `--confidence low` , you’ ll see **all levels ** (low, medium, high).
2025-08-19 19:18:25 -07:00
### Ignore known false positives
2025-10-09 20:11:31 -07:00
Use `--skip-regex` and `--skip-word` to suppress findings you know are benign. Both flags may be provided multiple times and are tested against the secret value **and ** the full match context.
2025-08-19 19:18:25 -07:00
With `--skip-regex` , these should be Rust compatible regular expressions, which you can test out at [regex101 ](https://regex101.com )
```bash
# Skip any finding where the finding mentions TEST_KEY
kingfisher scan --skip-regex '(?i)TEST_KEY' path/
# Skip findings that contain the word "dummy" anywhere in the match
kingfisher scan --skip-word dummy path/
# Combine multiple patterns
kingfisher scan \
--skip-regex 'AKIA[0-9A-Z]{16}' \
--skip-word placeholder \
--skip-word dummy \
path/
```
If a `--skip-regex` regular expression fails to compile, the scan aborts with an error so that typos are caught early.
2025-06-24 17:17:16 -07:00
2025-10-16 10:50:07 -07:00
### Skip Canary Tokens (AWS)
2025-10-15 22:47:40 -07:00
2025-10-16 10:50:07 -07:00
Canary/honey tokens are intentionally leaked credentials used to catch misuse. Kingfisher can **recognize and skip ** known AWS canary accounts so hygiene scans don’ t set off alerts.
2025-10-15 22:47:40 -07:00
2025-10-16 10:50:07 -07:00
**How to skip**
Pass the 12-digit AWS account IDs for your canaries via `--skip-aws-account` (comma-separated) or `--skip-aws-account-file` (one ID per line; blank lines and `#` comments allowed). Kingfisher also ships with a **pre-seeded (but not exhaustive) ** list of Thinkst Canary account IDs used by canarytokens.org, so many are skipped automatically.
2025-10-15 22:47:40 -07:00
```bash
2025-10-16 10:50:07 -07:00
kingfisher scan /path/to/code \
2025-10-15 22:47:40 -07:00
--skip-aws-account "171436882533,534261010715"
2025-10-16 10:50:07 -07:00
# or combine preloaded canary IDs with a just-created decoy account
printf '999900001111 \n534261010715' > /tmp/canary_accounts.txt
kingfisher scan /path/to/repo \
--skip-aws-account-file /tmp/canary_accounts.txt
2025-10-15 22:47:40 -07:00
```
2025-10-16 10:50:07 -07:00
**What you’ ll see**
2025-10-16 10:50:37 -07:00
Findings tied to a skip-listed account report `Validation: Not Attempted` and note in the `Response:` that the entry came from the skip list:
2025-10-16 10:50:07 -07:00
```bash
AWS SECRET ACCESS KEY => [KINGFISHER.AWS.2]
|Finding.......: <REDACTED>
|Fingerprint...: 2141074333616819500
|Confidence....: medium
|Entropy.......: 5.00
|Validation....: Not Attempted
|__Response....: (skip list entry) AWS validation not attempted for account 171436882533.
|Language......: Unknown
|Line Num......: 21
2025-10-16 10:54:48 -07:00
|Path..........: /tmp/test_canary_accounts.log
2025-10-16 10:50:07 -07:00
```
**Why this matters**
Skipping prevents noisy tripwires in prod telemetry while keeping the status explicit—“Not Attempted” isn’ t a pass. If needed, verify these credentials out-of-band or with a safe, non-triggering method.
2025-10-15 22:47:40 -07:00
#### Common CLI flows
```bash
# Skip a few in-house canaries during a filesystem scan
kingfisher scan repo/ \
2025-10-16 10:50:07 -07:00
--skip-aws-account "111122223333,444455556666"
2025-10-15 22:47:40 -07:00
2025-10-16 10:50:07 -07:00
# Read a longer list from disk
2025-10-15 22:47:40 -07:00
kingfisher scan repo/ \
2025-10-16 10:50:07 -07:00
--skip-aws-account-file /tmp/scripts/canary_accounts.txt
2025-10-15 22:47:40 -07:00
# Combine preloaded canary IDs with a just-created decoy account
2025-10-16 10:50:07 -07:00
printf '999900001111\n534261010715\n' > /tmp/new_canary.txt
2025-10-15 22:47:40 -07:00
kingfisher scan /path/to/repo \
--skip-aws-account-file /tmp/new_canary.txt
```
Tip: if you manage multiple canary fleets (Thinkst, self-hosted alternatives, or bespoke decoys), checkpoint the account IDs alongside your infrastructure-as-code so security teams can rotate or expand the skip list without editing pipelines.
2025-10-11 12:36:35 -07:00
### Inline ignore directives
2025-10-11 15:27:21 -07:00
Add `kingfisher:ignore` anywhere on the same line as a finding to silence it. Multi-line strings and PEM-style blocks may also be ignored by placing the directive on the closing delimiter line (for example, `""" # kingfisher:ignore` ), on the next logical line after the string, **or ** on a comment immediately before the value:
2025-10-11 12:36:35 -07:00
```python
# kingfisher:ignore
API_KEY = """
line 1
line 2
"""
# kingfisher:ignore
```
Kingfisher searches the surrounding lines for these tokens without requiring language-specific comment markers. To reuse existing inline directives from other scanners, add them with repeatable `--ignore-comment` flags (for example `--ignore-comment "gitleaks:allow" --ignore-comment "NOSONAR"` ). Use `--no-ignore` when you want to disable inline suppressions entirely.
2025-06-24 17:17:16 -07:00
## Finding Fingerprint
2025-06-28 07:08:22 -07:00
The document below details the four-field formula (rule SHA-1, origin label, start & end offsets) hashed with XXH3-64 to create Kingfisher’ s 64-bit finding fingerprint, and explains how this ID powers safe deduplication; plus how `--no-dedup` can be used shows every raw match.
2025-06-24 17:17:16 -07:00
See ([docs/FINGERPRINT.md ](docs/FINGERPRINT.md ))
2025-06-25 17:23:35 -07:00
## Rule Performance Profiling
2025-06-28 07:08:22 -07:00
Use `--rule-stats` to collect timing information for every rule. After scanning, the summary prints a **Rule Performance Stats ** section showing how many matches each rule produced along with its slowest and average match times. Useful when creating rules or debugging rules.
2025-06-25 17:23:35 -07:00
2025-06-24 17:17:16 -07:00
## CLI Options
2025-06-28 07:08:22 -07:00
2025-06-24 17:17:16 -07:00
```bash
kingfisher scan --help
```
2025-08-27 15:35:01 -07:00
2025-10-31 16:21:23 -07:00
## Lineage and Evolution
Kingfisher began as an internal fork of Nosey Parker, used as a high-performance foundation for secret detection.
2025-08-27 15:35:01 -07:00
2025-10-31 16:21:23 -07:00
Since then it has evolved far beyond that starting point, introducing live validation, hundreds of new rules, additional scan targets, and major architectural changes across nearly every subsystem.
2025-08-27 15:35:01 -07:00
2025-10-31 16:21:23 -07:00
**Key areas of evolution**
- **Live validation** of detected secrets directly within rules
- **Hundreds of new built-in rules** and an expanded YAML rule schema
- **Baseline management** to suppress known findings over time
- **Tree-sitter parsing** layered on Hyperscan for language-aware detection
- **More scan targets** (GitLab, Bitbucket, Gitea, Jira, Confluence, Slack, S3, GCS, Docker, Hugging Face, etc.)
2025-10-31 16:22:48 -07:00
- **Compressed Files** scanning support added
2025-10-31 16:21:23 -07:00
- **New storage model** (in-memory + Bloom filter, replacing SQLite)
- **Unified workflow** with JSON/BSON/SARIF outputs
- **Cross-platform builds** for Linux, macOS, and Windows
2025-08-27 15:35:01 -07:00
2025-06-24 17:17:16 -07:00
# Roadmap
2025-06-28 07:08:22 -07:00
- More rules
2025-07-29 20:54:22 -07:00
- More targets
2025-08-19 09:30:26 -07:00
- Please file a [feature request ](https://github.com/mongodb/kingfisher/issues ), or open a PR, if you have features you'd like added
2025-06-24 17:17:16 -07:00
# License
[Apache2 License ](LICENSE )