pleno-dlp

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: AGPL-3.0

README

pleno-dlp

Trufflehog-compatible DLP scanner — secrets and PII — over the local filesystem, git history, stdin, and SaaS content. AGPL-3.0.

go install github.com/plenoai/pleno-dlp/cmd/pleno-dlp@latest

pleno-dlp scan filesystem ./repo
pleno-dlp scan git --repo ./repo --max-depth 200
git diff | pleno-dlp scan stdin --label git-diff
pleno-dlp scan filesystem ./repo --format sarif --verify > findings.sarif
pleno-dlp detectors list                        # audit registered coverage

Two surfaces in one repo. Pick the one that matches your scan target:

  • Go binary (cmd/pleno-dlp/, this README) — filesystem, local git history, and stdin. Trufflehog-compatible detector interface, archive-aware (zip / tar / tar.gz / gzip), base64 / percent / hex decoder pipeline. 77 detectors built-in (73 secrets + 4 PII). Tag pattern vX.Y.Z.
  • Python package (python/) — SaaS sources via saas-retriever (GitHub, GitLab, Bitbucket, Slack, Notion, Confluence, Jira). Backends: trufflehog / gitleaks / native (regex) for secrets; pii for delegated PII inference. Tag pattern py-vX.Y.Z. See python/README.md.

Detector coverage

77 built-in detectors. Every secret detector that can confirm against an upstream provider implements Verify (run with --verify); the rest emit Verified=false with rotation guidance in the output.

Class Providers
Cloud / infra AWS, GCP service-account, Azure storage key, DigitalOcean, Cloudflare, Heroku, Render, Fly.io, Vercel, Netlify, Terraform Cloud, Dropbox
VCS / dev tooling GitHub PAT, GitLab PAT, Bitbucket Cloud, npm, PyPI, Hugging Face, Postman, Atlassian, Jira, Confluence, Buildkite, CircleCI
AI OpenAI, Anthropic, Cohere, Replicate, Mistral, Groq, OpenRouter, Together
Comms / SaaS Slack bot, Slack webhook, Discord, Twilio, SendGrid, Mailgun, Mailchimp, Brevo, Postmark, Notion, Linear, Asana, Mixpanel, Segment, Telegram, Okta, HubSpot, Intercom, Salesforce refresh, Spotify
Observability Datadog, Sentry, New Relic, PagerDuty, Shodan, VirusTotal
Payments / data Stripe, Square, PayPal, Plaid, MongoDB Atlas
Format-shaped JWT, PEM private keys, Generic high-entropy (catch-all near credential keywords)
Secrets management / IAM AzureAD, Doppler, Vault, Algolia, Airtable, Grafana, LaunchDarkly, Auth0, Snyk
PII (finding_class=pii) Email, US SSN, Credit card (Luhn-validated), IBAN (mod-97 validated)

Run pleno-dlp detectors list for the live registry, or pleno-dlp detectors list --format json for machine-readable output.

Add org-specific patterns without forking the binary — see Custom rules below.

Severity and CI gating

Every finding carries a Severity:

When Severity
Verified=true Critical
Unverified explicit secret detector High
Generic high-entropy / JWT / PEM unverified Medium
PII (any kind) Medium

--fail-on chooses what blocks the build:

pleno-dlp scan filesystem ./repo --fail-on critical    # only Critical = exit 1
pleno-dlp scan filesystem ./repo --fail-on high        # High and Critical
pleno-dlp scan filesystem ./repo                       # default: any finding

SARIF output maps Severity to GitHub Code Scanning levels (Critical/High → error, Medium → warning, Low/Info → note). partialFingerprints carries secret/v1 (sha256(detector|raw)) so GitHub dedups the same leak across PRs.

Allowlist (mute known false positives)

--allowlist <path> plus auto-discovery of .pleno-allow.json from the process cwd. Entries match by detector type, raw secret literal, raw secret regex, and path glob (AND across non-empty fields):

{
  "entries": [
    {"detector": "AWS", "raw": "AKIAIOSFODNN7EXAMPLE",
     "reason": "trufflehog dummy"},
    {"path": "fixtures/**/*.env",
     "reason": "local test fixtures"},
    {"raw_regex": "^sk-test_",
     "reason": "Stripe test-mode keys"},
    {"detector": "PIIEmail", "path": "docs/**",
     "reason": "documented contact emails"}
  ]
}

Suppression count surfaces on stderr (allowlist: suppressed N), flagging stale rules.

Custom rules

