01 · Safety · Open weights

Every secret, found.

cbx-secrets-detector-32M

Finds credentials in code, configs, logs and chat.

Finds it. Then redacts it.

Real, cached outputs from the model.

.env-file.txt0 of 4 found

STRIPE_SECRET_KEY=sk-live-9fQ2mXyzAB12cd34EF56gh78 DATABASE_URL=postgres://admin:[email protected]:5432/orders password: correcthorsebatterystaple

Benchmark

Measured against the alternative.

0.000

Span F1 — real-world "issue reports" test

Full results ↗
  • cbx-secrets-detector-32M0.861
  • Gitleaks 8.30.10.678
  • TruffleHog 3.99.20.228

From the model card

Finds secrets and credentials (passwords, API keys, tokens, private keys, cloud and database credentials) in code, config files, logs, tickets and chat, and returns the exact position of each value with one of 12 labels. 32M parameters; about 8 ms per 1,000 tokens on a GPU and 81 ms on a CPU.

This is the recommended default: more accurate than 17M, at about 1.25× its time on a GPU and 2.2× on a CPU. Fine-tuned from jhu-clsp/ettin-encoder-32m. Version v0.1, the first release (use --revision v0.1 to pin it). Also available in 17M.

Unlike rule-based scanners, it reads the context: it finds passwords and keys that have no fixed prefix, and it leaves alone placeholders, variable references, hashes and obviously fake values.

Model

32M

Licence

Apache 2.0

Fine-tuned from

jhu-clsp/ettin-encoder-32m

Read the full model card ↗

Full results. Every number, from the card.

Span F1, label-agnostic: a found value counts if it overlaps a true secret, whatever its label (the benchmarks and the scanners use different type names). Precision and recall in brackets. "False alarms" is the share of labelled non-secret lines or candidates on which something is flagged.

ModelCredData testfalse alarmsIssue reports testfalse alarmsCBX secrets test
cbx-secrets-detector-17M0.805 (0.80 / 0.81)0.9%0.836 (0.90 / 0.78)0.9%0.983 (0.99 / 0.98)
cbx-secrets-detector-32M0.820 (0.77 / 0.87)1.3%0.861 (0.86 / 0.86)1.4%0.998 (1.00 / 1.00)
Gitleaks 8.30.10.442 (0.90 / 0.29)0.6%0.678 (0.93 / 0.54)0.5%0.757 (0.99 / 0.61)
detect-secrets 1.5.00.460 (0.47 / 0.45)9.8%0.290 (0.40 / 0.23)4.0%0.626 (0.90 / 0.48)
TruffleHog 3.99.20.042 (0.38 / 0.02)0.8%0.228 (0.66 / 0.14)0.9%0.215 (1.00 / 0.12)
  • CredData test: Samsung CredData (secrets obfuscated by Samsung): the test half of the repositories, 168 repositories with 3,493 secrets and 17,961 labelled non-secret lines. No test repository was used for training or for choosing the model.
  • Issue reports test: the test split of the issue-report dataset of Ahmed et al. (see Training data): 949 secrets and 8,132 non-secret candidates, scored per candidate. Texts that also appear in its training split were removed.
  • CBX secrets test: our own held-out test data, generated by CobuildX and checked against our annotation guide: 3,000 texts with 3,136 secrets across all 12 labels. With the label required to match exactly as well, this model scores 0.991 (per label: CERTIFICATE_SECRET 1.00, DATABASE_CREDENTIAL 1.00, JWT_TOKEN 1.00, PRIVATE_KEY 1.00, WEBHOOK_SECRET 1.00, ENCRYPTION_KEY 0.99, GENERIC_SECRET 0.99, ACCESS_TOKEN 0.99, CLOUD_CREDENTIAL 0.99, API_KEY 0.99, PASSWORD 0.98, SESSION_SECRET 0.98). It comes from the same generators as part of the training data, so it overstates accuracy on real text; the two benchmarks above are the better guide.
  • Scanners were run offline with their default rules and no live verification; TruffleHog normally relies on verification, so its numbers here understate it.

Speed. Median 8 ms (p95 8 ms) per text of 1,000 tokens on an NVIDIA TITAN RTX (fp16), 81 ms (p95 84 ms) on an Intel i7-10700 CPU with 8 threads; texts processed one at a time, end to end (text in, spans out).

Know its limits. Before you ship it.

Limitations

  • English only. Trained for code, config files, logs, tickets and chat.
  • Long encoded data: on long runs of random-looking characters (an inline base64 source map, a minified bundle, a log full of hex session ids) the model can flag many short pieces as secrets. Skip minified and generated files where you can.
  • Recall is lower for tokens with no known prefix and no telling name nearby (key, token, password).
  • Labels are less certain than detection: a password in a database context can be labelled PASSWORD or DATABASE_CREDENTIAL, and a database URI is sometimes returned as two spans split at the password.
  • It does not check whether a secret is live, and it can miss secrets: use it as a detection aid alongside rotation and review, not as a guarantee.

Training data

What it learned from.

01

CBX secrets train data

Generated by CobuildX and checked against our annotation guide: code, configs, logs, chat and documents with invented secrets and hard negatives (placeholders, references, hashes, fake values).

02

Samsung CredData

(lines and labels from 116 repositories with MIT, Apache-2.0 or BSD licences; values already obfuscated by Samsung). The repositories and their licences are listed in training_data_sources.csv.

03

Issue reports

The training split of Secret Leak Detection in Software Issue Reports using LLMs, Ahmed et al., arXiv:2410.23657, dataset 10.5281/zenodo.19622962, licensed CC BY 4.0. Changed: every real secret was replaced by an invented value of the same shape before training, and texts were cut into windows. No real secret from this dataset is in the model's training data or in this repository.

2 sizes. Smaller is faster, larger is more accurate.

Run it on your own data. In the CobuildX Console.

Sign in to the console to call this model live, compare sizes and create an API key.