ciceroyang/dsh-privacy-guard: Pre-Send Privacy Check for DeepSeek Harness

When developing agents with DeepSeek Harness (DSH), it’s common to accidentally include phone numbers, ID card numbers, bank card numbers, or API keys in Prompts. Once these sensitive data enter the model context, they may cause leaks or security risks.

dsh-privacy-guard is a pre-send privacy reminder plugin. It pops up a notification bar below the editor before you send sensitive information to the model, with one-click masking support. Maintained by ciceroyang, this plugin aims to help non-security-professional developers avoid such mistakes.

Core Features

The plugin scans draft text locally in the browser. Its detection capabilities include:

  • Phone numbers: Chinese mainland mobile phone numbers.
  • ID card numbers: 18-digit ID card numbers with validation support.
  • Bank card numbers: 13-19 digit bank card numbers with Luhn validation support.
  • API keys: Supports common prefixes like sk-, github_pat_, AKIA, AIza.
  • Private keys: Private keys containing PEM headers.
  • Email addresses: Regular email addresses.
  • IP addresses: IPv4 addresses.

Installation and Activation

Installing this plugin requires a DeepSeek Harness Web Profile environment and Node.js version 20 or newer.

Run the following command to complete installation and mounting:

dsh plugin --profile web add github:ciceroyang/dsh-privacy-guard#v0.1.1

Usage

After installation, when you type text containing sensitive information in the editor, a notification bar appears below the editor.

  • Mask: After clicking, the middle sensitive characters are hidden, keeping only the first 2 and last 2 characters. The remaining parts will not be sent to the screen or logs.
  • Ignore: After clicking ignore, the prompt no longer appears for the current draft. When you edit or modify the content, the prompt will reappear when matching items are entered again.

Mechanism and Notes

  • Local execution: The scanning process is completed entirely locally in the browser, with no data transmitted, no network calls made, and nothing written to local storage.
  • Send control: The plugin does not block sending; the user decides whether to mask. If you choose not to handle it and send directly, the data will still be sent to the model normally.
  • Limitations: The plugin is based on regex pattern matching and is not a data loss prevention guarantee. If the format of sensitive data is not recognized (e.g., not covered by the rules defined by the plugin), it may not be intercepted. Rules are located in lib/patterns.js for easy extension.

If you need to prevent sensitive information leakage in Prompts while using DSH, this lightweight local scanning plugin is a practical supplementary solution.

For more details, see the GitHub repository.

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

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

Xiaoye