JSON file passed via --rules:

[
  {
    "name": "ACME Internal API Key",
    "keywords": ["ACME_API_KEY", "x-acme-token"],
    "regex": "ACME_[A-Z0-9]{20}",
    "entropy_min": 3.5,
    "severity": "high",
    "verify_url": "https://api.acme.example/verify",
    "verify_header": "Authorization: Bearer {{ .Secret }}"
  }
]

keywords are required — they gate the regex from running on every chunk. verify_url is optional; 200 = verified, 401/403 = unverified, transport errors surface as VerificationErr.

pleno-dlp scan filesystem ./repo --rules ./acme-rules.json

Decoding and archives

The engine expands every chunk through:

  1. Archive walker — zip, tar, tar.gz, plain gzip, recursively up to depth 4 (configurable). Inner entries carry ExtraData["archive_path"] = "outer.zip!inner.tar.gz!leak.env" so the trail is visible in output.
  2. Decoder pipeline — base64 (std + url-safe), percent-encoded, hex (≥40 chars). Decoded variants are scanned alongside the original; hits stamp ExtraData["decoded_from"].

A printable-byte gate keeps binary noise from reaching detectors. Hard limits (50 MiB per entry, 200 MiB total expanded, depth cap) defuse zip-bomb DoS.

Sources

# Filesystem (recursive walk)
pleno-dlp scan filesystem ./repo \
  --include 'src/**' --exclude '**/*_test.go' \
  --no-default-excludes  # opt-in: re-scan .git, node_modules, vendor, ...

# Local git history
pleno-dlp scan git --repo ./repo --branch main --max-depth 500
pleno-dlp scan git --repo ./repo --since 2024-01-01T00:00:00Z

# Stdin (one chunk read from os.Stdin)
git diff | pleno-dlp scan stdin --label git-diff
kubectl get secret app-config -o yaml | pleno-dlp scan stdin

Default filesystem excludes (.git, .hg, .svn, node_modules, vendor, target, dist, build, __pycache__, .venv, .tox) keep most scans tractable; pass --no-default-excludes to opt out.

Output formats

--format table       # human-readable, default
--format json        # array of findings, machine-parseable
--format sarif       # SARIF 2.1.0, GitHub Code Scanning compliant

Pipe SARIF to GitHub Code Scanning:

# .github/workflows/secret-scan.yml
- run: pleno-dlp scan filesystem . --format sarif > findings.sarif
- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: findings.sarif

Shell completions

source <(pleno-dlp completion bash)
pleno-dlp completion zsh > "${fpath[1]}/_pleno-dlp"
pleno-dlp completion fish | source
pleno-dlp completion powershell | Out-String | Invoke-Expression

Install

# Latest release
go install github.com/plenoai/pleno-dlp/cmd/pleno-dlp@latest

# Pre-built archive (linux / darwin / windows × amd64 / arm64)
# https://github.com/plenoai/pleno-dlp/releases — every release
# ships a syft SBOM alongside each archive.

# From source
git clone https://github.com/plenoai/pleno-dlp
cd pleno-dlp
go build ./cmd/pleno-dlp

Development

go test ./... -race    # full test suite, race-clean
go build ./...

Releases trigger exclusively on tag push:

  • vX.Y.Z → Go binary release via GoReleaser trusted publishing.
  • py-vX.Y.Z → Python package release to PyPI via trusted publishing.

main push runs build + tests only.

License

AGPL-3.0 — matching pleno-anonymize.

Directories

