Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

CallMeGuLab/dsh-purge-safe

Security & Privacy

Red-team plugin that patches a local DeepSeek Harness install with a prompt-injection layer, toggleable per profile.

104
95
JavaScript
Apache-2.0
4 days old

What it is

dsh-purge-safe is a JavaScript plugin for an already-installed, official DeepSeek Harness (DSH). Its goal is to separate model-level refusals from host-layer limits by patching the local Harness install with prompt injection, rule sets and a host-policy override, then letting you toggle those changes from a dock beside the session title What this is.

The dock has two pages: Clean (patch status, Apply / Restore / Uninstall, prompt editor, rule sets) and Drill (assets and local environment after authorization, with bundled skills and knowledge base). Apply writes changes to the user's own @deepseek-ai packages and local profile; it does not patch the Harness source tree and only looks at DSH_HOME or nearby .dsh directories.

Version 0.1.0 targets DSH 0.2.1-rc.5 (rc.2 still works); rc.3/rc.4 and newer are not supported, and unmatched patches stay pending or skipped Supported hosts.

Quick start

Prerequisites: an installed official DSH (dsh web or desktop EXE), dsh on PATH or pnpm available, and a matching profile (web or desktop). The plugin market and npm registry should not be used; the name is not on npm and the market entry can fail with already queued Install.

  1. Install from the GitHub tarball with the exact codeload.github.com URL:
dsh plugin --profile web add https://codeload.github.com/CallMeGuLab/dsh-purge-safe/tar.gz/refs/heads/main

Use --profile desktop for the desktop EXE Quick start. With pnpm only, cd into $DSH_HOME/profiles/web and run pnpm add with the same URL.

  1. Fully quit and reopen that host. Adding the plugin does not patch DSH by itself.

  2. Click dsh-purge-safe beside the session title, open Clean, and click Apply. A successful Apply restarts the host once.

  3. Verify with /purge status in chat, which prints DSH_HOME and the patch list. CLI equivalents are dsh-purge-safe --status, --apply, --revert, --uninstall and --edit Usage.

If pnpm skips install scripts, the README provides pnpm add --allow-build=dsh-purge-safe ..., pnpm approve-builds, and an ensure-profile-bundle.mjs fallback; manual installation is documented for cases where neither dsh nor pnpm is available.

How the prompt injection works

On Apply, the plugin backs up matched files, replaces them, and injects the encrypted default prompt shipped with the plugin. On each later session, the turn-level decision picks the injection source: an active rule set (prompt-inject.md) first, then checked local AGENTS.md / CLAUDE.md in the current directory, then the plugin default; a workspace policy of strict / fallback / always decides whether the DSH workspace baseline section is kept How it works.

Restore and uninstall

Each target is copied to <file>.dshpurge.bak before the first apply. Restore or /purge revert copies backups back and removes them; without a backup, shim lines are stripped. prompt-inject.md is kept as a user file. Uninstall restores first if patches were applied, then deletes the inject file, rule library and plugin; Apply is idempotent Restore.

Constraints

  • Only official local DSH installs are touched; community Desktop and npm-global installs are not patched. Web and desktop profiles are installed and applied separately, and applying one from the other is discouraged Path detection.
  • After a DSH upgrade, originals may no longer match, so those patches show as skipped and are left unchanged.
  • The default Bash foreground wait is restored to 60 seconds; a profile-level bash-sandbox config can lower it, and a shorter wait only changes how long the foreground wait lasts, not command speed Response speed.
  • The README forbids attacks on public or third-party systems, requires lawful authorization and limits testing to authorized local Harness or lab environments; depending on the applicable law, a user using the tool remains responsible legal and compliance disclaimer.
  • The repository is Apache-2.0, carries a notice requiring attribution on forks, and forbids resale of the original build NOTICE.

HotRepo's take

The project appeared on HotRepo's new-project list on 2026-11-10 with 104 stars, 95 forks and 4 stars gained over a roughly 90-minute window, and the star curve rose from 100 to 104 over the same morning. That is early-stage data and says nothing about adoption; the near-parity of forks and stars is more notable for a plugin that must be installed from a GitHub tarball, since forks and redistribution are explicitly addressed in the attribution and resale terms. No all-language daily rank has been recorded, so there is no broader trending signal to weigh yet.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

You might also like

  1. YuJunZhiXue/dsh-purgeA local red-team plugin that patches DeepSeek Harness defaults and injects alternate prompts for authorized testing.JavaScript19,655
  2. HunYiSage/dsh-purgePatches a locally installed DeepSeek Harness to replace host prompts and policy defaults for authorized red-team evaluation.JavaScript17,007
  3. mmparko/dsh-purgeA local-host jailbreak and policy-patch plugin for DeepSeek Harness, aimed at red teams testing their own installation.JavaScript2,189
  4. JeffKeeping/dsh-purge-plusA patcher for DeepSeek Harness that injects a custom red-team prompt kernel and ruleset into every session.JavaScript429
  5. kingcharleslzy-ai/dsh-purgeA community fork of a DeepSeek Harness plugin that tunes how the coding agent responds, with self-checks and local backup rollback.JavaScript2,750