AI Agent Hub
Back to plugins
🖥️

dsh-model-redactor

Client Updated 2026.08.16

Run the following command in DeepSeek Harness:

dsh plugin install zerodegress/dsh-model-redactor

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install zerodegress/dsh-model-redactor in your DeepSeek Harness terminal to install the plugin; source code is available at https://github.com/zerodegress/dsh-model-redactor .

About this plugin

When the model inside DeepSeek Harness processes config files, API responses, or logs, sensitive material such as API keys, Bearer tokens, and PEM private keys can quietly slip into user messages or model output and become a permanent part of the session log and future context. dsh-model-redactor exists to stop that leak at the source.

The plugin works on both the input and output paths. On input, user messages are rewritten to redacted copies before they enter the session log or the model request, and already-logged tool results are cleaned through session surface replacement while preserving the original append-origin events in the durable log. On output, text deltas, reasoning streams, and tool-call argument deltas are redacted before the agent loop writes them, and block-end payloads are handled as well so the assembled assistant message cannot reintroduce a secret. Built-in rules are fixed and cover OpenAI sk- keys, Bearer and Basic headers, GitHub and Slack tokens, JWTs, PEM private-key blocks, and AWS AKIA access key IDs, and users can extend coverage with custom regex patterns and exact-word matches while the replacement string remains configurable.

It is aimed at any developer whose DeepSeek Harness workflows touch live credentials, particularly those who need the model to inspect deployment configs, CI logs, or network captures that contain real API keys, without leaving those keys in durable session logs or future model context.

Use Cases

  • Auto-redact API keys when the model reads config files containing credentials
  • Prevent sensitive tokens from persisting in session logs and future model context
  • Avoid credential leakage in agent loops when processing CI logs or network captures

Best For

  • Developers using DeepSeek Harness to process credential-bearing data
  • Engineering teams auditing session log security
  • AI application teams letting models inspect sensitive logs or captures