PerryLink/dsh-defend
PerryLink★ 0TypeScriptLast synced: 2026-08-16
Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness: Aho-Corasick detection with allow/ask/block interception and sanitized audit events
README excerpt
🛡️ dsh-defend Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness. Rules decide the known. Interception decides the rest — and everything is audited. English · 简体中文 · Español · Português · हिन्दी Compatibility Surface Status Harness DeepSeek Harness 0.1.0-rc.6 (compat declared for 0.1.0-rc.5 – 0.1.0-rc.6 ) Node ^22.19.0 \ \ =24.0.0 Platforms All (pure host; no native code, no network) Model Any (detection runs before content reaches the model) What you get dsh-defend puts two independent layers in front of the agent: 1. Destructive-delete guard — the executable form of the 8·14/8·16 postmortem lesson. On tools/pre-execute , recursively deleting shell commands are refused unless every target is an explicit absolute path inside the session workspace and outside the protected prefixes (home config, .dsh / .claude , system directories). Dry-run markers ( -WhatIf , --dry-run , git clean -n ) pass, because they are exactly the check the lesson demands. 2. Detection layer — ported from four upstream assets (all Apache-2.0, see THIRD PARTY NOTICES.md): 25 Prompt-Injection-Payloads rules, 25 Jailbreak-Detector patterns through a pure-TypeScript Aho-Corasick automaton,…
View full README on GitHub →