dsh-plugin-security: The Security Gating Plugin for DeepSeek Harness

Preface

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” As the plugin ecosystem expands, developers need to install third-party tools to extend Agent capabilities. This introduces two specific issues: first, whether the npm dependencies of plugins have known vulnerabilities; second, whether the plugin source code itself exhibits malicious behavior. dsh-plugin-security provides a security gating mechanism for DSH plugins.

Plugin Overview

This is a security gating tool for DeepSeek Harness plugins, maintained by user dushaobindoudou. It addresses the core question: how to intercept high-risk operations when an Agent invokes plugin tools, and provide dependency auditing and source code review capabilities.

Core Features

The plugin includes the following core capabilities:
* Dependency and source code scanning: Scans installed plugin source code and npm dependency security advisories.
* Risk classification: Marks plugins as High Risk, At Risk, No Risk Found, or Whitelisted.
* Invocation gating: Before a model executes a high-risk plugin tool, presents options: Allow once / Allow / Disable.
* Agent review: Provides Agent skills to allow reviewing suspicious plugins.
* State synchronization: Stays synchronized with DSH plugin manager state.
* Settings management: Provides a settings page supporting filtering, report export, and management actions.
* Agent tools: Built-in security_scan and security_review tools.
* Configuration modes: Supports off, report-only, and enforce modes.
* Whitelist mechanism: Supports a whitelist with built-in protected entries.
* Static evidence validation: Validates static evidence for non-malicious code.

Installation and Enablement

Before installation, ensure the environment meets the following requirements:
* DSH version: 0.2.x
* Node.js version: 20+ (24 recommended)

Install using the official command:

dsh plugin --profile web add dsh-plugin-security@latest

After installation, the web configuration file is automatically hot-reloaded and immediately scans all plugins. For other configuration profiles, replace web with the corresponding profile name. After upgrading the plugin, restart DSH.

Usage

After installing the plugin, it can be used in the following ways:
* Settings page: Open DSH Settings → Security Gate. On this page, you can filter plugin risk levels, view security advisories and static evidence, export JSON or Markdown reports, or enable/disable/reset/uninstall plugins.
* Invocation interception: When the model attempts to call a high-risk plugin tool, a question card appears next to the input box asking whether to allow it.
* Agent review: Directly request it in a conversation, for example: “Use the dsh-plugin-security skill to review my plugins”. The Agent calls security_scan to collect evidence, runs the five questions in the skill, and uses security_review to store the review results.

Configuration

The following settings can be configured on the settings page ($DSH_HOME/plugin-security/state.json):
* Mode: Default is report-only.
* off: No scanning, gating, or enforcement.
* report-only: Scans, records, and gates invocations, but does not automatically disable plugins.
* enforce: Automatically disables plugins when malicious review is confirmed.
* Auto-disable threshold: Default is critical. Set to never to disable automatic disabling.
* Upgrade suggestions: Disabled by default; used to suggest dependency upgrade commands.

Agent Tools

The plugin provides two tools for the Agent:
* security_scan: for a specified package (package?), force scan (force?), or obtain evidence (evidence?).
* security_review: Reviews a specified package and returns a verdict (malicious/suspicious/benign) with confidence.

Notes

  • Protected entries: Official @deepseek-ai/* packages, dsh-plugin-sentinel, and protected entries built into the plugin itself are not checked and cannot be disabled or uninstalled by this plugin.
  • Behavior definitions: Using fetch, process.env, the file system, or child processes does not by itself indicate malicious behavior. Static matches are evidence; verdicts depend on dependency facts and the Agent’s contextual review.
  • State storage: State is stored in the $DSH_HOME/plugin-security/ directory with file permissions 0700/0600.
  • Log limit: Operation logs retain at most 200 entries.
  • Permission risk: The plugin runs under DSH process permissions. Review the source code and license before installation.

Conclusion

dsh-plugin-security provides a practical security solution for the DSH plugin ecosystem. It combines static analysis, dependency auditing, and runtime gating to help developers control security risks without sacrificing flexibility.

Plugin details:
* Directory page: https://www.skillhub.cn/plugins/dushaobindoudou/dsh-plugin-security
* GitHub: https://github.com/dushaobindoudou/dsh-plugin-security

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

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

Xiaoye