dsh-redteam-model
SeaOf0
基于dsh web实现的多种模式,目的是服务于redteam进行授权的安全研究,覆盖渗透测试、红队评估、代码审计等范围领域,请勿用于非法行为。(允许二开,赋予模块各位自己的业务逻辑,方法论只有自己熟练的才好用,好的方法论=好的生态)
MeruSu/dsh-temp-full-access
Starts a countdown when a session switches to danger-full-access and sets that session back to workspace-write when it runs out; switching back by hand cancels it, and Settings shows the shortest pending countdown.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:MeruSu/dsh-temp-full-access
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Temporarily grants full access, then puts the session back to Workspace Write on a timer.
When a session switches to danger-full-access, this plugin starts a countdown.
When it runs out, the session's permission is set back to workspace-write, and
a small toast says so. Switching the session back by hand cancels the timer
immediately; entering full access again starts a fresh countdown.
A settings section named Temporary full access / 临时完全访问:
| Half | File | Job |
|---|---|---|
| host | index.js |
Polls sessions.list() every 2 s, reads each session's effective preset via permissionPresets.current(session), remembers danger-full-access deadlines, and writes permissionPresets.set(session, "workspace-write") when one fires. |
| shared | lib/schedule.js |
The timer model: one deadline per session, cancel on leaving full access, restart on re-entry. Pure and clock-injected, so tests drive it. |
| browser | client.js |
Settings section, countdown line, toast, and the /temp-full-access/config push. |
Contract evidence (where the permission API is documented and used):
dsh-tool-cordis/lib/types/api-catalog.js:2094-2137 — service permissionPresets:
current(session) at :2112, set(session, name) at :2132.dsh-tool-cordis/lib/types/api-catalog.js:3084-3147 — service sessions: list() at :3136.dsh-subagent/lib/index.js:410 — real caller:
const preset = parent.ctx.get("permissionPresets")?.current(parent.session);dsh-sidechat/lib/index.js:4683-4684 — a third-party plugin calling
this.ctx.permissionPresets.current(...) and .set(...).The browser half never touches the permission API — the host writes presets,
the browser only asks about the timer state over two small routes
(/temp-full-access/status, /temp-full-access/config).
node --check client.js && node --check index.js && node --check test/classify.test.mjs
node test/classify.test.mjs # expect: PASS — 10 groups
node cangku/tmp/261117_gate_temp_full_access.mjs # expect: STATIC VERDICT: clean
Ten groups: shipped defaults, minute clamping, timer start, single fire,
manual cancel, re-entry restart, host status/config round-trip, settings-page
controls. Every group was proven able to fail (see cangku/tmp/tfa-probe.mjs).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: permissions、sandbox。