CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

trysac/secrets-precommit

Scan files for leaked secrets (cloud, GitHub, Slack, Stripe, Google, AI keys, private keys, high-entropy assignments) with output that never prints the secret. Use when the user asks to check staged files or a repo for secrets before committing.

Quality

95%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

rules.mdreferences/

Built-in rules

Each line of a file is tested against every rule. Token rules only match when the token is not touching another letter, digit or underscore. After a match, the search continues after the secret.

Rule idDetectsPattern (secret part)
aws-access-key-idAWS access key ID(A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16}
github-tokenGitHub personal, OAuth, user, server, refresh tokengh[pousr]_[A-Za-z0-9]{36}
github-fine-grained-patGitHub fine-grained tokengithub_pat_[A-Za-z0-9_]{82}
slack-tokenSlack tokenxox[baprs]-[A-Za-z0-9-]{10,200}
stripe-live-keyStripe live secret or restricted key(sk|rk)_live_[A-Za-z0-9]{24,99}
google-api-keyGoogle API keyAIza[A-Za-z0-9_-]{35}
anthropic-api-keyAnthropic API keysk-ant-api03-[A-Za-z0-9_-]{93}AA
openai-api-keyOpenAI API keysk-[A-Za-z0-9_-]{20,}T3BlbkFJ[A-Za-z0-9_-]{20,}
private-key-blockPrivate key header-----BEGIN[ A-Z]*PRIVATE KEY-----
generic-assignmentQuoted value of 12+ characters assigned to a name containing key, secret, token, password, passwd or api_keysee below

generic-assignment (case-insensitive): name, then : or =, then a quoted value of 12 or more characters without spaces or quotes. The value must have Shannon entropy of at least 3.5 bits per byte, so repeated or dictionary-like placeholders are not reported.

Redaction

The output shows the first characters of the secret, at most half of them and never more than four, then ****. Length is not revealed. Control characters become ?.

Skipped files

Symlinks, directories, special files, files over 1 MiB, files with a NUL byte in the first 8 KiB, and paths matching the allowlist. Windows line endings give the same columns as Unix ones. Columns count characters.

Suppression

A line containing secrets-precommit:allow is ignored for all rules.

SKILL.md

tile.json