DeepSeek Harness Security Guard Plugin

Preface

In the plugin ecosystem of DeepSeek Harness (DSH), everything is a plugin. When developers introduce third-party plugins, they need to verify their security, such as whether they leak Tokens, establish malicious network connections, or contain obfuscated code. The dsh-security-guard plugin provides a static scanning solution to help detect the security status of installed plugins in the DSH environment.

Plugin Overview

This is a DSH plugin maintained by weisofns. It provides a 28-rule static scanner, risk scoring, whitelist/blacklist policies, a local Web dashboard, and risk pop-up functionality inside DSH.

Core Features

  • Static Scanner: Built-in 28 rules covering scenarios such as Token theft, data exfiltration, dynamic execution, obfuscation, network behavior, supply chain risks, persistence, and privilege escalation.
  • Startup Self-Check: Automatically scans installed DSH plugin packages under the profile after installation.
  • DSH Tool Registration: Registers the security_scan_plugins, security_scan_plugin, and security_guard_report tools for the model.
  • Alerting Mechanism: Supports console output, event bus, optional Webhook, level filtering, and rate limiting.
  • Local Web Dashboard: Provides a visual panel and supports a JSON API.
  • Remote Rule Updates: Supports remoteSources remote rule JSON, with optional scheduled automatic updates.

Detection Rules

The plugin includes 28 built-in detection rules, mainly categorized as follows:

  • Token Related (TOK): Hardcoded Tokens, Token exfiltration, reading DSH credentials, and environment variable credentials.
  • Data Exfiltration (EXF): Suspicious outbound domains, DNS-ICMP tunneling, and clipboard read-and-exfiltrate behavior.
  • Dynamic Execution (EXE): Dynamic code execution, subprocess execution, and remote code loading.
  • Code Obfuscation (OBF): High-entropy strings, execution after decoding, and minimal JSFuck obfuscation.
  • Network Monitoring (NET): Unauthorized listening, WebSocket exfiltration, and proxy configuration tampering.
  • File System (FS): Out-of-scope file writes, deletion of system files, and full-disk file searches.
  • Process Operations (PRO): Process injection and privilege escalation.
  • Supply Chain Security (SUP): Suspicious install scripts, dependency confusion, and Git repository poisoning.
  • Persistence (PER): Startup item implantation and Shell configuration tampering.
  • Sensitive Services (PRIV): Requests to sensitive DSH services and interception of core services.

Installation

Install using the official plugin loading method. Please completely quit DSH Host first, then run:

dsh plugin --profile web add ./dsh-security-guard-2.1.0.tgz

After restarting DSH, the plugin starts working automatically.

Configuration

The plugin is configured through cordis.patch.yml. Key configuration items include:

  • enabled: Whether to enable the plugin.
  • scanOnStart: Whether to scan on startup.
  • autoUpdateRules: Whether to automatically update rules.
  • enableWebPanel / webPanelPath: Whether to enable the Web dashboard and its path.
  • remoteSources: A list of remote rule JSON URLs.
  • whitelist / blacklist: Whitelist and blacklist policies.
  • minLevel: Minimum alert level.
  • webhookUrl: Webhook URL.

Usage

  1. Interactive Scanning: In the DSH conversation, enter “Scan my plugin security” or “Check which plugins have risks”.
  2. Model Invocation: The model automatically calls the registered tools to return a risk report.
  3. Web Dashboard: Access http://127.0.0.1:<DSH port>/security-guard in a browser to open the visual panel.

Compatibility

  • Node.js version >= 20.
  • Zero third-party runtime dependencies.
  • Depends on the official DeepSeek Harness plugin loading method (dsh.bundle.patch + cordis.patch.yml).
  • @deepseek-ai/dsh-tools is an optional dependency.

Notes

The plugin runs with the current DSH process permissions. It is recommended to review the source code and license before installation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye