Privacy and preparation
Dataset sample secret detection: code-tuned rules miss ticket prose
By SourceX Editorial · Reviewed by Noah Loul ·
9 sections
Short answer
Dataset sample secret detection needs two passes before records go to a prospective buyer: a format scanner for machine-issued keys, and a prose pass with human review for passwords, codes and operational details written in sentences. In a SourceX test, 290 of 503 open-source scanner rules stopped finding their own test secrets once each sat in a support-chat sentence, and none flagged 12 invented human-chosen secrets.
Redaction
Dataset sample secret
Key takeaways
- Of 503 open-source scanner rules that reproduced their own test fixtures, 290 (57.7%) found none of their test secrets once each secret sat in a support-chat sentence.
- The 216 rules that recognize a secret by its format alone kept working in prose (213 of 216); all 287 rules that need surrounding text went quiet.
- Writing "the password is" before the secret changed no rule's result, and none of 12 invented door codes, passphrases, PINs and passwords triggered any rule.
- A buyer sample needs a prose pass with human review, a planted-secret test of the whole pipeline, and rotation at the source before anything is released.
- The record that settles the sample is a clearance log: scanner and commit, prose terms, each finding's action and owner, change confirmations and a reviewer's sign-off.
What must be settled before records become a buyer sample?
Before any records go to a prospective buyer as a sample, the supplier must know that the sample holds no working credential, no human-chosen secret such as a door or alarm code, and no operational detail that would help someone attack the business, and it must be able to show how it knows. For each candidate record the decision is release, release with placeholders, quarantine until the secret is changed at its source, or exclude.
Samples deserve their own pass because they are the first records outsiders read, they are often pulled quickly from live systems, and they are small enough to skip the process a full delivery gets. A shared secret cannot be called back. GitHub's documentation on removing sensitive data puts it plainly: when the sensitive data is a password, token or credential, the first step is to revoke or rotate it, because once revoked it can no longer be used for access.
Secrets turn up in operational records because people paste what they need to get help. NIST's log management guide (SP 800-92, 2006) warns that logs can intentionally or inadvertently capture sensitive information such as users' passwords and the content of emails, and the initial public draft of its revision (October 2023) asks organizations to check whether a log source might capture passwords, private keys and access tokens. Ticket, chat and email exports are open to the same problem. Three classes of finding need different handling:
- Machine-issued credentials: API keys, access tokens, private keys, webhook URLs and connection strings with embedded passwords.
- Human-chosen secrets: passwords, PINs, one-time codes, door, alarm and safe codes, Wi-Fi passphrases and security answers, usually written in ordinary sentences.
- Sensitive operational details: internal hostnames and IP ranges, network layout, security tool settings, alarm schedules and payment-change instructions, which have no format at all.
Moved into a sentence, most scanner rules stop seeing the secret
A scanner built for code and configuration meets a different input in a sample of tickets or chats. To measure the gap I used Titus, an open-source scanner from Praetorian released under Apache-2.0, at its 2026-10-27 commit. Its README says its rules are drawn from Nosey Parker and Kingfisher. Each of its 542 rule entries ships its own test fixtures: positive examples the rule must match and, for some rules, negative examples it must not. Applied with Python's regular expression engine, 503 rules reproduced their own fixtures exactly (92.8%). I then took those rules' 1,113 fixture secrets (one per positive example) and placed each one three ways: alone, inside a support-chat sentence, and inside a sentence beginning "The customer said the password is".
The rules split cleanly. 216 of them (42.9% of the 503) recognize their secret when it stands alone, with no text around it, so they are matching the secret's own shape; 213 of those still fired inside the chat sentence. The other 287 (57.1%) need text around the secret to match, such as a variable name, an assignment sign or a config key, and not one of them found any of its own test secrets in the chat sentence. In all, 290 of 503 rules (57.7%) went quiet, and 437 of the 1,113 test secrets (39.3%) were still found. Putting "the password is" in front of the secret changed nothing: every rule gave the same result as in the plain chat sentence.
This is not a defect in Titus. Its README describes a scanner for source code, files and git history, and context-anchored rules exist to keep false alarms down when a secret has no distinctive shape. The finding is narrower and more useful: for a sample drawn from tickets, chats and emails, more than half of a code-tuned rule set is looking for context that prose does not have. The results by rule group:
| Rule group | Rules | Still found in the chat sentence | Lost every test secret |
|---|---|---|---|
| All rules that reproduced their fixtures | 503 | 213 (42.3%) | 290 (57.7%) |
| Recognize the secret on its own | 216 | 213 (98.6%) | 3 (1.4%) |
| Need surrounding text to match | 287 | 0 (0.0%) | 287 (100.0%) |
| Labeled generic or fuzzy by the project | 92 | 6 (6.5%) | 86 (93.5%) |
| Rule IDs from Nosey Parker (np) | 220 | 110 (50.0%) | 110 (50.0%) |
| Rule IDs from Kingfisher | 282 | 102 (36.2%) | 180 (63.8%) |
What no rule caught: human-chosen secrets and operational details
None of the 503 rules flagged any of 12 invented human-chosen secrets written the way support and facilities tickets write them: a guest Wi-Fi passphrase, a loading-dock door code, an alarm panel code, a safe combination, a voicemail PIN, a shared mailbox password, a temporary portal password, a one-time code read out on a call, a security question answer, a callback passphrase, a server room keypad code and a router admin password. Four more lines carried one invented password in label form. Only the quoted assignment, the kind found in code, fired, matched by a single Generic Password rule; a "Password:" label, a pwd= pair and an inline "pass" pair did not.
These are the secrets that open doors and accounts, so a hit has consequences beyond the sample. NIST SP 800-63B-4, the current revision of the U.S. federal digital identity guidelines, tells verifiers not to require routine password changes but to force a change when there is evidence that an authenticator has been compromised. A password found pasted into a ticket while building a sample is reasonably treated as that kind of evidence by whoever owns the account.
Operational details are harder still because nothing about them looks secret. A hostname, a subnet, the hours an alarm is off or the steps for changing a vendor's bank details read as ordinary text. Only a reviewer working from a written list of what the business treats as sensitive will catch them.
The sample clearance matrix: scan, review, quarantine
The matrix assigns every finding from either pass an action, an owner and a record, so the release decision can be audited later. Typed placeholders such as a token tag or a door-code tag keep the sentence and its task signal intact while removing the value. Read each row as one kind of finding:
| Finding | First action | Who acts | Release decision | Record kept |
|---|---|---|---|---|
| Machine-issued credential matched by a format rule | Quarantine the record and ask the issuing system's owner to revoke or rotate | Security owner of that system | Release with a typed placeholder only after rotation is confirmed | Finding ID, rule ID and rotation confirmation date |
| Keyword near a value in prose: password, PIN, code, passphrase | Send to the human review queue | Trained reviewer | If real, handle as a credential or human-chosen secret; if not, release | Review decision with its reason |
| Confirmed human-chosen secret: door, alarm, safe, Wi-Fi or account | Replace with a placeholder and tell the owner to change it | Facilities or account owner | Release after the change is confirmed, or drop the sentence | Change confirmation and placeholder map location |
| Sensitive operational detail: hosts, IP ranges, security settings, payment-change steps | Generalize to a role word or a range | Reviewer with IT sign-off | Release generalized; exclude if the detail is the point of the record | Generalization log entry |
| Content no scanner read: images, PDFs, archives, encoded blobs | Remove from the sample | Sample owner | Exclude unless extracted, decoded and scanned | Exclusion list entry |
| The same secret repeated in quoted replies or forwarded threads | Treat every copy and clear the thread as one unit | Trained reviewer | Release the thread only when every copy is cleared | Thread-level clearance line |
| Nothing found by either pass | None | Sample owner | Release | Clearance record: scanner and commit, rule count, prose terms, reviewer, date |
A planted-secret test shows both passes work
Before trusting the passes on real candidates, prove them on secrets you planted yourself. The transplant test above is one instance of the idea: known secrets in known places, then a count of what the tools found. For a buyer sample the plants should mirror the three classes and the record types in scope, and the pipeline passes only when every planted item is either caught by the scanner or routed to a reviewer. The six steps:
- Copy a slice of the candidate records into a scratch workspace that will never be shared.
- Plant invented secrets of all three classes, some formatted like vendor tokens, some written as sentences and some as operational details, using values that cannot work anywhere.
- Place them where real ones hide: first messages, quoted replies, signatures, attachments and long notes.
- Run the full pipeline, format scanner, prose pass and review queue, exactly as it will run on the real sample.
- Count, per class and per location, how many plants were caught or routed to review; a miss sends you back to the prose terms or the reviewer brief.
- Delete the scratch copy, keep the counts with the clearance record, and repeat the test whenever the scanner version, the terms or the record types change.
Is secure transfer enough for a scrubbed sample? The strongest objection
No: an encrypted link and a nondisclosure agreement protect the route the sample travels, not what it contains. That is the strongest objection to a separate secret pass, that a sample shared under contract through expiring, access-controlled links cannot leak anything that matters, and it misses where the exposure happens. Every authorized reader sees whatever the sample holds, copies land in inboxes and notebooks, and nothing in the transfer makes a pasted password stop working. Revocation at the source is what ends the risk, which is why GitHub's guidance puts it first.
The objection is closer to right for samples of structured fields with no free text and no attachments, where there is little room for anyone to have pasted a secret. For those, a format scan plus a field-by-field review against the operational-detail list may be enough. Ticket, chat, email and log samples are the opposite case, and they are also where the transplant test showed code-tuned rules losing most of their reach.
Clearing secrets is also separate from privacy work. Removing a password does nothing about the names, accounts or dates in the same record, and de-identifying people does nothing about a router password. A sample needs both reviews, and neither one answers whether the supplier may license the records.
Final-delivery checklist for a buyer sample
A buyer sample is ready to leave when each item below exists as a dated record that a second person could check. The items:
At a glance
Final-delivery checklist for a buyer sample
Checklist · 8 items
- The candidate scope and the record types in the sample, with the draw rule and its date.
- The format scanner's name, version or commit and rule count, and the prose-pass terms list.
- Planted-secret test counts by class and location, from a run on the same pipeline.
- Every finding with its matrix row, action, owner and outcome.
- Rotation or change confirmations for every live credential and human-chosen secret found.
- The exclusion list for unscanned attachments, encoded content and records whose point is an operational detail.
- The reviewer's sign-off, naming anything accepted as residual risk.
- A rerun trigger: any change to scope, scanner, terms or record types reopens the clearance.
0 of 8 ticked. Tick each item as you go.
How sample clearance relates to SourceX's process
SourceX's published process does not start with a sample. The first step is a short company assessment that needs no data uploads, and no records move until the company has agreed the scope and terms and signed the agreement. SourceX's how-it-works page says that once SourceX gives the go-ahead, the data is extracted, transferred and de-identified through approved processing routes, and its legal-framework page describes de-identification as removing or replacing personal details such as names, emails, phone numbers and account numbers.
Credentials and operational details are a different category from personal details, so the clearance matrix stays useful in two places: whenever any party asks to see records before an agreement exists, and when a supplier decides which record classes to propose. Classes that keep producing quarantines, such as IT tickets full of pasted configuration or facilities logs with access codes, are candidates to narrow or leave out. The assessment checks fit only; it is not an offer and promises no payment.
Methods note: the rule transplant test
Source: github.com/praetorian-inc/titus at commit 5a910ac51f8bf14e64fb8de1dce52daae037eaf6 (2026-10-27), every rule entry in the 316 files matching pkg/rule/rules/*.yml, read on 2026-10-28: 542 entries. The README advertises 487 rules; the difference, which spans 29 entries marked not visible and 32 that depend on another rule, was not reconciled. Only the YAML files were read and no Titus code was run. Each pattern was applied with Python 3.13's re module after four adaptations: a standalone negative flag such as (?-i) became a scoped group that closes where its enclosing group closes; global inline flags found anywhere in a pattern were applied to the whole pattern; repeated group names got numbered suffixes, with secret extraction reading the first non-empty group of that name; and every pattern was compiled ASCII-only.
A rule counted as reproduced when its adapted pattern matched every positive example and none of its negative examples: 503 rules passed, 39 failed and were left out, and none failed to compile. The secret in each positive example was the group named by secret_group, else a group named token in any case, else the only named group, else the first capture group, else the whole match, always from the first match. Each secret was placed alone; in "Customer pasted this into the chat: [secret] and asked why it fails."; and in "The customer said the password is [secret] for this account." A secret was re-detected when the rule matched and extracted exactly the same string. A rule carried over when every example secret was re-detected and was lost when none was; no rule was partial in any context. Recognizing the secret on its own means carrying over when the secret stands alone; needing surrounding text means losing every example secret when it stands alone. The generic or fuzzy group is rules whose categories list includes either word, and origin is the rule ID prefix (one rule carries a titus prefix). Shares are computed from counts and rounded once, half up.
The 12 human-chosen sentences and 4 label lines are written into the script; every value is invented and none works anywhere. A sentence counted as flagged when any reproduced rule matched anywhere in it. Run against all 542 compiled patterns, including the 39 rules that failed their own fixtures, the 12 sentences still drew no match and the 4 label lines one. Not measured: Titus's own engine, its entropy, scoring and validation steps, which act after a match; real tickets or chats; false alarms on clean text; and any other scanner. Python's engine may treat some patterns differently from Titus's own matcher, which is why only fixture-reproducing rules were used; rerunning the strings through the Titus binary is a release check. The script and its output are kept with this draft for recount.
Frequently asked questions
Can a code secret scanner check support tickets and chat logs?
Partly. In a test of 503 open-source scanner rules, the rules that recognize a secret by its own shape kept working inside a chat sentence, but every rule that needs surrounding text stopped finding its own test secrets. Add a prose pass with human review for ticket, chat and email samples.
What should happen when a live credential turns up in a sample candidate?
Quarantine the record, ask the owner of the issuing system to revoke or rotate the credential, and release the record only with a typed placeholder after the change is confirmed. Removing the text alone does not stop a copied credential from working.
Which secrets do pattern-based scanners usually miss?
Human-chosen secrets written in ordinary sentences: door and alarm codes, Wi-Fi passphrases, PINs, temporary passwords and security answers. None of 12 such invented sentences triggered any of the 503 rules tested, and operational details such as hostnames or alarm schedules have no pattern at all.
Do we still need to scan a sample if the buyer has signed an NDA?
Yes. A nondisclosure agreement limits what the recipient may do, but every person who opens the sample still sees a pasted password, and copies outlive the transfer. Changing the secret at its source is what removes the risk.
How can we show a buyer sample is free of secrets?
Keep a clearance record: the scanner and its version, the prose-pass terms, a planted-secret test run on the same pipeline, every finding with its action and owner, rotation confirmations and the reviewer's sign-off. Rerun it whenever the scope, scanner or record types change.
Sources
- Titus is an Apache-2.0 secrets scanner for source code, files and git history whose rules, drawn from Nosey Parker and Kingfisher, carry their own positive and negative test examples; SourceX tested its 542 rule entries at this commit. Source
- GitHub's documentation says that when sensitive data is a password, token or credential, the first step is to revoke or rotate it, after which it can no longer be used for access. Source
- NIST SP 800-92 (2006) warns that logs might intentionally or inadvertently capture sensitive information such as users' passwords and the content of emails. Source
- The initial public draft of NIST SP 800-92 Rev. 1 (October 2023) asks organizations to determine whether a log source might capture sensitive data including passwords, private keys and access tokens. Source
- NIST SP 800-63B-4 says verifiers should not require periodic password changes but must force a change when there is evidence the authenticator has been compromised. Source
- SourceX's how-it-works page says that once SourceX gives the go-ahead, the data is extracted, transferred and de-identified through approved processing routes. Source
- SourceX's legal-framework page says personal details such as names, emails, phone numbers and account numbers are removed or replaced. Source
See if your company qualifies
A short company assessment. No data uploads are needed.