Introduction

The plugin-based architecture of DSH (DeepSeek Harness) allows developers to flexibly extend functionality, but introducing external plugins also introduces security risks. Conducting a security review before enabling or updating a plugin is a necessary step. TrustLens aims to address this issue by helping developers assess the security of a plugin before installation through static scanning, semantic review, and user confirmation mechanisms.

Plugin Positioning

TrustLens is a DSH plugin used to review other plugins. It is maintained by Mengshang-spec and is licensed under the MIT License. The plugin does not require, import, launch, install, download, or execute the plugin being inspected; it only provides review signals through static analysis and semantic review.

Core Features

TrustLens primarily provides the following capabilities:

  1. Static scanning: Performs read-only static analysis on plugin code to detect common security risk patterns, including remote execution, download and execute, encoded evaluation, persistence, and exfiltration of environment data.
  2. Semantic review: Uses the model selected in the current DSH session to perform a semantic review of the plugin. It does not hardcode DeepSeek or silently switch models; it directly uses the currently active model.
  3. Conflict reporting: Reports contradictions between plugin code, comments, and README files through commentConflicts.
  4. User confirmation and isolation: Provides a user confirmation step before enabling, updating, or disabling/isolating a plugin, allowing users to make decisions based on the review report.

Installation and Activation

Install it using the DSH CLI:

dsh plugin --profile web add github:Mengshang-spec/dsh-plugin-trustlens

After installation, the plugin will automatically declare its manifest and patch entry.

Usage

The specific steps to enable TrustLens and review a plugin are as follows:

  1. Open DSH settings.
  2. Select the AI Review option.
  3. Enter the name and path of the package to be reviewed (the path must be located under the current profile’s node_modules directory).
  4. Start the review. The results will display the currently active model, static findings, semantic findings, and documentation conflicts.

Considerations

When using TrustLens, note the following points:

  • Limitations of static scanning: Static scanning is intentionally conservative and may produce findings for security-related example strings or regular expressions. These findings are review signals, not evidence of malware.
  • Model and credential dependencies: Semantic review requires an active DSH model and credentials. If the current model cannot be determined, the plugin will fail closed.
  • Data trustworthiness: Plugin code, comments, README files, strings, and model outputs are all treated as untrusted data.

Appendix

TrustLens has been included in the DSH ecosystem directory and GitHub repository:

  • Ecosystem directory: https://www.skillhub.cn/plugins/Mengshang-spec/dsh-plugin-trustlens
  • GitHub: https://github.com/Mengshang-spec/dsh-plugin-trustlens