D

dsh-permission-rules

github.com/PerryLink/dsh-permission-rules

v0.7.15 模型与账号 以提权方式执行写入文件发起网络请求

Declarative Claude Code-style permission rules plus a Codex-style process-level network policy for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), workspace-path, and network-target (domain/ip/port/scheme) matching on

该插件尚未翻译,显示作者原文。

dshdsh-plugindeepseek-harnesspermissionpolicyallow-deny-askapprovalsafety
分类
model
发布
2026-10-10
版本
v0.7.15

检测报告

关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
1高关注4需留意4一般15未命中
高关注需留意一般

能力清单

  • 以提权方式执行privilege-escalation高关注1 处命中
    • rules/builtin-high-risk.yaml:152anyArg: ["/etc/shadow", "/etc/sudoers", "~/.ssh/**", "/root/.ssh/**", "~/.aws/**", "~/.gnupg/**", "**/.env", "**/*.pem",…
    • 确认提权是插件功能本身需要,还是仅仅在探测环境。多数插件不需要 root。
  • 写入文件writes-files需留意6 处命中
    • lib/index.js:4016mkdirSync(dirname(path), { recursive: true });
    • lib/index.js:4017writeFileSync(path, text, "utf8");
    • scripts/repair-session-logs.mjs:381renameSync(path, backup)
    • scripts/repair-session-logs.mjs:385writeFileSync(path, content)
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意3 处命中
    • README-es.md:262- **Sin mutación global.** No parchea prototipos, ni reescribe `process.env`, ni reemplaza el dispatcher global de fetch…
    • README-pt.md:262- **Sem mutação global.** Não altera protótipos, não reescreve `process.env` nem substitui o dispatcher global de fetch.
    • rules/builtin-high-risk.yaml:127reason: "Piping a remote fetch (curl/wget) directly into a shell executes remote code and is blocked"
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 动态执行代码dynamic-code需留意2 处命中
    • lib/client.js:171new Function("");
    • lib/typert.host.js:141new Function("");
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • R013 清单可疑manifest-obfuscation需留意1 处命中
    • 安装脚本: prepare
    • 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
  • 动态加载模块dynamic-import一般226 处命中
    • lib/types/client/remote.d.ts:51create: () => import("zod").ZodObject<{
    • lib/types/client/remote.d.ts:52enabled: import("zod").ZodBoolean;
    • lib/types/client/remote.d.ts:53mode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"deny-all">, import("zod").ZodLiteral<"whitelist">, impo…
    • lib/types/client/remote.d.ts:54configuredMode: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<"auto">, import("zod").ZodLiteral<"deny-all">,…
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
  • 接触凭据或密钥credentials一般48 处命中
    • lib/index.js:2473* The loggable form of a proxy URL: the password is replaced, everything else
    • lib/index.js:2474* is kept verbatim. An upstream URL may carry credentials, and a proxy URL is
    • lib/index.js:2478* @returns the same URL with its password masked, or the input when unparseable.
    • lib/index.js:2483if (parsed.username === "" && parsed.password === "") return value;
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般36 处命中
    • lib/index.js:2944exists: existsSync(path),
    • lib/index.js:3143procVersionText = readFileSync("/proc/version", "utf8");
    • lib/index.js:3253if (existsSync(candidate)) sources.push(candidate);
    • lib/index.js:3261if (existsSync(projectPath)) return [projectPath];
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般33 处命中
    • lib/index.js:824const env = context.env ?? process.env;
    • lib/index.js:2445* @param lookup - reads one environment name (the launch snapshot, or `process.env`).
    • lib/index.js:2885* `process.env` is case-insensitive, so the uppercase/lowercase spellings
    • lib/index.js:2896for (const name of PROXY_ENV_NAMES) previous.set(name, process.env[name]);
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
能力标识关注度命中次数
以提权方式执行privilege-escalation高关注1
写入文件writes-files需留意6
发起网络请求network需留意3
动态执行代码dynamic-code需留意2
R013 清单可疑manifest-obfuscation需留意1
动态加载模块dynamic-import一般226
接触凭据或密钥credentials一般48
读取文件reads-files一般36
读取环境变量reads-env一般33

这份报告的口径

扫描读的是包里的源码,全程不执行第三方代码。 本次读了 62 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

依赖安全公告

这个插件声明的依赖中,有 3 条已公开的安全公告 (最高等级:中):

等级依赖包编号摘要
中yamlCVE-2023-2251Uncaught Exception in yaml
修复版本:2.2.2 详情 →
低yamlCVE-2026-33532yaml is vulnerable to Stack Overflow via deeply nested YAML collections
修复版本:1.10.3, 2.8.3 详情 →
低zodCVE-2023-4316Zod denial of service vulnerability
修复版本:3.22.3 详情 →

查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0), 不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响—— 所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自 OSV.dev。

← 返回全部插件