
Discipline Guard Policy Interceptor & Safety Filter
Official CoreA bidirectional safety firewall and policy enforcement proxy for DeepSeek Harness. Prevents prompt injection, redacts sensitive PII data, and intercepts dangerous CLI operations in real time.
Safety-Guard · Prompt-Injection · PII-Masking · Human-in-the-Loop
$ pnpm add @deepseek-ai/dsh-discipline-guardArchitecture
Core Features
Full-Duplex Safety Gate: Inspects both inbound user prompts and outbound tool invocations
Curated Dangerous Command Blacklist: Halts destructive commands (`rm -rf`, `mkfs`, `DROP TABLE`)
Zero-Leak PII Sanitization: Replaces credentials, tokens, and personal data with synthetic tokens
Human-in-the-Loop Approval: Suspends sensitive actions awaiting explicit operator authorization
Core Workflow
Inbound Threat Scanning
Analyzes input prompts for adversarial injection, system prompt leaks, and jailbreaks.
PII Masking & Sanitization
Detects and redacts credentials, phone numbers, and API tokens before LLM dispatch.
Outbound Command Audit
Intercepts tool actions against risk blacklists and protected paths.
Interception & Human Review
Blocks prohibited operations or suspends execution until admin approval is received.
Configuration Parameters Reference (YAML / JSON)
| Parameter | Type | Default | Description |
|---|---|---|---|
| strictLevel | string | high | Safety enforcement strictness level |
| maskPII | boolean | true | Automatically redact PII and credentials |
| requireHumanApprovalForRoot | boolean | true | Require human sign-off on root-level writes |
Recommended Plugins
dsh-purge Red-Team Eval & Model Plugin
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.
Gungnir Hardened Container Sandbox & Isolation Jail
A zero-trust hardened container sandbox for executing untrusted AI code. Powered by Linux namespaces, strict seccomp syscall filters, and read-only rootfs with sub-millisecond cold starts.
Mirage In-Browser WASM Execution Sandbox & Web Worker Jail
A zero-latency, client-side WebAssembly execution sandbox for DeepSeek Harness. Runs Python, JavaScript, and SQLite inside isolated Web Workers without backend server overhead.