Read-only pass / age secrets with allowPrefixes; reveal defaults to false.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:173787247/dsh-wsl-secret
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Languages: 中文(首页) · English (this file)
Read pass / age secrets into a DSH (Cordis) session — safely.
| npm | dsh-wsl-secret |
| Requires | WSL/Linux with pass and/or age on PATH |
| Default | reads blocked until you set allowPrefixes |
Why this plugin exists
dsh-wsl-cred→ Git push/pull credential hints onlydsh-wsl-secret→ App secrets (OpenRouter, Discord bot token, …) from your password store
If secret_status shows ready=false, the plugin is installed but not configured. That is intentional.
5-minute setup
1. Install tools (once)
# Debian/Ubuntu example
sudo apt install pass age
# initialise pass if needed: pass init <gpg-id>
2. Put secrets under one prefix
pass insert dsh/openrouter # paste API key, first line = secret
pass insert dsh/discord-bot
3. Allow that prefix in Cordis
Edit your profile cordis.patch.yml (example: ~/.dsh/profiles/web/cordis.patch.yml):
plugins:
dsh-wsl-secret:
enabled: true
path: /mnt/c/Users/YOU/Desktop/AIFullStackDevelopment/dsh-wsl-secret
config:
# pass: folder names under ~/.password-store
# age: absolute or ~/ filesystem roots
allowPrefixes:
- dsh
# - ~/secrets
reveal: false # keep false; use secret_to_env instead
timeoutMs: 15000
Restart DSH / reload the profile.
4. Agent flow (what to ask / what tools do)
| Step | Tool | Result |
|---|---|---|
| Check | secret_status |
ready=true, lists allowPrefixes |
| Find | secret_pass_list |
names only, e.g. dsh/openrouter |
| Confirm | secret_pass_exists |
{ exists: true } |
| Use | secret_to_env |
sets process.env.OPENROUTER_API_KEY, returns preview only |
| Optional | secret_pass_get |
preview (or full value only if reveal: true — avoid) |
Example tool call:
{ "name": "secret_to_env", "arguments": {
"name": "dsh/openrouter",
"envKey": "OPENROUTER_API_KEY"
}}
After that, other tools in the same dsh process can read process.env.OPENROUTER_API_KEY. The chat UI only sees a redacted preview.
Tools
| Tool | Purpose |
|---|---|
secret_status |
pass/age on PATH + allowlist + ready |
secret_pass_list |
list entry names under allowlist |
secret_pass_exists |
boolean exists check |
secret_to_env |
preferred — pass → process.env |
secret_pass_get |
read with preview / optional reveal |
secret_age_to_env |
age file → process.env |
secret_age_decrypt |
decrypt age file (preview / reveal) |
Security model
- Empty
allowPrefixes→ every read fails (safe default). - Pass names must match an allowlist prefix (
dsh→dsh/...). - Age paths must sit under filesystem roots in the same list (
~/secrets/...). reveal: false(default): tool results never include the full secret.- Prefer
secret_to_env/secret_age_to_envso the model never needs the raw string in context. - Never paste secrets into the chat.
Develop
npm test
Compatibility
| Field | Value |
|---|---|
| Plugin | dsh-wsl-secret 0.2.0 |
| Minimum dsh | ≥ 0.1.2 (web UI one-shot ?token= on Windows relay :3081) |
| Latest verified | See dsh-wsl-kit Compatibility (currently 0.2.2-rc.1) — single source of truth for the suite |
| Kit set | optional (not in install.sh / KIT_SET=daily by default) |
License
MIT — LICENSE
Links
More in this category
6Mikao9/dsh-wsl-workspace★ 106
Add a WSL workspace from the web GUI without needing to install dsh or related tools again inside WSL. Bash commands and file read/write operations run within the local WSL distribution on the host machine, while Windows files remain accessible.
XINY11451/dsh-wsl★ 10
Extends the working range of DSH into WSL. Files in the distribution can be read, written, edited and searched by DSH directly. Depending on the task, the AI chooses for itself: run a one-off command, or open its own terminal and run several commands there to finish the job. Typing `dsh` in a WSL terminal calls DSH (type `dsh help` there for details), fusing WSL and DSH deeply. Every terminal you open can collaborate visually with the AI.
Edge-Echo/dsh-win-toolkit★ 4
Windows-native tools for DSH agents: clipboard read and write, system notifications, hosts file inspection and network diagnostics, each returning structured data with UI cards from injection-safe PowerShell.
173787247/dsh-wsl-env★ 3
Injects WSL distro, Linux path mapping, /mnt/c CRLF and git caveats, and NODE_USE_ENV_PROXY into the system prompt.
173787247/dsh-wsl-open★ 3
Opens WSL Linux paths from DeepSeek Harness chat in the Windows default app or Explorer.
Han-1413141/dsh-wsl-native★ 3
Use Windows and native Linux DSH sessions in one Windows window, with WSL environment switching and bidirectional system tools.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.