From qa-secrets
Configures and runs Kingfisher - MongoDB-built Rust-based secret scanner combining Intel Hyperscan regex engine with language-aware parsing; ships 950 built-in detection rules with **live secret validation** and offline checksum verification; multi-target (local files / Git history / GitHub / GitLab / AWS S3 / Docker images); browser-based report viewer; suppression via `--skip-regex` / `--skip-word` / `--baseline-file` / inline `kingfisher:ignore`. Use when the team needs the broadest rule coverage + Hyperscan performance, or wants the modern alternative to gitleaks/trufflehog.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qa-secrets:kingfisher-scanningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Per [github.com/mongodb/kingfisher][kf-gh]:
Per github.com/mongodb/kingfisher:
"Kingfisher is an open source secret scanner and live secret validation tool built in Rust."
Three differentiating capabilities:
For battle-tested defaults, gitleaks-scanning
or trufflehog-scanning are
lower-risk picks.
Per kf-gh:
# Homebrew (Linux/macOS)
brew install kingfisher
# PyPI via uv
uv tool install kingfisher-bin
# Install script (Linux/macOS)
curl -sSL https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher.sh | bash
# Docker
docker run --rm -v "$PWD":/src ghcr.io/mongodb/kingfisher:latest scan /src
Per kf-gh:
kingfisher scan /path/to/code --view-report
The --view-report flag opens results in the browser viewer
(useful for triage; less useful in CI).
For CI:
kingfisher scan /path/to/code --output kingfisher-report.json --format json
Multi-target scanning per kf-gh:
# Git history
kingfisher git /path/to/repo
# GitHub organization
kingfisher github --org=acme
# AWS S3
kingfisher s3 --bucket my-bucket
# Docker image
kingfisher docker my-image:latest
(Verify exact subcommand syntax against current Kingfisher release - the surface evolves.)
Per kf-gh: "Confirms discovered secrets against provider APIs to reduce false positives."
Same model as TruffleHog's verification - discovered candidates are tested against the provider API to confirm they're real, unexpired credentials. The output distinguishes verified vs unverified findings; CI gating typically uses verified-only for PR-blocking.
Plus per kf-gh: "Validates tokens with built-in checksums offline, eliminating many false positives." Some providers (AWS keys, Stripe keys) include checksums that Kingfisher validates without making API calls - fast + no audit-log impact.
Per kf-gh: "Maps discovered credentials to their effective cloud identities and exposed resources."
When a leaked AWS key is discovered, Kingfisher can (with appropriate permissions) report:
This turns a finding from "leaked AWS key" into "leaked AWS key
that could s3:GetObject from prod-customer-data bucket" - a
much sharper severity signal.
This requires Kingfisher to have read-only API access to the cloud account; configure via standard cloud-SDK credential mechanisms.
Per kf-gh suppression options:
| Mechanism | Use |
|---|---|
--skip-regex '(?i)PATTERN' | Skip matches matching a regex pattern |
--skip-word WORD | Exclude specific words from detection |
--baseline-file <path> | Suppress known findings tracked in a baseline |
Inline kingfisher:ignore | In-code per-line suppression |
Baseline workflow:
# Create baseline (current state of findings)
kingfisher scan /path/to/code --output kingfisher-baseline.json
# Apply baseline (only NEW findings fail)
kingfisher scan /path/to/code --baseline-file kingfisher-baseline.json
Justification template (mandatory in baseline file or sibling REASONS.md):
# kingfisher-baseline-reasons.md
# Each entry in kingfisher-baseline.json should have an entry here.
GHSA-2024-aws-key-fixture:
files: [tests/fixtures/aws-credentials.json]
reason: "Test fixture; uses dummy AWS credentials for SDK init tests"
approved-by: [email protected]
re-review-date: 2026-09-15
For inline:
# kingfisher:ignore
# Reason: SDK initialization fixture; not a real credential
# Approved-by: [email protected]
# Re-review-date: 2026-09-15
DUMMY_AWS_KEY = "AKIAIOSFODNN7EXAMPLE"
Cadence: every quarter, audit kingfisher-baseline-reasons.md +
inline kingfisher:ignore comments; expired re-review dates removed.
Kingfisher is newer; first-party CI integrations are still maturing. Pattern (verify against current docs):
jobs:
kingfisher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with: { fetch-depth: 0 }
- run: |
curl -sSL https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher.sh | bash
- run: kingfisher scan . --baseline-file .kingfisher-baseline.json --format json --output kingfisher.json
- uses: actions/upload-artifact@v4
if: always()
with: { name: kingfisher-report, path: kingfisher.json }
Three secret scanners in this plugin overlap deliberately:
| Tool | Sweet spot |
|---|---|
| gitleaks | Pre-commit (fastest, mature) |
| trufflehog | High-precision verified findings, multi-source |
| kingfisher | Largest rule set + access mapping; modern stack |
For maximum coverage, run all three in CI and combine output via a unified triager. For minimum coverage, gitleaks (pre-commit) + trufflehog (CI verified-only) is the conservative pick.
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Run kingfisher without baseline | Legacy findings flood PR | Baseline + diff (Step 5) |
| Suppress without REASONS doc | No audit trail | Mandatory template (Step 5) |
| Skip access-mapping config | Findings lack severity context | Configure cloud read-only access (Step 4) |
| Trust unverified findings as real | False positives drown signal | Verified-only filter (when supported by current version) |
Pin to kingfisher:latest Docker tag | Breaking changes mid-release | Pin specific version (v0.5.0 etc.) |
gitleaks-scanning,
trufflehog-scanning -
sister scannerssecrets-rotation-runner -
rotation workflow after detectionnpx claudepluginhub testland/qa --plugin qa-secretsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.