zhujiaqi/dsh-secret-paste
Catches secrets pasted into the DSH composer, stores them in the credentials seam and sends the model a placeholder instead.
Solves the everyday leak: you paste an API key into the composer to explain something, and it lands in the transcript, the session history and every export from then on. This plugin detects secrets as they are pasted, stores each one in the official DSH credentials seam, and replaces it in the draft with a [secret:REF] placeholder, so what reaches the model is the reference and not the plaintext. Detection is tiered — high-confidence matches are hidden automatically, medium-confidence matches are handled without silently eating prose, and you can also mark text by hand — and nested placeholders are handled so a reference inside a reference does not confuse the resolution. On the model side, secret_resolve is how a value is used at all: the model calls it with the reference at the moment it needs the secret, so the usable value never sits in context permanently.
Install
dsh plugin --profile web add dsh-secret-pasteThe npm line from the README's registry section, which it marks as recommended. The README spells out what the command does: dsh plugin is a thin pnpm forwarder, so the add runs pnpm add dsh-secret-paste inside the profile directory and pulls the single runtime dependency (@sanity-labs/secret-scan); no build step runs, because the browser bundle is prebuilt. It then requires a restart of the dsh web process and a force-refresh of the browser tab, since the secret_resolve tool only registers on a fresh process.
Compatibility
Needs the dsh CLI and pnpm on PATH. The value handling is the compatibility story worth knowing: real values exist only in tab memory and in a credential file with mode 0600, the message, session history and transcripts carry only the [secret:REF] placeholder, and the model can fetch a value with the secret_resolve tool when it genuinely needs one rather than having it inline in the prompt. The README notes the same three steps work when an agent or a CI job installs the plugin.
Details
- Repo: zhujiaqi/dsh-secret-paste
- Category: Tools & Capabilities
- Stars: 3
- Version: 0.2.0 (npm)
Alternatives
PensiveFei/dsh-secure-audit · whitefirer/dsh-browser-fs · pengzhou267-ai/dsh-shop-assistant