Forces every active session into the full-access permission preset (this disables the approval gate) and appends approval, sandbox and tool-call events to a local JSONL for after-the-fact review. Audit path is configurable; it never uploads anything.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:wojiao42/dsh-approval-audit
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
简体中文(完整版) · English (abridged)
This is an abridged English version. The Chinese README is the source of truth; details that change often (design notes, changelog, edge cases) live there.
Risk warning: installing this switches the approval gate off.
- Every active session is forced to preset
danger-full-access(sandboxdanger-full-access+ approval policynever). Nothing asks you before it runs: file deletions, overwrites and arbitrary commands just execute.- Manually switching back to "read-only" is not a rollback. Within a live session it is not overridden immediately, but the first session event after a DSH restart switches it again. While the plugin is mounted, do not expect manual settings to hold. Real rollback: uninstall the plugin (or remove the manual patch line) and restart.
- Approval events and tool-call arguments are appended to a local JSONL (default
$DSH_HOME/audit/approvals.jsonl). Nothing is uploaded, but the file can contain secrets (commands, paths, credentials in paths).- Only for machines that do not run untrusted code, and users who know exactly why they want this.
- No undo, no "careful mode". You assume the consequences.
Host-side plugin for DeepSeek Harness: forces every active session to full access (approval never) and appends approval / tool-call events to a local audit JSONL. No UI; the only visible output is the audit file.
What it does
- Switches each session to the
danger-full-accesspreset on its first session event: sandboxdanger-full-access+ approvalnever. - Covers existing sessions too, not only new ones — that is the difference from a profile default preset, which only applies to sessions created later.
- Appends one JSON line per watched event to a local audit file:
approval/asked,approval/decided,approval/policy,sandbox/mode,permission/preset,tool/call,tool/result,turn/end, plus its ownauto-preset/auto-preset-failedrecords. - Payloads are truncated (tool arguments 300 chars,
tool/resultmeta 200, other data 400);tool/resultrecords onlyerrorandmeta. - Read-only otherwise: it does not modify session events or work files, has no network access, no
child_process, and no third-party dependencies.
Quick start
- Install — GUI (recommended on desktop): Settings (Ctrl+,) → Plugin market → Custom install →
github:wojiao42/dsh-approval-audit; or CLI:
# Desktop
dsh plugin --profile desktop add github:wojiao42/dsh-approval-audit
# Web
dsh plugin --profile web add github:wojiao42/dsh-approval-audit
It mounts itself and starts cutting permissions immediately — there is no second confirmation step. From v1.1.0 the package ships
dsh.bundle.patch(→cordis.patch.yml), so installing it adds the plugin to the profile patch layer; restart DSH and it is running.The audit file defaults to
$DSH_HOME/audit/approvals.jsonl; setDSH_APPROVAL_AUDIT_LOGto override it. Check that file after one tool call.
To control mounting yourself instead (e.g. run from a local source directory), append this to $DSH_HOME/profiles/<profile>/cordis.patch.yml:
- insert:
- id: approval-audit
name: 'dsh-approval-audit'
(or the absolute path of index.js as name:; forward slashes on Windows.)
Key limits
- One switch per session object: manual read-only is not overridden immediately, but a restart or a rebuilt session switches again. Remove the plugin (or the manual patch line) to really stop it.
- Audit file is append-only and never rotated; delete it yourself (re-created on the next write).
- Audit path does not follow the workspace:
DSH_APPROVAL_AUDIT_LOG→$DSH_HOME/audit/approvals.jsonl→~/.dsh/audit/approvals.jsonl; writes fail silently. - Failed
permissionPresets.set()is swallowed and only logged asauto-preset-failed; the session keeps its old preset. PRESETis compiled in: changing it needs a Harness restart (Host hot reload is off by default).- The plugin applies to every session, regardless of workspace.
- Installs and mounts immediately: there is no "install now, enable later" staging step; uninstall to back out.
Compatibility
- Host-side plugin, no client UI (
dsh.clientnot declared). - Mounts either automatically via
dsh.bundle.patchinpackage.json(→cordis.patch.yml), or manually through the profile user patch layer; both need a DSH that supports cordis patches. - Package name:
dsh-approval-audit(previously@local/dsh-approval-audit). - Requires the host's
permissionPresetsservice and a preset literally nameddanger-full-access. - Only Node built-ins (
node:fs,node:path,node:os); no third-party packages, noenginesorpeerDependencies. - No automated tests in this repo; see the Chinese README for the manual verification steps.
License
MIT. See LICENSE.
Links
More in this category
kenryu42/cc-safety-net★ 1900
Pre-execution guard that blocks destructive Git and filesystem commands and access to secrets such as SSH keys and .env files before a tool call runs.
ADWMC/helm-d#helmd★ 984
Security-analysis plugin for DeepSeek Harness: 33 tools spanning six security domains, evidence/reporting and toolbox, plus the case lifecycle, routing and tool ledger; a session-bound case workflow with an evidence chain, E-id validation and reproducible findings; 362 on-demand references; three hot-swappable persona profiles; and a four-tab workbench (armor / case / intercept / about) with case-state recovery after context compaction.
toby-bridges/api-relay-audit★ 904
Runs local security audits of AI API relays and LLM proxies from DeepSeek Harness, producing Markdown reports for prompt injection, model substitution signals, tool-call rewriting, error leakage, stream integrity, and profile-gated Web3 risks.
SeaOf0/dsh-redteam-model★ 807
Authorized-security DSH collection: nine work modes (redteam coordinator, pentest, code audit, binary analysis, attack-defense, AV evasion, incident response, cloud security, CTF solving) and fifteen runtime plugins, managed from a settings page with one-click deploy, install, update and uninstall.
howmp/dsh-pentest★ 616
Authorized pentest mode for DeepSeek Harness — exploration chain, assets and findings with a Web view.
PerryLink/dsh-auto-review★ 244
Second-model auto-review on the approval answerer chain: a read-only reviewer subagent returns structured allow/deny verdicts with reasons, fail-closed by default.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.