dsh-ssrf-guard
Run the following command in DeepSeek Harness:
dsh plugin install jwilson411/dsh-ssrf-guard
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install jwilson411/dsh-ssrf-guard to add this SSRF guard plugin to your DeepSeek Harness workspace; the full source is available at https://github.com/jwilson411/dsh-ssrf-guard .
About this plugin
When your code or a model needs to fetch an external URL, an unvalidated hostname can silently route the request to 127.0.0.1, 169.254.169.254, or any internal address. That is the simplest form of SSRF. dsh-ssrf-guard answers exactly one question: may this URL be fetched? The answer comes from an explicit host-and-scheme allowlist that defaults to denying everything. Before any socket is opened, the URL is parsed and its host and scheme are matched case-insensitively; a miss is a hard block.
It registers a single tool, ssrf_check, for the model or for callers at the egress point. The check is purely syntactic: parse, string-match, scheme-verify. It opens no connection, resolves no DNS name, and reads no body or header. Regardless of allowlist contents, loopback addresses, link-local ranges (including the cloud metadata service at 169.254.169.254), URLs carrying credentials, and unparseable strings are denied outright. A denial is expressed as a thrown error carrying a structured code and reason token, so no caller can silently walk past a forgotten boolean.
Built for teams running DeepSeek Harness workflows where the model may request arbitrary external fetches, and for developers who want a zero-dependency, offline-testable, fail-closed guard they can invoke as a single function call before constructing a request. It is not a reverse proxy, not DNS-rebinding defence, and not a network scanner. It is one strict answer between a question and a connection.
Use Cases
- Vet outbound URLs before a model or code opens a connection
- Block requests that would land on 127.0.0.1 or 169.254.169.254
- Add a zero-dependency, offline-testable guard at the egress point
Best For
- Teams letting models fetch external URLs inside DeepSeek Harness
- Developers who want a one-line guard without adding a proxy or WAF
- CI/CD pipelines that need a fail-closed check before building a request
Related Plugins
A network security red-team benchmark plugin for DeepSeek-V4.1/Flash featuring dual-layer kernel injection and zero-tool architecture for controlled model safety assessment.
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.