Skip to content
Talisman

Talisman

Category: Secrets
License: Free (Open-Source, MIT)
Suphi Cankurt
Suphi Cankurt
+8 Years in AppSec
Updated June 11, 2026
4 min read
Key Takeaways
  • Talisman installs as a git pre-commit or pre-push hook and validates the outgoing changeset before it leaves the developer’s machine.
  • Detection combines regex pattern matching, Base64/hex entropy analysis, file-size checks, credit-card patterns, and suspicious filename/extension detection.
  • The .talismanrc file allowlists findings by file checksum, so an approved file passes until its contents change.
  • Open-source under MIT with roughly 2,100 GitHub stars, built and maintained by Thoughtworks.

Talisman is an open-source secret scanner from Thoughtworks that runs as a git hook. It validates the outgoing changeset for content that looks suspicious — tokens, passwords, and private keys — and blocks the action before the secret leaves the developer’s machine.

Unlike scanners that report findings after the fact, Talisman sits at the pre-commit or pre-push boundary, which is the last point where a leak can be prevented rather than merely detected.

Because it is rule-based rather than AI-driven, Talisman runs entirely offline as a self-contained binary, with no SaaS dashboard and no vendor relationship.

thoughtworks/talisman GitHub repository page showing the MIT-licensed pre-commit and pre-push secret scanner, files, and README

What is Talisman?

Talisman is a git hook that inspects what you are about to commit or push. The project tagline describes it plainly: a tool to detect and prevent secrets from getting checked in.

You install it as either a pre-commit or a pre-push hook on a repository. When the hook fires, Talisman examines the staged or outgoing changeset and fails the operation if any file looks like it contains a secret.

It catches several classes of risk: hardcoded tokens and passwords, private keys, high-entropy strings, and files whose names or extensions suggest credential material.

Talisman is maintained by Thoughtworks and licensed under MIT. It has roughly 2,100 GitHub stars and remains actively maintained.

How does Talisman work?

Flow diagram showing a git commit or push triggering the Talisman hook, which runs filename, credential-pattern, and entropy checks on the changeset, then blocks suspicious content with a severity report or passes clean changes

Talisman runs detectors against each file in the outgoing changeset and blocks the commit or push when any detector fires. The detection is rule-based — there is no machine-learning model involved.

Talisman pre-commit hook report table flagging a staged .env file containing a GitHub token and AWS secret access key, with high and low severity ratings and a .talismanrc ignore suggestion

Several detectors run together:

  • Pattern matching — regex rules for known credential formats such as tokens, passwords, and private keys.
  • Entropy analysis — Base64 and hex entropy scoring to flag random-looking strings that are likely secrets.
  • Filename and extension — flags files whose names or extensions suggest keys or credentials.
  • File size — flags unusually large files that may contain embedded keys.
  • Credit-card numbers — pattern detection for card-number sequences.

When a finding is a false positive, you record it in a .talismanrc file. Each entry pairs a filename with a checksum of its contents, so Talisman allowlists that exact file.

If the file later changes, its checksum no longer matches and Talisman flags it again. You can also disable specific detectors per file or define allowed patterns to suppress recurring matches.

Beyond the hook, Talisman has a scanner mode invoked with --scan. It walks the full git history of a repository to surface secrets that were committed before the hook was in place, writing results to a report directory.

Key features

Talisman’s surface is deliberately small — it is a single binary focused on the commit boundary.

FeatureDetails
Hook modesPre-commit or pre-push git hook
Detection strategiesRegex patterns, Base64/hex entropy, file size, credit-card patterns, filename/extension
History scanning--scan walks full git history into a report directory
HTML report--scanWithHtml generates a browsable report (separate package)
Allowlisting.talismanrc checksum-based file ignore, per-file detector disabling, allowed patterns
Interactive modeTALISMAN_INTERACTIVE=true updates .talismanrc from a blocked commit
InstallationStandalone binary, Homebrew, global git hook template, or per-repo hook
PlatformsmacOS, Linux, Windows
LicenseMIT

The global hook template is worth noting for teams: installing once via the global template wires Talisman into every repository on the machine, rather than configuring each repo individually.

The interactive mode (talisman -i -g pre-commit) prompts you to add a blocked file to .talismanrc on the spot, which shortens the loop when triaging a legitimate false positive.

When to use Talisman

Talisman fits teams that want secret prevention enforced locally, at the moment of commit or push, rather than after code reaches a central repository. Its pre-push hook is a useful distinction — it can catch a secret on the way out even if individual commits were not checked.

The Thoughtworks origin matters in practice. Talisman grew out of consulting engagements where the goal was to stop secrets at the developer boundary across many client repositories, which is why the global hook template and the pre-commit/pre-push choice sit at the center of its design.

Choosing Talisman against the common alternatives comes down to where you want detection to happen:

  • Gitleaks — a Go binary with first-class git-history scanning and SARIF output; preferred when CI-side scanning and GitHub Advanced Security integration matter more than a local push gate.
  • TruffleHog — adds live API verification that confirms whether a detected credential is still active; chosen when a low false-positive rate justifies the outbound network calls.
  • detect-secrets — uses a baseline file to accept existing secrets while blocking new ones; a fit for brownfield codebases that cannot remediate every historical finding upfront.

Talisman’s distinguishing angle is the combination of entropy detection, suspicious-filetype checks, and the pre-push hook in one self-contained binary, backed by the Thoughtworks lineage. For a wider view of the category, the secret scanning tools hub covers the full field.

Tip
Best for
Teams that want secret prevention enforced locally at the commit or push boundary across many repositories, with no SaaS dependency and a quick checksum-based allowlist for false positives.

Frequently Asked Questions

What is Talisman?
Talisman is an open-source secret scanner from Thoughtworks that runs as a git pre-commit or pre-push hook. It validates the outgoing changeset for content that looks like a secret — tokens, passwords, private keys — and blocks the commit or push when it detects something suspicious.
How does Talisman detect secrets?
Talisman combines several detectors: regex pattern matching for known credential formats, Base64 and hex entropy analysis for high-randomness strings, file-size checks, credit-card number patterns, and suspicious filename and extension detection. It is rule-based, not AI or machine-learning driven.
How do I ignore a false positive in Talisman?
Add the file to a .talismanrc file with its checksum. Talisman allowlists that exact file until its contents change, at which point the checksum no longer matches and the file is re-flagged. You can also disable specific detectors per file or define allowed patterns.
Can Talisman scan existing git history?
Yes. Running Talisman with the –scan flag walks the entire git history of a repository to find secrets that were committed before the hook was in place, writing the findings to a report directory.