
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-tool-pwsh-safe
Advanced tools
Elbow-proof PowerShell for DeepSeek Harness: run multiline pwsh scripts via -EncodedCommand, immune to quoting/escaping pain.
你是否见过 dsh 疯狂肘击 PowerShell?
单引号、双引号、反斜杠、$ 展开、反引号、换行、中文……
每个 AI agent 都曾在 PowerShell 转义地狱里被肘击到怀疑人生。
dsh-tool-pwsh-safe 是一个 DSH 工具插件:模型要跑 PowerShell 时,把整个脚本原样交给我,剩下的转义问题我来扛。
你的脚本(多行随便写)
↓
base64 编码(纯 ASCII,引号/$/反斜杠全部变安全字符)
↓
走 DSH 沙箱化 pwsh 执行器(ctx.shell,和内置 pwsh 同一条通道)
↓
结果带沙箱标记 / 完整输出 spill 落盘路径 / 退出码
| 场景 | 内置 pwsh 的日常 | pwsh_safe |
|---|---|---|
想输出 他说:"你好" | 转义套转义,祈祷能跑 | 原样写,原样跑 |
| 多行脚本 | 每行拼接、层层转义 | 整段直接贴 |
$env:PATH -replace ';',';' | 连环事故 | 没事发生 |
| 中文输出 | 乱码/编码错误 | UTF-8 编码,稳 |
pwsh 工具同一执行器,沙箱策略 / ConstrainedLanguage / 权限升级全部生效cd $DSH_HOME/profiles/<你的profile>
pnpm add dsh-tool-pwsh-safe@github:sryimnoob123/dsh-tool-pwsh-safe
# 或本地开发:pnpm add link:/绝对路径/dsh-tool-pwsh-safe
然后把它加进 profile 的 package.json bundles 列表,重启 DSH。
{
"script": "Write-Host \"这是中文 + 引号 + $env:USERNAME\"; Get-Location",
"description": "演示转义免疫"
}
| 参数 | 默认 | 说明 |
|---|---|---|
script | (必填) | 完整 PowerShell 脚本,多行随便 |
description | (必填) | 一句话说明(UI 显示用) |
workdir | 会话工作目录 | 脚本工作目录 |
timeoutMs | 120000 | 超时自动 kill |
MIT
FAQs
Elbow-proof PowerShell for DeepSeek Harness: run multiline pwsh scripts via -EncodedCommand, immune to quoting/escaping pain.
The npm package dsh-tool-pwsh-safe receives a total of 284 weekly downloads. As such, dsh-tool-pwsh-safe popularity was classified as not popular.
We found that dsh-tool-pwsh-safe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.