dsh-secret-scan: A Leaked-Secret Scanner Plugin for DeepSeek Harness
feely0208/dsh-secret-scan
A DSH plugin for DeepSeek Harness that scans for leaked secrets and sensitive data before you commit or open-source, using 7 rules to catch tokens, private keys and credential files, with masked output and rotate-first remediation guidance.
dsh-secret-scan is a credential and sensitive-information scanning capability for DeepSeek Harness that turns "check before you commit" into a single runnable step. It targets the common accident of API keys, tokens, and private keys slipping into version control, surfacing them before you commit, publish, or open-source. Seven built-in rules cover PEM private key blocks, AWS AKIDs, GitHub and Slack tokens, Stripe keys, and high-entropy literals; output is masked to the first and last four characters, and a high-confidence hit returns exit code 1 so the scan can gate pre-commit checks or CI.
How to Install
dsh plugin --profile web add @deepwhale-cn/dsh-secret-scan- Category
- Development & Operations
- Platform
- DSH Plugin
- Author
- feely0208
- Distribution
- Plugin
dsh-secret-scan Key Features
dsh-secret-scan Repo Summary
What Does It Do?
Secret Scan (dsh-secret-scan) is a DSH plugin for DeepSeek Harness that scans code repositories for leaked credentials and sensitive information before you commit, publish, or open-source. It solves the problem of API keys, tokens, and private keys slipping into version control, turning that check into a single runnable command. Maintained by feely0208 under the MIT license, it is the one general-purpose skill in the DeepWhale guard series that is not limited to any single region.
Core Features
- Seven built-in rules: covers PEM private key blocks, AWS AKIDs, GitHub tokens, Slack tokens, Stripe keys, plus high-entropy literals assigned to variables named secret, token, or password, each graded by severity.
- Masked output by default: reports keep only the first and last four characters, so evidence looks like
AKIA,ghp_, orsecretAccessKeyand never contains the key itself. - False-positive filtering: documented example values and obvious dummy keys containing example or dummy are filtered out, label-only format samples are not reported, and references such as
process.env.SECRETare skipped. - Exit code as verdict: a high-confidence hit returns exit code 1, so the scan can gate pre-commit hooks or CI pipelines directly.
- Remediation order over scanning: the skill stresses rotating the key first, then cleaning the code, and only then deciding whether to rewrite history, because deleting code does not invalidate a leaked key.
- Honest skip reporting:
.pem,.key, and.p12files are not read as text, and the report explicitly lists which files were skipped.
How to Use This Plugin?
After enabling it in DSH, run a scan against the target repository; output is masked by default. Add --reveal only when troubleshooting, and never store that output in a file or paste it into a chat. Use --demo to see the built-in sample and --list-rules to list every rule with its rationale. A high-confidence hit returns exit code 1, making the scan suitable for pre-commit checks or continuous integration; for medium-severity configuration warnings, review each one in context rather than abandoning the report because of noise.
How to Troubleshoot This Plugin?
If a scan comes back empty but you suspect a private key, check the file form first: .pem, .key, and .p12 files are not read as text, so dropping in server.pem will be missed, while a key named id_rsa or pasted into code or documentation will be caught, and the report lists the skipped files. If the report shows many medium-severity warnings, they are usually hardcoded assignments such as password= or token= and need to be reviewed one by one; test keys should be written as obvious fakes containing example or dummy so they are filtered automatically.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: feely0208/dsh-secret-scan. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
