dsh-purge Red-Team Eval & Model Plugin

dsh-purge Red-Team Eval & Model Plugin

dsh-purge·v1.2.0·sandbox

dsh-purge is an open-source cybersecurity red-team evaluation plugin and harness jailbreak toolkit designed for DeepSeek Harness. Decoupling host-level runtime guardrails from intrinsic model responses, it enables custom system prompt overrides, dynamic rule set switching, and local security testbeds. Operating strictly within authorized local environments, it empowers developers to assess large language model robustness.

DeepSeek · Red Team · Prompt Injection · Harness Plugin · Security Benchmark

GitHubReleases
Installation & Integration
bash
dsh plugin --profile web add https://codeload.github.com/HunYiSage/dsh-purge/tar.gz/refs/heads/master

Introduction

In the evolving ecosystem of foundation models and autonomous agent harnesses, DeepSeek Harness operates as the primary local orchestrator responsible for managing execution sessions, permission approval gates, sandbox execution lifecycles, and system-level context wrappers. During security red-teaming research, safety boundary stress-testing, and alignment robustness assessments, researchers frequently encounter causal ambiguity. When a targeted evaluation prompt fails to produce an expected completion, researchers struggle to determine whether the model intrinsically refused the task due to safety alignment, or whether the surrounding harness environment preemptively blocked execution through host permission hooks, keyword filters, or sandbox timeouts.

To resolve this decoupling dilemma between host-level guardrails and model-level refusal dynamics, the HunYiSage maintainers team engineered dsh-purge, an open-source cybersecurity red-team evaluation plugin and harness jailbreak toolkit built specifically for DeepSeek Harness. Designed as an authorized, controlled security research suite, dsh-purge mounts directly into local official DeepSeek Harness installations across both Web and Desktop runtime profiles. By systematically decomposing host-level approval mechanisms, sandbox thresholds, and prompt overwrites, dsh-purge enables researchers to hot-swap model-specific adversarial prompts, manage versioned agent rule sets, and inspect execution pathways through an intuitive interface backed by atomic rollbacks.

Core Features

Decoupling Host Approval Gates from Intrinsic Model Responses

DeepSeek Harness does far more than forward prompts to model endpoints; it actively mutates prompts, enforces interactive permission dialogs, and restricts command timeouts during runtime execution. dsh-purge introduces a transparent introspection layer over the official @deepseek-ai runtime packages. By granting independent control over host-level filter hooks, tool usage limits, and execution policies, the plugin enables security engineers to isolate host intervention from model-level refusal behavior, establishing high-fidelity baselines for model defense benchmarking.

Model-Specific Adversarial Prompting and Dynamic Rule Sets

The plugin features an extensible prompt injection architecture, bundling a curated adversarial prompt baseline tailored for contemporary language models while permitting researchers to maintain custom prompt-inject.md overrides. On the governance layer, dsh-purge provides seamless management across multiple agent rule sets. Without altering underlying framework source repositories, security practitioners can dynamically bind targeted evaluation constraints and operational profiles to the active workspace directory, enabling rapid switching between audit scenarios.

Automated Patch State Machine and Atomic Rollbacks

Built on top of the Cordis extensible plugin architecture powering DeepSeek Harness, dsh-purge modifies runtime components via declarative patch configurations. The integrated dock sidebar presents a grouped patch state machine, allowing users to apply in-memory patches and trigger managed restarts with a single click. Crucially, the plugin guarantees complete environment reversibility: researchers can invoke the uninstaller at any time to atomically revert all modified files and restore official agent defaults, ensuring zero workspace contamination upon test completion.

Controlled Local Testbed and Bundled Red-Team Knowledge Base

To enforce research ethics and statutory compliance, dsh-purge integrates a dedicated local drill console accompanied by an offline red-team skills library and vulnerability knowledge base. Accessible only after an explicit legal disclaimer and countdown confirmation, the testbed restricts all evaluations to locally authorized test assets and synthetic targets. The software codebase and license explicitly prohibit network scanning, unauthorized penetration testing, or automated exploitation against public infrastructure, financial institutions, and production services.

Quick Start

Multi-Platform Installation and Dependency Setup

dsh-purge supports both official dsh web and desktop profiles. Prior to installation, export local terminal network proxies and execute the plugin installation command:

bash
# Configure terminal network proxies on macOS and Linux
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890

# Install the plugin into the official web profile
dsh plugin --profile web add https://codeload.github.com/HunYiSage/dsh-purge/tar.gz/refs/heads/master

# Alternatively, target the desktop profile for desktop client installations
# dsh plugin --profile desktop add https://codeload.github.com/HunYiSage/dsh-purge/tar.gz/refs/heads/master
powershell
# Configure network proxies and install on Windows PowerShell
$env:http_proxy = "http://127.0.0.1:7890"
$env:https_proxy = "http://127.0.0.1:7890"

# Install into the desktop profile
dsh plugin --profile desktop add https://codeload.github.com/HunYiSage/dsh-purge/tar.gz/refs/heads/master

Host Restart and Patch Activation Workflow

After pulling the package archive, restart the host application and activate the runtime patches:

bash
# 1. Completely exit and relaunch the target host process
dsh web

# 2. Click the dsh-purge button adjacent to the session title to open the sidebar
# Navigate to the Clean tab and click Apply; the host will automatically restart once

# 3. Verify that all runtime patches and profile bundles are active
/purge status

Custom Prompts and Rule Set Management

Security practitioners can inspect and toggle evaluation rule sets directly within terminal sessions:

bash
# List available and active rule sets
/rules list

# Switch to a specialized red-team evaluation rule set
/rules use redteam-eval

# Rewind the conversational turn without branching session state
/rewind

Tuning Command Sandbox Execution Timeouts

To optimize execution latency for long-running verification commands on macOS or Linux, customize the sandbox timeout within the profile configuration:

yaml
# Add to ~/.dsh/profiles/web/cordis.patch.yml to adjust timeout limits
- id: bash-sandbox
  config:
    timeoutMs: 10000

Frequently Asked Questions

Why does the plugin marketplace report an already queued error during installation?

This issue occurs due to locking conflicts within the built-in marketplace queue combined with the fact that dsh-purge is distributed directly via Git archive rather than the public npm registry. To bypass this lock, avoid clicking the marketplace button repeatedly and instead install the package through the terminal using the official codeload archive URL. If the queue status remains locked, execute the removal command first, clear the pending state, and pull the archive cleanly before restarting the host.

What should I do if the dsh-purge dock button does not appear next to the session title?

The absence of the dock button indicates that the host profile has not loaded the core bundle configuration. Run the configuration dump command in your terminal to inspect whether the plugin entry is properly registered within your active profile. If the entry is missing, execute the bundled bundle repair script, ensure that no stale background host processes are running, and relaunch the application to force the interface to reload.

How can I completely restore DeepSeek Harness back to its official stock configuration?

Restoration can be executed seamlessly through either the user interface or command-line tools. Within the Clean tab of the dsh-purge sidebar, clicking the Uninstall button automatically triggers rollback routines that revert all patched files, resets the default agent preset to standard mode, and restarts the host. Alternatively, passing the uninstall flag to the command-line utility achieves identical results, ensuring that all runtime modifications are cleanly expunged.

Why do evaluations under minimal or code execution modes behave differently from standard mode?

Discrepancies across execution modes typically arise when specialized presets retain unpatched filtering rules or lack necessary agent instructions, allowing certain host-level barriers to remain active. To rectify this inconsistency, upgrade to the latest plugin release, re-apply all patches through the Clean sidebar tab to update all bundled presets, and initiate a fresh chat session after the automated restart.