dsh-knowcode
github.com/huuthuan-nguyen/dsh-knowcode
v0.1.23
技能包
可执行外部程序以 shell 执行命令写入文件
Unified Code Graph & Knowledge Base Plugin for DeepSeek Harness powered by Embedded FalkorDB
该插件尚未翻译,显示作者原文。
deepseek-harnessdshdsh-plugincodegraphknowledge-basefalkordbgraph-databasecypher
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注3需留意4一般15未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注4 处命中lib/server/auto-start.js:1import { spawn } from 'node:child_process';lib/db/falkor-manager.js:1import { spawn } from 'node:child_process';lib/parser/git-diff-parser.js:1import { execSync } from 'node:child_process';lib/db/falkor-manager.d.ts:1import { ChildProcess } from 'node:child_process';- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 以 shell 执行命令
shell-exec高关注4 处命中lib/parser/git-diff-parser.js:79rawDiff = execSync(`git diff ${baseRef}`, {lib/parser/git-diff-parser.js:89rawDiff = execSync('git diff HEAD', {lib/parser/git-diff-parser.js:98rawDiff = execSync('git diff', {lib/parser/git-diff-parser.js:115const statusOutput = execSync('git status --porcelain', {- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 写入文件
writes-files需留意9 处命中lib/server/auto-start.js:94mkdirSync(dataDir, { recursive: true });lib/server/daemon.js:39unlinkSync(join(dataDir, entry));lib/server/daemon.js:176mkdirSync(dataDir, { recursive: true });lib/server/daemon.js:213writeFileSync(daemonInfoPath, JSON.stringify({- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意5 处命中lib/server/client-rpc.js:45const res = await fetch(`http://127.0.0.1:${port}/status`, {lib/server/client-rpc.js:118const res = await fetch(`http://127.0.0.1:${port}/rpc`, {lib/server/client-rpc.js:135const res = await fetch(`http://127.0.0.1:${port}/query`, {lib/server/client-rpc.js:152const res = await fetch(`http://127.0.0.1:${port}/index`, {- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 可终止进程
kills-processes需留意2 处命中lib/server/auto-start.js:62process.kill(pid, 'SIGTERM');lib/server/serve-lock.js:24process.kill(pid, 0);- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 读取文件
reads-files一般33 处命中lib/server/auto-start.js:30const record = JSON.parse(readFileSync(join(workdir, dataDir, 'daemon.json'), 'utf8'));lib/server/auto-start.js:85if (existsSync(candidate))lib/server/auto-start.js:93if (!existsSync(dataDir))lib/server/client-rpc.js:16if (existsSync(infoPath)) {- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般5 处命中lib/server/auto-start.js:163env: { ...process.env },lib/db/falkor-manager.js:113const env = { ...process.env };lib/cli/trace-flag.js:7const env = process.env.KNOWCODE_TRACE;lib/parser/tree-sitter.js:88const envDir = process.env.KNOWCODE_GRAMMARS_DIR;- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 接触凭据或密钥
credentials一般2 处命中lib/db/client.js:17rust: { pkg: 'jsonwebtoken', install: 'cargo add jsonwebtoken', desc: 'JWT signing, secret verification, and claims deco…lib/tools/tool-specs.js:308description: 'Name of the function, method, or class to inspect (e.g. "PasswordHasher.verify" or "OrderRepository.save")…- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 动态加载模块
dynamic-import一般1 处命中lib/index.d.ts:20value: import("./config.js").ResolvedKnowCodeConfig;- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 4 |
| 以 shell 执行命令 | shell-exec | 高关注 | 4 |
| 写入文件 | writes-files | 需留意 | 9 |
| 发起网络请求 | network | 需留意 | 5 |
| 可终止进程 | kills-processes | 需留意 | 2 |
| 读取文件 | reads-files | 一般 | 33 |
| 读取环境变量 | reads-env | 一般 | 5 |
| 接触凭据或密钥 | credentials | 一般 | 2 |
| 动态加载模块 | dynamic-import | 一般 | 1 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 68 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)