前言¶
DeepSeek Harness(DSH)在轉發提示詞之外,還會在運行時重寫提示詞、設置審批門控、調整沙盒策略以及遷移會話。如果只問“模型是否回答”,往往會把主機層的攔截誤判爲模型的拒絕。dsh-purge 插件將這兩層分離,在用戶本機已安裝的官方 Harness 上進行受控評測和清洗,幫助排查默認策略是否過嚴。
核心定位¶
dsh-purge 是 DeepSeek Harness 的網絡安全紅隊工具插件。它專注於本地官方 Harness 的受控評測與清洗,內置演練臺。插件支持針對不同模型切換提示詞,默認提示詞面向國模「小碼醬」。該項目由 YuJunZhiXue 維護,採用 MIT 許可證。
主要功能¶
該插件提供以下核心能力:
-
dsh-purge dock
點擊會話標題旁的按鈕打開右側 Dock,包含 Clean 和 Drill 兩個頁面。 -
提示詞編輯器
支持針對不同模型切換提示詞,通過編輯器調整規則集。 -
本地文件處理
支持讀取$DSH_HOME、.dsh等路徑的本地文件,用於配置和提示詞注入。 -
內置演練臺
授權後可訪問資產、技能和本地環境,用於模擬演練。 -
Host policy 修改
提供默認副本、權限策略和工具限制的修改功能,不改變官方能力,不僞造身份。 -
自動檢查
啓動時自動檢查並重新應用配置,防止手動修改文件導致失效。
安裝與啓用¶
插件未提供命令行安裝腳本,需通過以下渠道獲取:
典型用法¶
使用 dsh-purge 進行注入和配置時,遵循以下步驟:
- 在 dsh-purge 的 Clean 頁面上點擊 Apply。Apply 僅將提示詞和補丁寫入磁盤,此時進程中的注入尚未生效。
- Apply 操作完成後,必須點擊 Restart。只有重啓 host 後,注入纔會進入新的會話。Apply 單獨執行時看起來沒有任何變化。
- 使用提示詞編輯器調整規則集,針對特定模型定製安全策略。
適用場景與注意事項¶
該插件僅限本地官方 Harness,不攻擊公共互聯網。目標版本爲 DSH 0.1.7-rc.2。使用前需檢查源碼與許可證。
Strict legal and compliance disclaimer
Disclaimer: This is a non-profit open-source project. It follows applicable laws and the rules of the platforms it uses, and is intended only for learning and research. Do not use it for any illegal or non-compliant purpose; the user bears any resulting consequences.
Zero-tolerance statement: This project opposes and forbids any illegal activity. The authors do not support, encourage, or assist unauthorized network attacks, exploit use, data theft, unlawful intrusion into computer information systems, or generation of illegal or prohibited content. Anyone who uses this project for crime is solely responsible under the law. The authors have no liability.
- This repository contains no illegal material. The published code, docs, patches, and default prompt are not malware, backdoors, unauthorized pentest kits, ransomware, credential-stuffing scripts, or attack payloads aimed at the public internet or third-party systems.
- Local official Harness only. Security-eval patches and prompt injection run only on the official DeepSeek Harness already installed on the user’s machine.
- Eval patches do not attack the public internet. Apply, inject, revert, and uninstall stay in local files and local processes. They do not scan, probe, intrude, or send attack traffic to any public host.
- Lawful, controlled scope. Testing must stay on the authorized local official Harness, offline local synthetic fixtures, authorized cybersecurity ranges, and compliant lab environments.
- Forbidden uses. Users must not use this project to violate applicable laws (Criminal Law, Cybersecurity Law, Data Security Law, etc.) or engage in unauthorized intrusion, sabotage, credential stuffing, or spreading malicious payloads.
結語¶
dsh-purge 爲本地官方 Harness 提供了可視化的紅隊評測環境,能夠分離主機層與模型層的拒絕行爲。通過 Clean 和 Drill 頁面,開發者可以更精細地控制測試範圍和權限策略。項目代碼開源在 GitHub,目錄頁提供文檔索引。