forked from EduCraft/curriculum-project-hub
fix: preserve run provider capability
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@paradigm/hub",
|
"name": "@paradigm/hub",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@paradigm/hub",
|
"name": "@paradigm/hub",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/claude-agent-sdk": "^0.3.202",
|
"@anthropic-ai/claude-agent-sdk": "^0.3.202",
|
||||||
"@fastify/cookie": "^11.0.2",
|
"@fastify/cookie": "^11.0.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@paradigm/hub",
|
"name": "@paradigm/hub",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -23,11 +23,6 @@ const SAFE_HOST_ENV_KEYS = [
|
|||||||
"CPH_BIN",
|
"CPH_BIN",
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
const SANDBOX_HIDDEN_ENV_KEYS = [
|
|
||||||
"ANTHROPIC_AUTH_TOKEN",
|
|
||||||
"ANTHROPIC_API_KEY",
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
// Linux sockaddr_un.sun_path is 108 bytes including the terminator. Claude's
|
// Linux sockaddr_un.sun_path is 108 bytes including the terminator. Claude's
|
||||||
// sandbox appends its own user directory and randomized bridge socket names,
|
// sandbox appends its own user directory and randomized bridge socket names,
|
||||||
// so keep our prefix well below that hard limit.
|
// so keep our prefix well below that hard limit.
|
||||||
@@ -156,7 +151,9 @@ export async function createAgentSecurityPolicy(input: AgentSecurityInput): Prom
|
|||||||
},
|
},
|
||||||
credentials: {
|
credentials: {
|
||||||
files: sensitiveReadPaths.map((path) => ({ path, mode: "deny" as const })),
|
files: sensitiveReadPaths.map((path) => ({ path, mode: "deny" as const })),
|
||||||
envVars: SANDBOX_HIDDEN_ENV_KEYS.map((name) => ({ name, mode: "deny" as const })),
|
// These values are short-lived loopback capabilities, not Organization
|
||||||
|
// provider secrets. Denying them also strips Claude's own request auth.
|
||||||
|
envVars: [],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -66,10 +66,7 @@ describe("agent subprocess security policy", () => {
|
|||||||
allowRead: expect.arrayContaining([canonicalWorkspace, "/usr/bin"]),
|
allowRead: expect.arrayContaining([canonicalWorkspace, "/usr/bin"]),
|
||||||
},
|
},
|
||||||
credentials: {
|
credentials: {
|
||||||
envVars: expect.arrayContaining([
|
envVars: [],
|
||||||
{ name: "ANTHROPIC_AUTH_TOKEN", mode: "deny" },
|
|
||||||
{ name: "ANTHROPIC_API_KEY", mode: "deny" },
|
|
||||||
]),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -288,10 +288,7 @@ describe("runAgent", () => {
|
|||||||
},
|
},
|
||||||
sandbox: {
|
sandbox: {
|
||||||
credentials: {
|
credentials: {
|
||||||
envVars: expect.arrayContaining([
|
envVars: [],
|
||||||
{ name: "ANTHROPIC_AUTH_TOKEN", mode: "deny" },
|
|
||||||
{ name: "ANTHROPIC_API_KEY", mode: "deny" },
|
|
||||||
]),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user