dsh-redteam-model
SeaOf0
基于dsh web实现的多种模式,目的是服务于redteam进行授权的安全研究,覆盖渗透测试、红队评估、代码审计等范围领域,请勿用于非法行为。(允许二开,赋予模块各位自己的业务逻辑,方法论只有自己熟练的才好用,好的方法论=好的生态)
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:TMrazbw/dsh-approval-memory
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A profile-level Host + Client plugin for DeepSeek Harness (DSH) that records approval requests, groups them into request classes, shows counts and possible risk, and lets the user auto-approve selected read-only classes.
0.3.2allowed-onceapproval/asked / approval/decided from every session in the current profile.plugin_manager:list_bundles and
bash:sandbox:danger-full-access.force-push, deploy, data-delete,
send-message; they never affect auto-approval.read requests are auto-approved;write/edit approval trusts exactly that file for that session;tool/result events./dam-ui command, and the open_dam_ui agent tool for natural-language opening.In a DSH Web session, install this repository as a profile bundle:
plugin_manager
action: install_bundle
target: https://github.com/TMrazbw/dsh-approval-memory
Or with the DSH CLI:
dsh plugin --profile <profile> add https://github.com/TMrazbw/dsh-approval-memory
The installation action requires approval and may need a DSH restart depending on the profile's HMR setup.
The plugin targets the public DSH 0.2.x plugin/event APIs. It was verified against DSH
0.2.1-rc.2. API changes in other DSH versions may require adjustments.
After installation:
/dam-ui.open_dam_ui.Command names are lowercase; the typed command is /dam-ui, while the menu label is DAM-UI.
V1 enables these low-risk read-only classes by default:
plugin_manager:list_pluginsplugin_manager:list_bundlesplugin_manager:list_version_exemptionsplugin_manager:inspect (if the installed DSH exposes it)Everything else is conservative:
| Class | Behavior |
|---|---|
plugin_manager:set_plugin / set_bundle |
displayed, switch disabled (medium risk) |
plugin_manager:install_bundle / remove_bundle |
statistics only |
plugin_manager:set_version_exemption |
blacklisted, never auto-approved |
bash / pwsh sandbox escalation |
statistics only |
write / edit sandbox escalation |
statistics only |
bash / pwsh / write / edit full access |
blacklisted |
| unknown / MCP / PTC | statistics only |
Risk labels are static inferences, not a security guarantee.
%DSH_HOME%/approval-memory by default:classes.jsonrules.jsonevents.jsonl_plugin.logOptional plugin config:
| Field | Default | Meaning |
|---|---|---|
dataRoot |
%DSH_HOME%/approval-memory |
data directory |
maxEvents |
5000 |
retained audit events |
maxExamples |
3 |
examples retained per class |
includeSubagents |
false |
allow auto-approval in subagent sessions |
Environment override: DSH_APPROVAL_MEMORY_ROOT.
open_dam_ui tool only opens the panel; it never changes rules.connection.fetch routes:GET /api/approval-memory.snapshotPOST /api/approval-memory.mutate (setRule / closeAll)node --test --test-isolation=none
Current test suite: 136 tests, covering classification, extraction, redaction, storage, Host runtime, data bridge, Client registration, command-risk parsing, path trust, result tracking, and integration flows.
index.js Host entry
client.js Client entry: panel, sidebar, /dam-ui, open_dam_ui tool view
lib/
classes.js request class catalog
blacklist.js permanent deny list
extract.js callId/tool-call, command/cwd, and reason extraction
format.js counts, time, redaction
store.js file-backed persistence (v2 risk metadata)
host.js approval runtime
open-tool.js plain ToolDefinition for open_dam_ui
bridge.js authenticated snapshot/mutate routes
command-risk.js pure command-risk heuristics (recorded and displayed)
path-trust.js session path normalization and sensitive-path checks
test/ 136 Node tests
locale/ en / zh display metadata
No build step is required. The plugin uses only public DSH events/services and the browser module loader.
MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: security。