Deployment Strategies¶
This guide summarizes practical ways to deploy Kingfisher in teams, CI systems, and shared security workflows.
Deployment Models¶
Self-Serve CLI¶
Best for developers, security engineers, and incident responders who want a local tool.
- Install via Homebrew, mise, PyPI, Docker, or release binaries.
- Run scans directly against local repositories, remote git hosts, cloud storage, chat exports, and other supported inputs.
- Use
--format jsonfor scripts and automation. Other options includeprettyfor interactive terminals,toonfor token-efficient LLM input,sariffor code-scanning integrations, andhtmlfor audit reports.
Good fit:
- local triage
- ad hoc repo reviews
- one-off credential validation or revocation
- pre-commit and developer workstation enforcement
See:
CI and Pre-Commit¶
Best for preventing new secrets from landing in repositories.
- Run
kingfisher scanin CI against the working tree or a branch diff. - Use pre-commit hooks for developer-side enforcement before code is pushed.
- Emit SARIF when integrating with code scanning or security dashboards.
Common patterns:
- scan the entire repository on protected branches
- scan only changed content in pull request workflows
- fail builds on findings or validated findings depending on policy
See:
Centralized Security Scanning¶
Best for security teams scanning many repositories or data sources from a controlled environment.
- Run Kingfisher from a dedicated automation host, container job, or scheduled workflow.
- Store platform credentials in your existing secret manager and inject them at runtime.
- Prefer structured outputs like JSON, SARIF, or HTML for downstream ingestion and review.
- Use
--blast-radiuswhen you are authorized to assess blast radius for validated credentials.
Typical centralized inputs:
- GitHub, GitLab, Gitea, Bitbucket, Azure Repos, Hugging Face
- Jira, Confluence, Slack, Microsoft Teams
- S3, GCS, Azure Blob Storage, Hugging Face buckets, and Docker images
See:
Embedded Library Usage¶
Best when you want Kingfisher scanning inside a Rust, Python, or Node.js application or service.
- Use
kingfisher-corefor shared content and location types. - Use
kingfisher-rulesto load or compile rules. - Use
kingfisher-scannerfor the embeddable scanning API. - Install
kingfisher-secret-scannerand importkingfisher_sdkfor Python. - For JavaScript/TypeScript, the
kingfisher-secret-scannernpm SDK is versioned independently of the CLI, Python SDK, and Rust crates. The prepared stable release is 1.1.0. The SDK calls the same Rust crates in process through Node-API. - For Python services, prewarm the compiled rule cache during image construction with the same SDK wheel, rules and confidence used at startup. Give the runtime account ownership of both the directory and files;
COPY --chownsupports root builds with a non-root service. See the container prewarming guide. - Compose local input enumeration and extraction explicitly; detection stays offline, while validation and revocation are separate calls.
This model is useful for:
- internal developer platforms
- custom ingestion pipelines
- security automation services
- specialized report generation
See:
For a source checkout, follow the canonical Node SDK build/test steps. These build locally without publication. The JavaScript guide above covers supported platforms, Linux GNU runtime requirements (no musl) and Windows VC++ Redistributables; the runnable recipes show composable inputs and redacted reports.
Operational Guidance¶
- Start with self-serve or CI deployment before building centralized automation.
- Prefer scoped credentials for integrations and validation.
- Use structured output formats when results are consumed by other systems.
- Treat
--blast-radius, validation, and revocation as privileged operations and run them only where authorized. - Keep rules and binaries updated together so documentation, features, and provider coverage stay aligned.