Discipline Guard Policy Interceptor & Safety Filter

Discipline Guard Policy Interceptor & Safety Filter

Official Core
@deepseek-ai/dsh-discipline-guard·v1.4.0·sandbox

A 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

GitHubNPM
Installation & Integration
bash
manager:
$ pnpm add @deepseek-ai/dsh-discipline-guard

Architecture

Discipline Guard establishes enterprise-grade guardrails for autonomous agents. Granting agents tool-calling permissions to filesystems and APIs exposes organizations to prompt injection attacks, accidental data destruction, and compliance violations. This plugin acts as a bidirectional policy gatekeeper on the Cordis pipeline. Inbound prompts are scanned for adversarial jailbreaks and sanitized of sensitive personal credentials. Outbound tool calls undergo real-time heuristic inspection—intercepting destructive commands (e.g., dropping production tables) with mandatory approval gates.

Core Features

01

Full-Duplex Safety Gate: Inspects both inbound user prompts and outbound tool invocations

02

Curated Dangerous Command Blacklist: Halts destructive commands (`rm -rf`, `mkfs`, `DROP TABLE`)

03

Zero-Leak PII Sanitization: Replaces credentials, tokens, and personal data with synthetic tokens

04

Human-in-the-Loop Approval: Suspends sensitive actions awaiting explicit operator authorization

Core Workflow

01

Inbound Threat Scanning

Analyzes input prompts for adversarial injection, system prompt leaks, and jailbreaks.

02

PII Masking & Sanitization

Detects and redacts credentials, phone numbers, and API tokens before LLM dispatch.

03

Outbound Command Audit

Intercepts tool actions against risk blacklists and protected paths.

04

Interception & Human Review

Blocks prohibited operations or suspends execution until admin approval is received.

Configuration Parameters Reference (YAML / JSON)

ParameterTypeDefaultDescription
strictLevelstringhighSafety enforcement strictness level
maskPIIbooleantrueAutomatically redact PII and credentials
requireHumanApprovalForRootbooleantrueRequire human sign-off on root-level writes