
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
DSH 工程师级数据库插件:sql_list/query/exec/schema/stats/health 六工具,SQLite/MySQL/PostgreSQL 三引擎、多连接、只读模式与写操作审批门、词法级只读保护、流式行数钳制与可配置查询/写超时。
你的 agent 会查库了:SQLite / MySQL / PostgreSQL 三引擎,只读白名单 + 写审批门。
DSH(DeepSeek Harness)工程师级数据库插件:六个工具覆盖连接管理、只读查询、写操作、结构探查、统计概览与健康自检。
已在官方 @deepseek-ai/dsh@0.1.2-rc.1 与最新源码模式下验证(2026-09-04);0.1.2-alpha.5 仍可使用,两版插件/工具契约一致。遵循 cordis 组合包补丁模型(cordis.patch.yml + dsh.bundle.patch),运行时不 import 任何 @deepseek-ai/* 内部模块。
dsh plugin --profile web add dsh-sql
dsh plugin --profile web remove dsh-sql
卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile cordis.patch.yml 中覆盖的插件行。
- id: sql
name: 'dsh-sql'
config:
connections:
- name: local
engine: sqlite
file: E:\data\app.db # 或 :memory:
- name: prod
engine: postgres
host: db.internal
database: app
# password: xxx # 推荐环境变量 DSH_SQL_PASSWORD_PROD
- name: legacy
engine: mysql
host: 127.0.0.1
port: 3306
user: root
database: legacy
maxRows: 1000 # 查询返回行数上限(1-10000)
queryTimeoutMs: 60000 # 单次查询超时(默认 60 秒,5 秒 - 10 分钟)
execTimeoutMs: 120000 # 单次写操作超时(默认 120 秒,5 秒 - 10 分钟)
readOnly: false # true 时禁用 sql_exec
writeApproval: true # 写操作先弹审批(默认 true)
配置缺省时会提供一个 :memory: SQLite 连接;配置一旦给出但格式无效,插件会直接报错并停止加载,不会静默回退到内存库。
| 工具 | 作用 | 安全 |
|---|---|---|
sql_list | 列出连接 + 连通性测试 | — |
sql_query | 只读查询(SELECT/PRAGMA/EXPLAIN/SHOW/DESCRIBE/WITH) | 关键字白名单 + 拒绝多语句 |
sql_exec | 写操作/DDL(可多语句脚本) | readOnly 禁用 + 审批门 |
sql_schema | 表清单 / 表结构 | 标识符白名单校验 |
sql_stats | 表数量、行数与库体积概览 | 表名引用 + 查询失败隔离 |
sql_health | 连接与安全配置自检 | 逐连接探活,不回显密码 |
sql_list {}
sql_schema {} # 列出所有表
sql_schema { table: users } # 看 users 表结构
sql_stats {} # 查看默认连接的数据规模
sql_health {} # 检查连接和安全配置
sql_query { sql: SELECT * FROM orders WHERE status = 'pending' LIMIT 50 }
sql_exec { sql: UPDATE orders SET status = 'paid' WHERE id = 42 }
exec.signal;取消时会中止等待并销毁正在工作的 MySQL/PostgreSQL 专用连接DSH_SQL_PASSWORD_<连接名> 环境变量node:sqlite,零依赖pnpm install
pnpm test # 构建 + 完整测试套件(含真实 SQLite 集成)
MIT
FAQs
连接 SQLite、MySQL 或 PostgreSQL,查询数据并检查数据库结构。
The npm package dsh-sql receives a total of 82 weekly downloads. As such, dsh-sql popularity was classified as not popular.
We found that dsh-sql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.