fix(hub): forward host HTTP_PROXY into agent sandbox (v0.0.39) (#18)

This commit is contained in:
2026-07-20 21:46:09 +08:00
4 changed files with 25 additions and 3 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@paradigm/hub",
"version": "0.0.38",
"version": "0.0.39",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@paradigm/hub",
"version": "0.0.38",
"version": "0.0.39",
"dependencies": {
"@alicloud/credentials": "^2.4.5",
"@alicloud/docmind-api20220711": "^1.4.15",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@paradigm/hub",
"version": "0.0.38",
"version": "0.0.39",
"private": true,
"type": "module",
"engines": {
+12
View File
@@ -21,6 +21,18 @@ const SAFE_HOST_ENV_KEYS = [
"LOGNAME",
"SHELL",
"CPH_BIN",
// Host egress is often only reachable via a local forward proxy. Without
// these, sandboxed Bash/curl times out on public HTTPS (ADR-0018: network
// open ≠ direct routing). Values come from the trusted service environment.
"HTTP_PROXY",
"HTTPS_PROXY",
"ALL_PROXY",
"NO_PROXY",
"http_proxy",
"https_proxy",
"all_proxy",
"no_proxy",
"NODE_USE_ENV_PROXY",
] as const;
const SANDBOX_HIDDEN_ENV_KEYS = [
+10
View File
@@ -26,6 +26,11 @@ describe("agent subprocess security policy", () => {
PATH: "/usr/local/bin:/usr/bin:/bin",
LANG: "C.UTF-8",
CPH_BIN: "/usr/local/bin/cph",
HTTP_PROXY: "http://127.0.0.1:7890",
HTTPS_PROXY: "http://127.0.0.1:7890",
ALL_PROXY: "socks5h://127.0.0.1:7890",
NO_PROXY: "127.0.0.1,localhost,::1",
NODE_USE_ENV_PROXY: "1",
DATABASE_URL: "postgresql://platform-secret",
FEISHU_APP_SECRET: "feishu-secret",
HUB_SESSION_SECRET: "session-secret",
@@ -41,6 +46,11 @@ describe("agent subprocess security policy", () => {
ANTHROPIC_BASE_URL: "http://127.0.0.1:43123",
ANTHROPIC_AUTH_TOKEN: "run-proxy-capability",
ANTHROPIC_API_KEY: "",
HTTP_PROXY: "http://127.0.0.1:7890",
HTTPS_PROXY: "http://127.0.0.1:7890",
ALL_PROXY: "socks5h://127.0.0.1:7890",
NO_PROXY: "127.0.0.1,localhost,::1",
NODE_USE_ENV_PROXY: "1",
});
expect(policy.env).not.toHaveProperty("DATABASE_URL");
expect(policy.env).not.toHaveProperty("FEISHU_APP_SECRET");