CharlotteN7/dsh-dlp0

dsh-dlp

DSH 数据防泄露插件,提供不可配置的工具保护底线、工具结果脱敏以及防失效的遥测数据脱敏功能。

AI 分析

核心用途是防止敏感数据和凭据外泄。适合在处理包含密钥、私密数据的仓库时,对 Agent 的输出和遥测数据进行安全脱敏。

包名
dsh-dlp
版本
0.3.0
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CharlotteN7/dsh-dlp

Configuration trust ranking

RankSourceMay
1invariants compiled into the packageeverything; not configurable
2cordis.yml / bundle patch configset every field
3policyFile — a repo-local YAML filetighten only

Rank 3 is attacker-controlled — a hostile repository ships one, and a prompt-injected agent can write one — so it may only add deny patterns, add egress-capable tool names, raise a severity, and switch a redaction pass on:

v: 1
addCredentialPaths:
  - id: acme/vault-token
    pattern: '(^|/)\.vault-token$'
addEgressTools: [acme_publish]
raiseSeverity:
  dsh-dlp/secret-assignment: high
enable: [telemetryRedaction]

Any other key, and any downgrade, makes the whole file invalid: it is reported on process.stderr and the deployment's logger, then ignored, never obeyed in part. There is no disable, no removeCredentialPaths, and no way to redirect the audit sink. The file is parsed with js-yaml under JSON_SCHEMA, so a !!js/function tag is a parse error rather than code execution, and it never goes near the Cordis loader.

A missing policyFile is not an error — it means the workspace ships no policy. The recommended value is workspace-relative, so failing the mount would stop dsh from starting in every repository without one, and would let a hostile repository remove the floor by shipping a broken file. An added pattern is capped at 200 characters and rejected if it nests a quantifier inside a quantified group: ^(a+)+$ blocks the synchronous guard for seconds on a 27-character path. That check is a heuristic, not a proof of linear-time matching.