Path Synopsis
cmd
pleno-dlp command
Command pleno-dlp is a Go-native secret scanner with a trufflehog-compatible detector layer and a fresh source-connector layer.
Command pleno-dlp is a Go-native secret scanner with a trufflehog-compatible detector layer and a fresh source-connector layer.
pleno-dlp/cmd
Shell completion generation.
Shell completion generation.
pkg
archive
Package archive expands a byte slice that looks like a container file (zip, tar, tar.gz, plain gzip) into its inner entries so detectors run against the contents instead of the compressed envelope.
Package archive expands a byte slice that looks like a container file (zip, tar, tar.gz, plain gzip) into its inner entries so detectors run against the contents instead of the compressed envelope.
decoder
Package decoder expands a chunk of bytes into the original plus any decoded variants worth re-scanning.
Package decoder expands a chunk of bytes into the original plus any decoded variants worth re-scanning.
detectors
Package detectors defines the trufflehog-compatible Detector interface and the Result shape returned to the engine.
Package detectors defines the trufflehog-compatible Detector interface and the Result shape returned to the engine.
detectors/airtable
Package airtable detects Airtable PATs (`pat<14>.<64-hex>`) and the legacy `key<14>` API keys, verifying via /v0/meta/bases.
Package airtable detects Airtable PATs (`pat<14>.<64-hex>`) and the legacy `key<14>` API keys, verifying via /v0/meta/bases.
detectors/algolia
Package algolia detects Algolia admin API keys (32 lowercase hex) and optionally pairs them with the application id when one is in scope.
Package algolia detects Algolia admin API keys (32 lowercase hex) and optionally pairs them with the application id when one is in scope.
detectors/all
Package all blank-imports every concrete detector so that their init() functions run and register themselves with pkg/detectors.
Package all blank-imports every concrete detector so that their init() functions run and register themselves with pkg/detectors.
detectors/anthropic
Package anthropic detects Anthropic API keys (sk-ant-…) and verifies them with a 1-token /v1/messages probe.
Package anthropic detects Anthropic API keys (sk-ant-…) and verifies them with a 1-token /v1/messages probe.
detectors/asana
Package asana detects Asana personal access tokens (PAT shape: 1/<16 digits>/<32 hex>) and verifies them against /users/me.
Package asana detects Asana personal access tokens (PAT shape: 1/<16 digits>/<32 hex>) and verifies them against /users/me.
detectors/atlassian
Package atlassian detects Atlassian Cloud API tokens (24-char base62).
Package atlassian detects Atlassian Cloud API tokens (24-char base62).
detectors/auth0
Package auth0 detects Auth0 management API tokens (long JWT-shaped strings) when an "auth0" keyword sits in the same chunk window.
Package auth0 detects Auth0 management API tokens (long JWT-shaped strings) when an "auth0" keyword sits in the same chunk window.
detectors/aws
Package aws detects AWS access key id / secret access key pairs and optionally verifies them via sts:GetCallerIdentity.
Package aws detects AWS access key id / secret access key pairs and optionally verifies them via sts:GetCallerIdentity.
detectors/awssession
Package awssession detects AWS temporary session credential triples (ASIA<16>) — access-key-id with paired secret access key and session token.
Package awssession detects AWS temporary session credential triples (ASIA<16>) — access-key-id with paired secret access key and session token.
detectors/azuread
Package azuread detects Azure AD (Entra ID) application client secrets and pairs them with the application's client id (UUID) when one is in scope.
Package azuread detects Azure AD (Entra ID) application client secrets and pairs them with the application's client id (UUID) when one is in scope.
detectors/azuresas
Package azuresas detects Azure Storage SAS (Shared Access Signature) URLs embedding the `sig=` query parameter.
Package azuresas detects Azure Storage SAS (Shared Access Signature) URLs embedding the `sig=` query parameter.
detectors/bitbucketcloud
Package bitbucketcloud detects Bitbucket Cloud repository / workspace / project access tokens (`ATCTT3xFfGF0…` and the legacy 32-char base62 app passwords) and verifies them as Bearer credentials against /2.0/user.
Package bitbucketcloud detects Bitbucket Cloud repository / workspace / project access tokens (`ATCTT3xFfGF0…` and the legacy 32-char base62 app passwords) and verifies them as Bearer credentials against /2.0/user.
detectors/bitbucketserver
Package bitbucketserver detects Bitbucket Server (Data Center, formerly Stash) HTTP access tokens and personal access tokens.
Package bitbucketserver detects Bitbucket Server (Data Center, formerly Stash) HTTP access tokens and personal access tokens.
detectors/brevo
Package brevo detects Brevo (formerly Sendinblue) API keys (xkeysib-<64 hex>-<16 alnum>) and verifies them against /v3/account.
Package brevo detects Brevo (formerly Sendinblue) API keys (xkeysib-<64 hex>-<16 alnum>) and verifies them against /v3/account.
detectors/bugsnag
Package bugsnag detects Bugsnag API keys (32 hex near the `bugsnag` keyword).
Package bugsnag detects Bugsnag API keys (32 hex near the `bugsnag` keyword).
detectors/buildkite
Package buildkite detects Buildkite agent tokens (`bkua_<40 hex>`) and API access tokens (`bka_<40 alnum>` or 40-char hex with the "buildkite" keyword), verifying API tokens against /v2/user.
Package buildkite detects Buildkite agent tokens (`bkua_<40 hex>`) and API access tokens (`bka_<40 alnum>` or 40-char hex with the "buildkite" keyword), verifying API tokens against /v2/user.
detectors/circleci
Package circleci detects CircleCI personal API tokens (`CCIPRJ_<43>` for project tokens, or 40-char hex personal API tokens with the "circleci" keyword), verifying via /api/v2/me with the Circle-Token header.
Package circleci detects CircleCI personal API tokens (`CCIPRJ_<43>` for project tokens, or 40-char hex personal API tokens with the "circleci" keyword), verifying via /api/v2/me with the Circle-Token header.
detectors/cloudflare
Package cloudflare detects Cloudflare API tokens (40-char URL-safe) when they appear near a "cloudflare" or CF_API_TOKEN keyword, and verifies them at /client/v4/user/tokens/verify.
Package cloudflare detects Cloudflare API tokens (40-char URL-safe) when they appear near a "cloudflare" or CF_API_TOKEN keyword, and verifies them at /client/v4/user/tokens/verify.
detectors/codecov
Package codecov detects Codecov upload tokens (UUID near the `codecov` keyword) and verifies them by POSTing to /upload/v4 — the upload endpoint honours the token and responds 200 (with a presigned upload URL body) when the token is valid for the corresponding repo.
Package codecov detects Codecov upload tokens (UUID near the `codecov` keyword) and verifies them by POSTing to /upload/v4 — the upload endpoint honours the token and responds 200 (with a presigned upload URL body) when the token is valid for the corresponding repo.
detectors/cohere
Package cohere detects Cohere API keys (40-char base62) and verifies them against /v1/check-api-key.
Package cohere detects Cohere API keys (40-char base62) and verifies them against /v1/check-api-key.
detectors/confluence
Package confluence detects Atlassian Confluence API tokens (24-char base62) near a "confluence" keyword.
Package confluence detects Atlassian Confluence API tokens (24-char base62) near a "confluence" keyword.
detectors/custom
Package custom turns a JSON config file into runtime Detector objects so teams can add org-specific patterns ("ACME_API_KEY=…", internal token prefixes, license-key shapes) without forking the binary.
Package custom turns a JSON config file into runtime Detector objects so teams can add org-specific patterns ("ACME_API_KEY=…", internal token prefixes, license-key shapes) without forking the binary.
detectors/datadog
Package datadog detects Datadog API keys (32 hex) optionally paired with Application keys (40 hex), and verifies them via /api/v1/validate.
Package datadog detects Datadog API keys (32 hex) optionally paired with Application keys (40 hex), and verifies them via /api/v1/validate.
detectors/digitalocean
Package digitalocean detects DigitalOcean personal access tokens (dop_v1_<64 hex>) and verifies them via /v2/account.
Package digitalocean detects DigitalOcean personal access tokens (dop_v1_<64 hex>) and verifies them via /v2/account.
detectors/discord
Package discord detects Discord bot tokens (`<base64-id>.<base64-ts>.<hmac>`) and verifies them against /users/@me with the `Bot <token>` Authorization scheme.
Package discord detects Discord bot tokens (`<base64-id>.<base64-ts>.<hmac>`) and verifies them against /users/@me with the `Bot <token>` Authorization scheme.
detectors/doppler
Package doppler detects Doppler service tokens (`dp.<scope>.<base64>` — scope is `st` for service tokens, `pt` for personal, `ct` for CLI).
Package doppler detects Doppler service tokens (`dp.<scope>.<base64>` — scope is `st` for service tokens, `pt` for personal, `ct` for CLI).
detectors/dropbox
Package dropbox detects Dropbox short-lived access tokens (`sl.…`) and long-lived app/refresh tokens, verifying them via /2/users/get_current_account.
Package dropbox detects Dropbox short-lived access tokens (`sl.…`) and long-lived app/refresh tokens, verifying them via /2/users/get_current_account.
detectors/figma
Package figma detects Figma personal access tokens (`figd_…` legacy / `figpat_…` 2024+ format) and verifies them against /v1/me using the documented `X-Figma-Token` header.
Package figma detects Figma personal access tokens (`figd_…` legacy / `figpat_…` 2024+ format) and verifies them against /v1/me using the documented `X-Figma-Token` header.
detectors/flyio
Package flyio detects Fly.io macaroon tokens (fm1_/fm2_ prefixes) and verifies them by hitting the Machines API.
Package flyio detects Fly.io macaroon tokens (fm1_/fm2_ prefixes) and verifies them by hitting the Machines API.
detectors/gcp
Package gcp detects Google Cloud service-account JSON credentials and verifies them by exchanging a self-signed RS256 JWT for an OAuth2 access token at https://oauth2.googleapis.com/token.
Package gcp detects Google Cloud service-account JSON credentials and verifies them by exchanging a self-signed RS256 JWT for an OAuth2 access token at https://oauth2.googleapis.com/token.
detectors/gcpapikey
Package gcpapikey detects Google Cloud / Firebase API keys (`AIza` + 35).
Package gcpapikey detects Google Cloud / Firebase API keys (`AIza` + 35).
detectors/gcpoauth
Package gcpoauth detects Google OAuth 2.0 refresh tokens (`1//0e…`).
Package gcpoauth detects Google OAuth 2.0 refresh tokens (`1//0e…`).
detectors/generic
Package generic is the catch-all detector that fires on high-entropy strings adjacent to a credential keyword.
Package generic is the catch-all detector that fires on high-entropy strings adjacent to a credential keyword.
detectors/github
Package github detects GitHub Personal Access Tokens (classic and fine-grained) and verifies them against api.github.com/user.
Package github detects GitHub Personal Access Tokens (classic and fine-grained) and verifies them against api.github.com/user.
detectors/gitlab
Package gitlab detects GitLab Personal Access Tokens (glpat-…) and verifies them against api/v4/personal_access_tokens/self.
Package gitlab detects GitLab Personal Access Tokens (glpat-…) and verifies them against api/v4/personal_access_tokens/self.
detectors/gitlabdeploy
Package gitlabdeploy detects GitLab project / group / deploy tokens (`gldt-` prefix and adjacent variants) — distinct from the user PAT (`glpat-`) owned by `pkg/detectors/gitlab`.
Package gitlabdeploy detects GitLab project / group / deploy tokens (`gldt-` prefix and adjacent variants) — distinct from the user PAT (`glpat-`) owned by `pkg/detectors/gitlab`.
detectors/grafana
Package grafana detects Grafana service-account tokens (`glsa_<32>_<8 hex>`).
Package grafana detects Grafana service-account tokens (`glsa_<32>_<8 hex>`).
detectors/groq
Package groq detects Groq Cloud API keys (`gsk_…`) and verifies them against /openai/v1/models.
Package groq detects Groq Cloud API keys (`gsk_…`) and verifies them against /openai/v1/models.
detectors/heroku
Package heroku detects Heroku API tokens (UUIDs) and verifies them against /account.
Package heroku detects Heroku API tokens (UUIDs) and verifies them against /account.
detectors/honeycomb
Package honeycomb detects Honeycomb API keys (`hcaik_…` ingest keys, plus the legacy 32-hex shape near the `honeycomb` keyword) and verifies them against /1/auth using the documented `X-Honeycomb-Team` header.
Package honeycomb detects Honeycomb API keys (`hcaik_…` ingest keys, plus the legacy 32-hex shape near the `honeycomb` keyword) and verifies them against /1/auth using the documented `X-Honeycomb-Team` header.
detectors/hubspot
Package hubspot detects HubSpot Private App access tokens (pat-...) and verifies them against /integrations/v1/me.
Package hubspot detects HubSpot Private App access tokens (pat-...) and verifies them against /integrations/v1/me.
detectors/huggingface
Package huggingface detects HuggingFace user access tokens (hf_…) and verifies them via /api/whoami-v2.
Package huggingface detects HuggingFace user access tokens (hf_…) and verifies them via /api/whoami-v2.
detectors/intercom
Package intercom detects Intercom access tokens (`dG9rOg…` — base64 of "tok:") and verifies them against /me.
Package intercom detects Intercom access tokens (`dG9rOg…` — base64 of "tok:") and verifies them against /me.
detectors/jira
Package jira detects Atlassian Jira API tokens (24-char base62) near a "jira" / "atlassian" keyword.
Package jira detects Atlassian Jira API tokens (24-char base62) near a "jira" / "atlassian" keyword.
detectors/jwt
Package jwt detects JSON Web Tokens (header.payload.signature, base64url encoded) and surfaces the iss/sub claims in ExtraData.
Package jwt detects JSON Web Tokens (header.payload.signature, base64url encoded) and surfaces the iss/sub claims in ExtraData.
detectors/klaviyo
Package klaviyo detects Klaviyo private (`pk_…`) and public (`sk_…`) API keys and verifies them against /api/v2/profiles using the documented `Authorization: Klaviyo-API-Key …` header.
Package klaviyo detects Klaviyo private (`pk_…`) and public (`sk_…`) API keys and verifies them against /api/v2/profiles using the documented `Authorization: Klaviyo-API-Key …` header.
detectors/launchdarkly
Package launchdarkly detects LaunchDarkly access (`api-<uuid>`) and SDK (`sdk-<uuid>`) keys, verifying access keys against /api/v2/projects.
Package launchdarkly detects LaunchDarkly access (`api-<uuid>`) and SDK (`sdk-<uuid>`) keys, verifying access keys against /api/v2/projects.
detectors/linear
Package linear detects Linear personal API keys (lin_api_<40>) and verifies them against the GraphQL endpoint.
Package linear detects Linear personal API keys (lin_api_<40>) and verifies them against the GraphQL endpoint.
detectors/mailchimp
Package mailchimp detects Mailchimp API keys (32 hex + "-us" + dc number) and verifies them against the per-datacenter API root.
Package mailchimp detects Mailchimp API keys (32 hex + "-us" + dc number) and verifies them against the per-datacenter API root.
detectors/mailgun
Package mailgun detects Mailgun API keys (legacy "key-..." and the newer "<32 hex>-<8 hex>-<8 hex>" shape) and verifies them against /v3/domains using HTTP Basic auth (api:<key>).
Package mailgun detects Mailgun API keys (legacy "key-..." and the newer "<32 hex>-<8 hex>-<8 hex>" shape) and verifies them against /v3/domains using HTTP Basic auth (api:<key>).
detectors/mistral
Package mistral detects Mistral AI API keys (32-char base62) and verifies them against /v1/models.
Package mistral detects Mistral AI API keys (32-char base62) and verifies them against /v1/models.
detectors/mixpanel
Package mixpanel detects Mixpanel service-account credentials.
Package mixpanel detects Mixpanel service-account credentials.
detectors/mongodbatlas
Package mongodbatlas detects MongoDB Atlas Programmatic API key pairs (8-char public key + UUID-shaped private key) and verifies them against /api/atlas/v2/orgs.
Package mongodbatlas detects MongoDB Atlas Programmatic API key pairs (8-char public key + UUID-shaped private key) and verifies them against /api/atlas/v2/orgs.
detectors/netlify
Package netlify detects Netlify personal access tokens (nfp_<40>) and verifies them against /api/v1/user.
Package netlify detects Netlify personal access tokens (nfp_<40>) and verifies them against /api/v1/user.
detectors/newrelic
Package newrelic detects New Relic keys in three flavors:
Package newrelic detects New Relic keys in three flavors:
detectors/notion
Package notion detects Notion integration tokens (secret_<43>) and verifies them against /v1/users/me.
Package notion detects Notion integration tokens (secret_<43>) and verifies them against /v1/users/me.
detectors/npm
Package npm detects npm automation/granular tokens (npm_…) and verifies them against registry.npmjs.org/-/whoami.
Package npm detects npm automation/granular tokens (npm_…) and verifies them against registry.npmjs.org/-/whoami.
detectors/okta
Package okta detects Okta API tokens (00...
Package okta detects Okta API tokens (00...
detectors/openai
Package openai detects OpenAI API keys (sk-…, sk-proj-…) and verifies them against the /v1/models endpoint.
Package openai detects OpenAI API keys (sk-…, sk-proj-…) and verifies them against the /v1/models endpoint.
detectors/openrouter
Package openrouter detects OpenRouter API keys (`sk-or-v1-…`) and verifies them against /api/v1/auth/key.
Package openrouter detects OpenRouter API keys (`sk-or-v1-…`) and verifies them against /api/v1/auth/key.
detectors/pagerduty
Package pagerduty detects PagerDuty REST API tokens (20-char alnum) and verifies them against /users.
Package pagerduty detects PagerDuty REST API tokens (20-char alnum) and verifies them against /users.
detectors/paypal
Package paypal detects PayPal REST API client_id / client_secret pairs and verifies them by minting an OAuth access token at /v1/oauth2/token.
Package paypal detects PayPal REST API client_id / client_secret pairs and verifies them by minting an OAuth access token at /v1/oauth2/token.
detectors/piicc
Package piicc detects credit card numbers via shape + Luhn checksum.
Package piicc detects credit card numbers via shape + Luhn checksum.
detectors/piiemail
Package piiemail detects email addresses.
Package piiemail detects email addresses.
detectors/piiiban
Package piiiban detects International Bank Account Numbers via shape + mod-97 checksum.
Package piiiban detects International Bank Account Numbers via shape + mod-97 checksum.
detectors/piissn
Package piissn detects US Social Security Numbers in xxx-xx-xxxx form.
Package piissn detects US Social Security Numbers in xxx-xx-xxxx form.
detectors/plaid
Package plaid detects Plaid client_id (24-hex) + secret (30-hex) pairs and verifies them by POSTing to /categories/get, the cheapest sandbox-safe endpoint that authenticates the pair without side effects.
Package plaid detects Plaid client_id (24-hex) + secret (30-hex) pairs and verifies them by POSTing to /categories/get, the cheapest sandbox-safe endpoint that authenticates the pair without side effects.
detectors/postman
Package postman detects Postman API keys (PMAK-...) and verifies them against /me.
Package postman detects Postman API keys (PMAK-...) and verifies them against /me.
detectors/postmark
Package postmark detects Postmark server API tokens (UUID shape) and verifies them against /server.
Package postmark detects Postmark server API tokens (UUID shape) and verifies them against /server.
detectors/privatekey
Package privatekey detects PEM-encoded private keys (RSA, EC, OpenSSH, PGP, DSA, Ed25519, generic PKCS8).
Package privatekey detects PEM-encoded private keys (RSA, EC, OpenSSH, PGP, DSA, Ed25519, generic PKCS8).
detectors/pypi
Package pypi detects PyPI upload tokens (pypi-AgEIc…) and verifies them against the upload endpoint.
Package pypi detects PyPI upload tokens (pypi-AgEIc…) and verifies them against the upload endpoint.
detectors/render
Package render detects Render API keys (rnd_<14>) and verifies them via /v1/owners.
Package render detects Render API keys (rnd_<14>) and verifies them via /v1/owners.
detectors/replicate
Package replicate detects Replicate API tokens (`r8_…`) and verifies them against /v1/account.
Package replicate detects Replicate API tokens (`r8_…`) and verifies them against /v1/account.
detectors/rollbar
Package rollbar detects Rollbar access tokens (32 hex near the `rollbar` keyword) and verifies them against /api/1/projects with the documented `X-Rollbar-Access-Token` header.
Package rollbar detects Rollbar access tokens (32 hex near the `rollbar` keyword) and verifies them against /api/1/projects with the documented `X-Rollbar-Access-Token` header.
detectors/salesforcerefresh
Package salesforcerefresh detects Salesforce OAuth refresh tokens (5Aep861...
Package salesforcerefresh detects Salesforce OAuth refresh tokens (5Aep861...
detectors/segment
Package segment detects Segment write keys (32-char base62-ish).
Package segment detects Segment write keys (32-char base62-ish).
detectors/sendgrid
Package sendgrid detects SendGrid API keys (SG.<id>.<secret>) and verifies them against /v3/scopes.
Package sendgrid detects SendGrid API keys (SG.<id>.<secret>) and verifies them against /v3/scopes.
detectors/sentry
Package sentry detects Sentry DSN URLs (https://<32 hex>@<host>/<project>).
Package sentry detects Sentry DSN URLs (https://<32 hex>@<host>/<project>).
detectors/shodan
Package shodan detects Shodan API keys (32-char alphanumeric) gated on a "shodan" keyword window, and verifies them via /api-info.
Package shodan detects Shodan API keys (32-char alphanumeric) gated on a "shodan" keyword window, and verifies them via /api-info.
detectors/slack
Package slack detects Slack bot tokens (xoxb-…) and verifies them against auth.test.
Package slack detects Slack bot tokens (xoxb-…) and verifies them against auth.test.
detectors/snyk
Package snyk detects Snyk API tokens (UUIDv4-shaped) gated on the "snyk" keyword window, verifying via /api/v1/user/me with `Authorization: token`.
Package snyk detects Snyk API tokens (UUIDv4-shaped) gated on the "snyk" keyword window, verifying via /api/v1/user/me with `Authorization: token`.
detectors/spotify
Package spotify detects Spotify Web API client_id + client_secret pairs and verifies them by minting an OAuth client_credentials token at /api/token.
Package spotify detects Spotify Web API client_id + client_secret pairs and verifies them by minting an OAuth client_credentials token at /api/token.
detectors/square
Package square detects Square access tokens (production `EAAA…` and sandbox `sq0atp-…`) and verifies them via /v2/locations.
Package square detects Square access tokens (production `EAAA…` and sandbox `sq0atp-…`) and verifies them via /v2/locations.
detectors/stripe
Package stripe detects Stripe live/test secret keys (sk_live_, sk_test_, rk_live_) and verifies them via the /v1/charges list endpoint.
Package stripe detects Stripe live/test secret keys (sk_live_, sk_test_, rk_live_) and verifies them via the /v1/charges list endpoint.
detectors/sumologic
Package sumologic detects Sumo Logic access ID + access key pairs and verifies them via /api/v1/users/me with HTTP Basic auth.
Package sumologic detects Sumo Logic access ID + access key pairs and verifies them via /api/v1/users/me with HTTP Basic auth.
detectors/tailscale
Package tailscale detects Tailscale auth keys (`tskey-auth-…`) and API keys (`tskey-api-…`).
Package tailscale detects Tailscale auth keys (`tskey-auth-…`) and API keys (`tskey-api-…`).
detectors/telegram
Package telegram detects Telegram Bot API tokens (`<bot_id>:<35-char base64>`) and verifies them via /getMe.
Package telegram detects Telegram Bot API tokens (`<bot_id>:<35-char base64>`) and verifies them via /getMe.
detectors/terraformcloud
Package terraformcloud detects Terraform Cloud / Enterprise API tokens (<14 alnum>.atlasv1.<60+ url-safe>) and verifies them against /api/v2/account/details.
Package terraformcloud detects Terraform Cloud / Enterprise API tokens (<14 alnum>.atlasv1.<60+ url-safe>) and verifies them against /api/v2/account/details.
detectors/together
Package together detects Together.ai API keys (64-char lowercase hex) and verifies them against /v1/models.
Package together detects Together.ai API keys (64-char lowercase hex) and verifies them against /v1/models.
detectors/twilio
Package twilio detects Twilio Account SID + Auth Token pairs and verifies them against /2010-04-01/Accounts/<sid>.json.
Package twilio detects Twilio Account SID + Auth Token pairs and verifies them against /2010-04-01/Accounts/<sid>.json.
detectors/vault
Package vault detects HashiCorp Vault tokens (`hvs.…`, `hvb.…`, legacy `s.…` service tokens).
Package vault detects HashiCorp Vault tokens (`hvs.…`, `hvb.…`, legacy `s.…` service tokens).
detectors/vercel
Package vercel detects Vercel API access tokens.
Package vercel detects Vercel API access tokens.
detectors/virustotal
Package virustotal detects VirusTotal API keys (64-char lowercase hex) gated on a "virustotal"/"vt_api_key" keyword window, and verifies them via the v3 users-self endpoint with x-apikey.
Package virustotal detects VirusTotal API keys (64-char lowercase hex) gated on a "virustotal"/"vt_api_key" keyword window, and verifies them via the v3 users-self endpoint with x-apikey.
detectors/zoom
Package zoom detects Zoom OAuth client_id + client_secret pairs and verifies them by exchanging the pair for an access token via the /oauth/token endpoint with HTTP Basic auth.
Package zoom detects Zoom OAuth client_id + client_secret pairs and verifies them by exchanging the pair for an access token via the /oauth/token endpoint with HTTP Basic auth.
engine
Package engine drives the scan loop: it pulls chunks from a Source, runs each registered Detector against chunks whose data contains at least one of the detector's keywords, and forwards results to the configured output sink.
Package engine drives the scan loop: it pulls chunks from a Source, runs each registered Detector against chunks whose data contains at least one of the detector's keywords, and forwards results to the configured output sink.
output
Package output owns the user-visible reporting surface.
Package output owns the user-visible reporting surface.
sources
Package sources defines the Source interface and the Chunk shape that detectors consume.
Package sources defines the Source interface and the Chunk shape that detectors consume.
sources/all
Package all blank-imports every concrete source so their init() registers against pkg/sources.registry.
Package all blank-imports every concrete source so their init() registers against pkg/sources.registry.
sources/filesystem
Package filesystem is a Source that walks one or more paths and emits one Chunk per regular file.
Package filesystem is a Source that walks one or more paths and emits one Chunk per regular file.
sources/git
Package git is a Source that walks the commit history of a local git repository and emits one Chunk per added/modified file blob per commit.
Package git is a Source that walks the commit history of a local git repository and emits one Chunk per added/modified file blob per commit.
sources/stdin
Package stdin is a Source that reads a single chunk from os.Stdin (or any io.Reader, for tests) and emits it once.
Package stdin is a Source that reads a single chunk from os.Stdin (or any io.Reader, for tests) and emits it once.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL