DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Agent Policy — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
A

@deepwhale-cn/dsh-agent-policy

Agent Policy

Did you do what you said you wouldn’t, and if you did, did you say so?

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:feely0208/dsh-agent-policy#34bc15dd27229df289c83470cc6915b74817fd2f
READMECompatibilityVersions

Compatibility and provenance

Agent Policy is published as @deepwhale-cn/dsh-agent-policy and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
10/16/2026

Versions

0.1.0stable
10/16/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/16/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in security-access.

Cc Safety Netcc-safety-netA coding agent CLI hook - block destructive commands and secret file accessCodex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast modeMcp Connectordsh-mcp-connectorDeepSeek Harness MCP Connector: connect servers, search tools across active connections, and troubleshoot discovery. Includes a continuously updated catalog; supports OAuth 2.0 PKCE, API keys, Streamable HTTP/stdio, and mcpServers JSON import.Experimental Auto Review@deepseek-ai/dsh-experimental-auto-reviewPer-tool LLM authorization review for the DeepSeek Harness Auto permission preset

README

@deepwhale-cn/dsh-agent-policy

说好不干的事干了没,干了的有没有说。

关键词:策略声明 · agent 权限 · 一致性核对 · 不出网 · 通配符放权 · 人工确认 · 过度代理 · 最小权限


先说清楚它是什么、不是什么

是:把项目的策略声明和实际代码摆在一起比 —— 策略文件(policy.yml / agent.yml / 权限配置)写了什么,代码里是不是真的那么干。

不是:

  • ❌ 不是运行时拦截 —— 不拦请求、不挡工具调用,只做静态比对
  • ❌ 不是权限扫描器 —— 单看「权限是不是太宽」是 dsh-agent-scope 的活;这里只问「和声明对得上吗」
  • ❌ 不是合规认证 —— 不判断你能不能过审
  • ❌ 不下「安全 / 不安全」的结论 —— 只列事实:声明说 A,代码里是 B

一句话分界:

agent-scope   = 单看【权限本身】宽不宽(通配符、根目录、无限制出网)
agent-policy  = 看【声明】与【实现】是否一致 —— 说好不干的事干了没

同一个 allow: "*",两边都可能提;但 agent-scope 说的是「这权限太宽」,agent-policy 说的是「你声明了允许一切,而你大概以为自己在声明白名单」。


它查什么(5 条)

规则查什么级别
POLICY-EGRESS-PROMISE策略里写了「不出网」,同一项目里却有网络调用🔴
POLICY-CONFIRM-MISSING代码里写着「需人工确认」,同一文件里却直接执行高风险动作🔴
POLICY-WILDCARD-ALLOW策略里把权限写成通配符(allow: "*" / tools: ["*"] / permissions: all)🔴
POLICY-DECL-EMPTY策略声明里的工具清单是空的(tools: [] / tools: null)🟡
POLICY-NO-DECLARATION有 agent 代码(调模型 / 工具)却找不到任何策略声明文件🟡

每条都会给出:哪个文件、第几行、那行长什么样、依据是哪条标准。

第 5 条为什么带 when

POLICY-NO-DECLARATION 是「找不到」类判据,如果对所有项目都跑,一个只有 index.js 的普通小工具也会被报「没有策略声明」——那是误报。所以它只在项目里出现 agent 特征时才跑:openai / anthropic / @deepseek-ai / tool_call / tool_use / AgentExecutor 等。看到 notApplicable 里有它,说明这个项目没有 agent 代码,本来就不该跑。


安装

dsh plugin --profile web add @deepwhale-cn/dsh-agent-policy

用法

# 核对一个项目
dsh-agent-policy --root /path/to/your-agent

# 看内置演示(一个「策略说不出网、代码里却在往外发」的假项目)
dsh-agent-policy --demo

# 列出规则与依据
dsh-agent-policy --list-rules

# 出 HTML 报告 / 给 CI 用
dsh-agent-policy --root . --html
dsh-agent-policy --root . --json

退出码:有 high 命中 → 1(可以挂 CI 卡口)。


一个例子

policy.yml 里写着:

outbound:
  allow: false
  note: 本 agent 不出网,只访问内网工单库

而 src/sync.js 里:

const WEBHOOK = 'https://hooks.slack.com/services/T000/B000/XXXX';
export async function pushSummary(items) {
  const res = await fetch(WEBHOOK, { ... });
}

报出来是这样:

POLICY-EGRESS-PROMISE  src/sync.js:9
  策略里写明了不准出网,同一个项目里却有网络调用

注意:这不是说「出网就有罪」。是说到时候出事,大家会拿着这份 policy.yml 说「我们规定了不出网」——而实际上它在出。改代码或者改声明,让两边对上,是这份报告唯一的诉求。


判据出处

  • OWASP Top 10 for LLM Applications 2025 · LLM06 Excessive Agency —— 智能体的能力应与其声明的边界一致;human-in-the-loop 控制
  • CIS Controls v8 · Control 6(Access Control Management) —— 授权必须显式列出,最小权限
  • NIST AI RMF 1.0 · GOVERN 1.1 / 1.2、MANAGE 2.2、MAP 1.1 —— AI 系统的策略、责任与边界应明确且与执行一致
  • NIST SP 800-53 Rev.5 · AC-6 Least Privilege

双向验证

bash tests/run.sh
  • 正例 tests/fixtures/fail/demo-project/:一个有策略文件、但代码处处和它拧着的客服 agent
  • 反例 tests/fixtures/pass/clean-project/:策略和实现逐条对得上的项目
  • 空缺样本 tests/fixtures/absent/minimal/:有 agent 代码、完全没有策略文件

许可

MIT