Preface¶
When developing agents using DeepSeek Harness (DSH), tool execution results often contain sensitive information such as API keys, tokens, or database passwords. If these credentials directly enter the model’s context window, there is a risk of leakage. dsh-cloak is designed to address this issue. It acts as a context firewall that intercepts and processes these credentials before the data enters the model.
Plugin Positioning¶
dsh-cloak is a plugin for DeepSeek Harness. Its core function is to detect credentials in tool results and replace them with opaque placeholders, ensuring that confidential information does not enter the context.
The plugin is maintained by user zhangmiao03. The project has been migrated to the zhangmiao03/cloakpack monorepo and shares its underlying engine with the cloakpack CLI.
Core Features¶
The plugin primarily provides the following capabilities:
- Credential detection: identifies sensitive information in tool return results.
- Placeholder replacement: replaces detected credentials with unreadable placeholders while preserving context readability.
- Context isolation: ensures that confidential data is not actually read or leaked during model processing.
Installation and Enablement¶
Before installing, make sure DeepSeek Harness and its Web server components are already installed.
- Run the following command to install the plugin:
dsh plugin --profile web add dsh-cloak
- The plugin runs as part of the DSH process and uses
@deepseek-ai/cordisand related dependencies (such asdsh-llm,dsh-tools, etc.) for interception handling.
Usage Example¶
According to the plugin maintainer, its design philosophy can be summarized as: “One product, one vault, two gates” (one product, one vault, two gates). The “two gates” here refer to:
* Git outbound gate: controls confidential information outflow at the code repository level.
* DSH model-inbound gate: controls confidential information inflow at the model context level.
The plugin code is located in the packages/dsh-cloak directory of the zhangmiao03/cloakpack repository.
Notes¶
- Permission dependency: the plugin runs with the permissions of the DSH process. Please inspect the source code and license (MIT) before installation and use.
- Ecosystem relationship: the DSH community directory has no affiliation with DeepSeek or High-Flyer officially. Please obtain the latest information through the provided GitHub links.
Conclusion¶
dsh-cloak provides DSH developers with a lightweight context security protection mechanism. By sanitizing data before model processing, it can reduce the risks involved when agents handle sensitive tasks.