Skip to content

Commit 77586cb

Browse files
author
Cameron Cooke
committed
fix: reject unsafe macOS process IDs in schema
1 parent 4dab1fb commit 77586cb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/mcp/tools/macos/stop_mac_app.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ import {
1515

1616
const stopMacAppSchema = z.object({
1717
appName: z.string().min(1).optional(),
18-
processId: z.number().int().positive().optional(),
18+
processId: z
19+
.number()
20+
.int()
21+
.positive()
22+
.refine(Number.isSafeInteger, 'processId must be a positive safe integer.')
23+
.optional(),
1924
});
2025

2126
type StopMacAppParams = z.infer<typeof stopMacAppSchema>;

0 commit comments

Comments
 (0)