fix(security): constrain image fallback hook to workspace (#1232)

This commit is contained in:
Kai (Tam Nhu) Tran authored and GitHub committed 2026-05-12 18:13:32 -04:00
1 parent 349db830df
commit 40300c286e
3 files changed
+106 -5

No files matched your search

@@ -169,6 +169,7 @@ function invokeHook(
input: JSON.stringify(input),
encoding: 'utf8',
env: buildHookEnv(env),
cwd: TEST_DIR,
timeout: 10000, // 10 second timeout per test
});
@@ -187,6 +188,7 @@ function invokeHookAsync(
const child = spawn('node', [HOOK_PATH], {
env: buildHookEnv(env),
stdio: ['pipe', 'pipe', 'pipe'],
cwd: TEST_DIR,
});
let stdout = '';
@@ -531,6 +533,7 @@ describe('Image Analyzer Hook', () => {
input: 'not valid json',
encoding: 'utf8',
timeout: 5000,
cwd: TEST_DIR,
env: {
...process.env,
CCS_CLIPROXY_API_KEY: CLIPROXY_API_KEY,