Introduction¶
In DeepSeek Harness (DSH), there is often a missing tier between Workspace Write and Full access (danger-full-access): the former still asks repeatedly for operations outside the trusted zone, while the latter hands the approval strategy to never. If you wish to automatically pass calls that are “clearly harmless” and targets within “configured trusted zones,” while letting other requests continue to be confirmed by humans, you can use the DSH plugin dsh-auto-approval-plugin maintained by StyxNether.
What is this¶
dsh-auto-approval-plugin is a DSH permission approval plugin. It adds an auto-approval preset tier to DSH, positioned between Workspace Write and Full access.
Verified plugin information is as follows:
- Name:
StyxNether/dsh-auto-approval-plugin - License: MIT
package.jsonversion: 2.1.0- Core capability: Automatically approve harmless commands and operations, especially requests where the target is within a configured trusted zone; trusted zones can be outside the current workspace
- For requests that do not meet the auto-approval conditions, do not reject them and continue to hand them over to the human approver in the deployment
It does not switch DSH directly to full permissions, but adds a layer of automatic determination on the approval/request path.
Core Capabilities¶
This plugin works around DSH’s approval path, with main capabilities including:
- Register a
prependlistener on DSH’sapproval/requestpath, so it runs before the Web approval prompt. - Read real tool arguments based on
tool/callevents recorded in the session log, such as command text,file_path,workdir, without reading thejustificationstring written by the model itself. - Use
realpathto resolve the deepest existing ancestor path for trusted zone path inclusion checks, avoiding symlink or junction bypasses. - Return
allowed-oncefor auto-approved requests, and writeapproval/askedandapproval/decided: allowed-onceto the session log. - Call
next()for non-auto-approved requests to hand them back to the human approver. The plugin itself does not reject any request. - Provide a default tier in
General settings → Permission, as well as the immediate session switch command/permission auto-approval. - Provide a
Settings → Auto Approvalpage, including the master switch, scope, trusted area editing, harmless/dangerous pattern tables, decision length limit, log switch, and recent decision records. - Support
mode: gated,mode: global, andmode: off. - Support configuration items:
trustedAreas,harmlessPatterns,dangerousPatterns,maxCommandChars,logDecisions,trustedHosts. - When reading old configurations, it migrates the legacy
enabledorrequireTrustedPresettomode.
Installation¶
Both of the following commands can install the plugin. The first installs from the npm registry, and the second installs from GitHub and suggests using <commit> for a fixed version.
dsh plugin --profile <profile> add dsh-auto-approval-plugin
dsh plugin --profile <profile> add github:StyxNether/dsh-auto-approval-plugin#<commit>
Here, <profile> and <commit> are both placeholders and need to be replaced with your own actual values during installation.
After installation, the plugin’s bundle patch will rewrite the complete permission preset table. When upgrading DSH, you need to keep it in sync with the table from @deepseek-ai/dsh-base; if the target row is missing, the patch will warn and skip.
Enabling¶
There are two ways to enable it:
- Immediate session switch:
/permission auto-approval
- Set default values for future sessions: Go to
General settings → Permissionand set the default tier toauto-approval.
You can also configure via the Settings → Auto Approval page. This page contains:
- master switch: The master switch
- scope: Scope, optional
Only when the session tier is Auto ApprovalorGlobally, regardless of the session tier - trusted areas: Trusted zones
- harmless/dangerous pattern tables: Harmless/dangerous pattern tables
- decision length limit: Decision length limit
- log switch: Log switch
- recent decisions: Recent decisions
Changes to Web settings are written to the auto-approval section of settings.yaml and take effect immediately.
If mode is off, the Auto Approval tier will behave like Workspace Write: the tier remains visible, but it will not automatically approve any requests.
Typical Configuration¶
The mode defaults to gated after installation, with the following meanings:
off: Disable auto-approvalglobal: Auto-approve matching requests under any session tiergated: Auto-approve matching requests only when the current session tier isauto-approval
trustedAreas is empty by default. This means that trusted zone auto-approval will not take effect before paths are added.
Basic combined configuration can be written in the profile’s composition file:
~/.dsh/profiles/<profile>/cordis.patch.yml
Example structure:
- id: auto-approval
config:
# Defaults to gated after installation
mode: gated
# List of absolute paths for trusted zones; empty by default means trusted zone auto-approval is not enabled
trustedAreas: []
Other verified configuration items include:
harmlessPatterns
dangerousPatterns
maxCommandChars
logDecisions
trustedHosts
Where:
harmlessPatterns: Used to match harmless commands or operationsdangerousPatterns: Hand over to human confirmation after matching; the plugin does not rejectmaxCommandChars: Decision length limitlogDecisions: Decision log switchtrustedHosts: Controls non-loopback hosts allowed to access the configuration HTTP API; loopback is always allowed, cross-site requests are rejected
How Auto-Approval Works¶
The following flow corresponds to the processing order of the plugin on the approval/request path:
- DSH initiates the request needing approval.
- The plugin’s
prependlistener runs before the Web approval prompt. - The plugin finds the
tool/callevent recorded in the session log viacallId. - The plugin reads real tool arguments instead of the model’s justification.
- The decision module determines if the request is
allowordefer. - If it is
allow, returnallowed-once; the request will not enter the human confirmation UI. - If it is
defer, callnext()to let the human approver in the deployment decide.
Note that auto-approval is not a permanent authorization. The DSH sandbox still constrains all non-elevation calls; a single auto-approved call simply allows that specific call to run in a wider mode as requested, while the session’s standing tier remains unchanged.
Applicable Scenarios and Notes¶
This plugin is suitable for scenarios where you have accepted the DSH human approval cost but wish to reduce repetitive confirmations for a few verifiable requests. It is not a security boundary, but a scope control: it only automatically approves a narrower, verifiable category of requests and automatically completes the approval step for the human.
Notes before use:
- Do not use it on machines or sessions where you are unwilling to trust a human operator to execute commands.
- The plugin does not reject requests; non-auto-approved requests will continue to go through human confirmation.
trustedAreasis empty by default, so trusted zone auto-approval will not take effect before trusted zones are added.trustedHostsaffects non-loopback access to the configuration HTTP API; confirm the source host before modifying.- As a DSH plugin, it runs with DSH and may cause a specific call to execute in a wider mode; it is recommended to check the source code and MIT license before installing.
- When upgrading DSH, check if the bundle patch is synchronized with the permission preset table from
@deepseek-ai/dsh-base.
Links¶
- Directory page: https://www.skillhub.cn/plugins/StyxNether/dsh-auto-approval-plugin
- GitHub: https://github.com/StyxNether/dsh-auto-approval-plugin