fix(files): reject nonregular capture and JSON inputs

Verify selected files through a nonblocking opened handle before reading. Preserve regular-file symlinks and return actionable CLI/MCP diagnostics without publishing output.

Co-authored-by: YouWish <29498139+Y0UW1SH@users.noreply.github.com>
This commit is contained in:
You Wish authored and GitHub committed 2026-10-10 01:49:54 +08:00
1 parent cfce91d418
commit 5f16124a31
11 files changed
+442 -14

No files matched your search

@@ -29,9 +29,10 @@ export class AndroidAnalysisService {
const request = androidRequestSchema.safeParse({ operation, input });
if (!request.success)
return err(new AnalysisInputError(operation, { cause: request.error }));
const target = await parseBinaryTarget(request.data.input.path, {
...(options?.signal === undefined ? {} : { signal: options.signal }),
});
const target = await parseBinaryTarget(
request.data.input.path,
options?.signal === undefined ? {} : { signal: options.signal },
);
if (!target.ok) return target;
const executed = await this.provider.execute(
target.value,