Introduction¶
When running agents in DeepSeek Harness (DSH), a common practice is to add “read-side” protections: for example, content scanning plugins that restrict which text is allowed into the model context. However, there is another category of compliance and operational issues: the agent might call web_fetch, web_search, or use curl or wget in a Shell to access the external network—outbound data flow to external hosts is often the first thing teams need to clarify.
Official documentation covers network proxy configurations, and the community has plugins covering different axes like command validation and content rules. According to the maintainer’s README, as of around 2026-10-12, a search of GitHub and awesome lists showed that plugins specifically designed for “destination allowlists and intercepting web egress before tool execution” were still relatively sparse. This article introduces the community plugin dsh-egress-gate (maintained by zhengqiuyang), which performs deterministic validation on web tools at the tools/pre-execute stage and optional scanning for common fetch verbs in Shell commands.
The DSH ecosystem emphasizes “everything is a plugin”; the plugin directory site SkillHub serves as a community index and has no official affiliation with DeepSeek or Hithink RoyalFlush.
What is this¶
The positioning of dsh-egress-gate is to provide a deterministic network egress gate for DeepSeek Harness. Before web_fetch / web_search are actually executed, it checks against a configured destination allowlist / denylist; if rejected, the request is never sent. No LLM is called on the trust path.
In contrast to “read-side” content scanning (dsh-read-guard is cited as an example in the README), this plugin manages where data can flow to. It is categorized as admin-security on SkillHub; the repository github.com/zhengqiuyang/dsh-egress-gate has a current npm package version of 0.1.0 and is licensed under MIT.
Core Features¶
Web Tools: Pre-execution Interception¶
The plugin handles configured web tools (potentially including web_fetch and web_search by default) in the tools/pre-execute hook. URLs in parameters can be fully parsed, so the README describes the web-side enforcement as full-precision: destinations not in the allow rules are rejected before execution.
Shell: Observation and Optional Enforcement¶
For the configured Shell tool (e.g., bash), it scans the same command snippet for URLs following verbs such as curl, wget, Invoke-WebRequest, Invoke-RestMethod, fetch, and http. The maintainer explicitly states: it cannot penetrate scripts, variables, or proxies. Therefore, the default is shellMode: observe (alert only); rejection only occurs when explicitly set to enforce.
Policy Semantics¶
- Deny First: Any match in the deny list results in rejection.
- Non-empty Allow: Indicates “only these hosts are allowed”;
example.comcoversapi.example.com, while wildcards must be written in the*.example.comformat. - Deterministic rules throughout, with no LLM involved in decision-making.
Installation and Activation¶
The repository includes pre-built lib/ files, so installation via dsh plugin add requires no local build and no allowBuilds authorization. The installation command provided by the maintainer in the README is as follows:
dsh plugin --profile default add github:zhengqiuyang/dsh-egress-gate
Compatibility Notes (excerpted from README):
- DSH: Verified on the 0.2.x line (source snapshot 0.2.1-alpha.2);
dsh plugin addworks with any profile. - Node:
>= 20(CI matrix includes Node 20/22/24 on Ubuntu and Windows).
Upon startup, logs will show a message similar to [dsh-egress-gate] active: … (recorded by the maintainer on 2026-10-19 in a disposable profile).
Typical Configuration¶
Add an entry in the profile’s plugin configuration; fields are based on the README:
- id: dsh-egress-gate
name: dsh-egress-gate
config:
webTools: [web_fetch, web_search]
shellTool: bash # '' disables the shell scan
allow: [docs.deepseek.com, github.com]
deny: [pastebin.example]
shellMode: observe # observe | enforce
Brief description of meanings:
webTools: List of web tool names participating in pre-execute validation.shellTool: The Shell tool to scan; an empty string disables Shell scanning.allow/deny: Rules for allowed and denied hosts; deny takes precedence, and a non-empty allow list activates whitelist mode.shellMode:observeonly alerts;enforcealso rejects URLs identified in the Shell.
Use Cases and Caveats¶
Who it is for
- Teams needing to answer “which external hosts are agents allowed to access” within team or experimental environments, and who want web egress to be auditable and reproducible.
- Scenarios already using DSH 0.2.x and willing to explicitly maintain allow/deny lists in the profile.
Important Notes
- The plugin runs with the same permissions as the DSH process; you should review the source code and LICENSE yourself before installation to ensure the policy meets organizational requirements.
- Shell scanning has known precision boundaries; high-sensitivity environments should anticipate false positives/negatives with
shellMode: enforceor combine it with external network policies. - The “exit condition” declared by the maintainer: If DSH officially builds in destination policies, or if proxy-layer plugins support per-host rules, this repository will be frozen at the last available version with a review note here—you may want to watch upstream developments when choosing to adopt.
Local development and testing (from maintainer documentation):
npm install && npm test
Conclusion¶
dsh-egress-gate fills the “outbound destination” axis in the DSH ecosystem: it intercepts web tools based on a whitelist before execution and provides optional fetch URL observation or enforcement on the Shell side. If you are defining network boundaries for Harness agents, you can integrate it after cross-referencing the configuration fields on the directory page and the repository README.