MkaliezZ/dsh-secret-guard0

@mkaliezz/dsh-secret-guard

适用于 DeepSeek Harness 工具调用的故障自闭合敏感信息/密钥防护网关。

AI 分析

核心用途是在工具执行前拦截并检测参数中的私钥、Token 等敏感数据。适合需要防止智能体无意中泄露凭证或敏感字段的安全防护任务。

包名
@mkaliezz/dsh-secret-guard
版本
0.2.0
许可证
MIT
最近更新
2026年8月19日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MkaliezZ/dsh-secret-guard

dsh-secret-guard

A fail-closed secret-like payload guard for DeepSeek Harness (DSH) tool calls.

The plugin inspects model-supplied tool arguments at tools/pre-execute and returns allow, ask, or deny before the tool body runs. v0.1 deliberately does not rewrite/redact arguments: DSH freezes execution identity and arguments before policy, so mutating them inside a guard would violate the runtime contract.

v0.1

  • detects common private-key/token/key patterns;
  • detects obvious sensitive field names;
  • bounds serialized payload size and fails closed above the configured limit;
  • optional tool-name scope (protectedTools); empty means inspect every tool;
  • actionOnFinding: block|ask;
  • no raw secret values in the denial reason.

Non-claims

  • heuristic secret detection, not complete DLP;
  • no guarantee every credential format is detected;
  • no argument redaction in v0.1;
  • not a sandbox or malware detector;
  • should be composed with a policy boundary such as AgentFuse when broader action authorization is required.

Development

npm test

License

MIT