Introduction¶
DeepSeek Harness (DSH) uses a plugin architecture and adapts to different runtime environments through extended functionality. When the DSH process runs in a WSL (Windows Subsystem for Linux) environment, it often needs to read low-level configuration information from the Windows system. Exposing registry access interfaces directly poses security risks, and directly manipulating the Windows registry in a WSL environment is cumbersome. The dsh-wsl-registry plugin solves this problem. It acts as a middle layer, restricting Windows registry access to read-only and allowing access only to designated security-scoped areas.
Plugin Positioning¶
dsh-wsl-registry is a DeepSeek Harness plugin. Its core functionality is to provide read-only access to the Windows registry in WSL environments, while using a strict allowlist mechanism to permit reading only keys and values under specific prefixes.
Core Capabilities¶
This plugin mainly includes the following security and access control features:
- Read-only access: The plugin only provides read operations and does not allow modifying registry data.
- Access allowlist: Access is strictly limited to the following key prefixes:
HKLM:\SOFTWAREHKLM:\SYSTEM\CurrentControlSet\ServicesHKCU:\SOFTWAREHKLM:\HARDWARE
- Security interception: Keys located under
RunorRunOncesections are blocked. Regardless of how nested the path is, access is rejected if any path segment containsRunorRunOnce. - Length limit: Registry values that are read will be truncated, with a maximum length of 400 characters.
Installation and Enablement¶
In an environment that supports DSH, use the following command to install the plugin into the current profile configuration file:
dsh plugin --profile web add github:173787247/dsh-wsl-registry
After installation, the plugin can be used in the DSH Web UI or scripts.
Typical Usage¶
After installation, you can use the win_reg command in DSH’s command line or configuration. The following are several examples:
Read information under an entire key:
win_reg path='HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
Read a specific value under a specific key:
win_reg path='HKLM:\SOFTWARE\...' name=ProductName
Applicable Scenarios and Notes¶
- Runtime environment: This plugin is only applicable to WSL environments installed and running on a Windows system. The DSH process must run inside WSL.
- Dependency version: Ensure the DeepSeek Harness version is no lower than
0.1.2. - Plugin version: The current plugin version is
0.1.0. - Permissions and security: The plugin runs with the current DSH process permissions. Before use, it is recommended to review the source code to ensure compliance with security requirements.
Conclusion¶
The dsh-wsl-registry plugin provides secure and controlled Windows registry access for DSH running in WSL. By restricting access to read-only operations and limiting the accessible scope, it helps developers obtain necessary system configuration information without increasing system risk.