From c5ac2cc1b85c659a61808ee37b87997b84b86a19 Mon Sep 17 00:00:00 2001 From: Emerson Braun Date: Fri, 22 May 2026 08:42:33 -0300 Subject: [PATCH] Potential fix for code scanning alert no. 29: Insecure temporary file Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- packages/tools/src/discovery.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/tools/src/discovery.ts b/packages/tools/src/discovery.ts index 21be84e8..07f67380 100644 --- a/packages/tools/src/discovery.ts +++ b/packages/tools/src/discovery.ts @@ -4,7 +4,6 @@ import { webSearch } from './web-search' import { fetchUrl } from './fetch-url' import { filesystem } from './filesystem' import { shell } from './shell' -import { tmpdir } from 'node:os' export interface ToolMetadata { name: string @@ -29,7 +28,7 @@ export function listTools(): ToolMetadata[] { const tools: ToolDefinition[] = [ webSearch(), fetchUrl(), - ...filesystem({ basePath: tmpdir() }), + ...filesystem({ basePath: process.cwd() }), shell({ allowed: [] }), ]