hhl123hhl/dsh-privacy-shield ↗★ 0

dsh-privacy-shield

本地优先的隐私保护盾,脱敏敏感信息。 适合对数据隐私敏感、需防止明文隐私发送给模型的用户。

包名
dsh-privacy-shield
兼容性
待验证
版本
1.0.1
许可证
MIT
最近更新
2026年10月21日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hhl123hhl/dsh-privacy-shield

Configuration

Full reference: docs/CONFIG.md. Summary:

FieldDefaultPurpose
enabledtrueMaster switch; false registers nothing.
modeenforceenforce rewrites the model-visible surface; observe counts only.
entities26 typesEnabled entity types (see Entity types).
placeholderHashhmacPlaceholder hash: hmac (HMAC-SHA256, local key file) / legacy (FNV-1a, enumerable).
minLevellowEntity sensitivity floor (high/medium/low) when entities is not set explicitly.
addressLevelfullChinese address granularity: full to door number / street to street only.
terms[]Inline term list (term, term @category, re:regex @category).
termsFilenullLine-based word list file (relative → $DSH_HOME/shield/); hot-reloads on change.
disabledLabels[]Disabled term labels (mirrors terms label off).
rulesPacknullRules-pack file loaded at startup.
surfacesall truePer-surface toggles: system / developer / user / assistant / tool.
mediaPolicypassMedia blocks pass; text-like file contents are still masked; no image OCR.
audit.jsonl / audit.jsonlPathtrue / defaultJSONL audit sink (counts only).
audit.retentionDays30Audit retention; older lines are purged at startup.
audit.verifyOutboundfullPlaintext re-check over outbound text: full/sample/off.
audit.maxVerifyChars2000000Skip the re-check above this size.
onUnmaskablewarnblock throws instead of sending a frozen request with plaintext.
registerProjectionstrueCore masking switch (the derive patch); false = audit only.
registerCommand / registerToolstrue/shield command / shield_scan tool.
maxVaultEntries5000Vault cap (100–200000), oldest evicted first.

Removed in 0.2.0: sessionFilter — DSH's masking hooks are session-agnostic, so the shield can only operate globally; a configured sessionFilter degrades to a notice. Use /shield off for temporary exemption.