fix: remove NodeSource APT repo to fix SHA1 GPG key rejection - #60
Merged
Conversation
The base image `code-interpreter-v1` includes a NodeSource APT source whose GPG key uses SHA1 binding signature. Since 2026-02-01, Sequoia PGP (sqv) rejects SHA1 signatures, causing `apt-get update` to fail with signature verification warnings. Node.js is already pre-installed by the base image, so the NodeSource repo is unnecessary. Closes #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
sandbox 模板构建和运行时,
apt-get update对 NodeSource 仓库产生签名验证失败:根因
我们的模板基于 E2B 官方的
code-interpreter-v1基础镜像。该基础镜像通过 NodeSource 安装脚本安装 Node.js:这个
setup_20.x脚本做了两件事:/etc/apt/sources.list.d/nodesource.list注册 NodeSource APT 源,并导入其 GPG 签名密钥问题出在这个 GPG 密钥(
6F71F525...0B4)的绑定签名使用了 SHA1 摘要算法。sandbox 基础镜像使用 Sequoia PGP(
/usr/bin/sqv)做 APT 签名验证。Sequoia 有硬编码的安全策略:2026-02-01 起拒绝 SHA1 签名。所以从该日期起,任何触及 NodeSource 仓库的apt-get update都会签名验证失败。为什么这个修复有效
删除 NodeSource APT 源文件,这样
apt-get update不再尝试访问 NodeSource 仓库,也就不会触发 SHA1 签名验证。这么做是安全的,因为:
改动
template.py在apt-get update前添加一行:验证计划
apt-get update输出无 NodeSource 相关 Warningnode --version正常返回npm --version正常返回Closes #59