JohnXu22786/secret-guard
JohnXu22786★ 0TypeScriptLast synced: 2026-08-16
dsh security plugin: blocks agents from reading/writing sensitive files (.env, credentials), masks leaked secrets in tool results, audit journal, safe sg_* inspection tools
README excerpt
secret-guard 面向 DeepSeek Harness(dsh)的安全插件:在 agent 的文件工具执行 之前 拦截对敏感文件的读写( .env 、credentials、密钥文件等),防止 API 密钥等机密泄漏到对话上下文;并对工具结果做 内容掩码兜底 ,即使有内容绕过了拦截也会被清洗。 - 零构建:纯 TypeScript 源码加载(dsh 用 Node 原生 strip-only 类型剥离加载 .ts ,因此源码 不得使用 参数属性等 strip 不支持的语法——本仓库已遵守,并有 npm run smoke:strip 冒烟检查);自包含,运行时依赖仅 @deepseek-ai/dsh-tools (工具定义)与 schemastery (配置校验)。 - 拦截层: tools/pre-execute 瀑布事件(在工具体执行前短路)。 - 兜底层: tools/post-execute 瀑布事件(对结果内容做形状识别掩码)。 - 配套 sg 安全检查工具:只返回键名、行号、形状、布尔值与 HMAC 指纹, 永不返回原始值 。 - 审计日志:JSONL 追加式、按大小轮转;规则文件热加载(自动轮询 + 手动 sg reload )。 目录结构 安装与接入(dsh 如何加载它) 插件遵循 dsh 的 Cordis 插件约定:一个导出 name / inject / Config / apply(ctx, config) 的 ESM 模块(入口 src/index.ts ),由 cordis.patch.yml 作为 bundle 层插入插件树。注册的副作用(事件监听、工具注册、文件轮询)都在 apply 返回的清理函数与 Cordis 上下文中可逆卸载。 安装后默认配置即生效。检查插件树: 本地开发(不安装) 未安装到 profile 时,patch 行里的包名无法从 profile 目录解析,需要用 绝对路径 overlay 指向源码入口。注意 Windows 上 Node 的 ESM 不认盘符路径( D:/… 会被当成协议),必须加 file:/// 前缀: 环境要求 - dsh ≥ 0.1.0-rc.6( @deepseek-ai/dsh-tools 类型即 0.1.0-rc.6 的接口面) - Node.js ≥ 22.19(或 ≥ 24) - peer 依赖: @deepseek-ai/cordis 、 @deepseek-ai/dsh-tools 、 @deepseek-ai/dsh-llm (仅类型)、 schemastery (宿主 profile 需提供, dsh plugin add 会自动安装 peer) 插件接口一览 接口 说明 清单 package.json 的 dsh.bundle.patch → cordis.…
View full README on GitHub →Category
🎨 Best DeepSeek Harness Design Plugin. The open-source Claude Design alternative. 🖥️ Local-first desktop app. 🖼️ Your coding agent becomes the design engine: prototypes, landing pages, dashboards, slides, images & video — real files, HTML/PDF/PPTX/MP4 export. 🤖 Claude Code / Codex / Cursor / DeepSeek Harness / OpenCode & 20+ CLIs via BYOK.
★ 87,271
volcengine/OpenVikingSelf-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
★ 28,588
titanwings/colleague-skill将冰冷的离别化为温暖的 Skill,欢迎加入数字生命1.0!Transforming cold farewells into warm skills? It's giving rebirth era. Welcome to Digital Life 1.0. 🫶
★ 22,692