dsh-redteam-model
SeaOf0
基于dsh web实现的多种模式,目的是服务于redteam进行授权的安全研究,覆盖渗透测试、红队评估、代码审计等范围领域,请勿用于非法行为。(允许二开,赋予模块各位自己的业务逻辑,方法论只有自己熟练的才好用,好的方法论=好的生态)
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:peter9130/dsh-permission-modes
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Two composer controls that move one permission dimension each — file permission (sandbox) and approval mode — so one never changes the other.
| Control | Where | Options | Knob |
|---|---|---|---|
| 文件权限 / File permission | conversation.input.permission (the shipped seat, taken over by this bundle) |
仅可查看 / 工作区内修改 / 完全权限 | sandbox |
| 审批 / Approval | conversation.input.left, right after the permission and plan controls |
手动批准 / 无需确认 | approval behaviour |
Both render one card panel: icon, title, one explanatory line and a check mark. Keyboard: Enter/Space opens, ↑/↓ move, Esc closes and returns focus. Picks are disabled while the Session is running.
ask): an action that needs authorization asks you; the Web UI
shows its approval card.*-auto): the action is allowed without asking. This is agree,
not reject — see below.Six presets, one per sandbox × approval-mode pair:
| Sandbox | 手动批准 | 无需确认 |
|---|---|---|
read-only |
read-only |
read-only-auto |
workspace-write |
workspace-write |
workspace-write-auto |
danger-full-access |
danger-full-access |
danger-full-access-auto |
A pick resolves the target preset from the other dimension's current value, so
switching 工作区内修改 → 完全权限 keeps the approval mode and vice versa. The
three ask ids keep the stock names, so existing stored defaults and recorded
selections still resolve.
The approval policy union is ask | never, and never rejects before any
answerer runs, so a "no prompt" mode cannot be expressed as a policy value.
Instead every *-auto preset carries approval: ask, and the Host half
prepends an approval/request answerer: while the Session's current preset is
one of the three *-auto ids it returns allowed-once (the request is recorded
in the approval audit as allowed), and for every other preset it calls next()
so the deployment's own answerers — the Web UI card — handle it.
Consequences:
ask policy, and no
approval-policy switch notice is emitted, because switching modes moves no
knob. The mode is visible in the Session's permission/preset record.*-auto; other
Sessions, subagents included, keep asking.The shipped permission control lists whole presets; with six presets it would
show six combined entries instead of one file-permission choice. This bundle
registers its own sandbox picker at slot priority -1 (the lowest priority
renders) and shows the same three file-permission labels. The approval picker is
purely additive in conversation.input.left.
The bundle patch writes the six presets onto
@deepseek-ai/dsh-permission-presets with defaultPreset: workspace-write. The
profile patch layer applies after every bundle layer, so a permission row in
~/.dsh/profiles/<profile>/cordis.patch.yml overrides it; restate the whole
table when you do.
Changing cordis.patch.yml or index.js reloads on the next loader
recomposition (restart DSH, or disable and re-enable the bundle in the plugin
manager). The browser half alone hot-reloads on its own.
commands host
plugin and a Web Client. Without the catalog a chip shows a retry row./permission slash picker and the General-settings default row show all
six presets (Workspace Write Auto, …) and stay functional; only the composer
is dimension-aware.conversation.input.permission at -1 conflicts
with this one.workspace-write + never state) shows 自定义 on both chips until one pick
lands it on a complete preset.POST /permission-modes/log route and
appends the crash (message and stack, at most one line per distinct report per
ten seconds) to ~/.dsh/permission-modes.log. Nothing is written while both
pickers render normally; delete the file any time.npm 首发正在等待 registry 的安全冷却期结束;若
npm view dsh-permission-modes还查不到,请直接用下面的 Release 安装包。
这是一个 DeepSeek Harness(DSH)Web 插件 bundle,三种装法任选。
在 DSH 里直接让插件管理器按包名安装:
用 plugin_manager 安装 dsh-permission-modes@1.0.1
国内网络访问 npm 源通常比 GitHub 快;也可以先 npm view dsh-permission-modes version 确认版本。
打开 Releases,下载 dsh-permission-modes-1.0.1.tgz。
把它交给 DSH 的插件管理器:
用 plugin_manager 的 install_bundle 安装 /绝对路径/dsh-permission-modes-1.0.1.tgz
git clone https://github.com/peter9130/dsh-permission-modes.git
然后在 DSH 里用 plugin_manager install_bundle 指向该目录,或把目录放进
~/.dsh/profiles/<profile>/vendor/ 后安装;开发时也可以直接 link: 到该目录。
用 plugin_manager 把 dsh-permission-modes 升级到最新版本
或重新执行一次安装并指定新版本号(如 dsh-permission-modes@1.0.2)。
在「设置 → 插件」里禁用并删除该 bundle,或从 profile 的 package.json
(dependencies 与 dsh.profile.bundles)里去掉 dsh-permission-modes 后重新安装依赖。
宿主端(index.js / cordis.patch.yml)改动需要重启或禁用再启用;浏览器端
(client.js)由 client-hmr 热加载,约 10 秒生效。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: sandbox。