MCPcopy Create free account
hub / github.com/freecodexyz/free-code / validateEmpty

Function validateEmpty

src/tools/BashTool/bashSecurity.ts:233–242  ·  view source on GitHub ↗
(context: ValidationContext)

Source from the content-addressed store, hash-verified

231}
232
233function validateEmpty(context: ValidationContext): PermissionResult {
234 if (!context.originalCommand.trim()) {
235 return {
236 behavior: 'allow',
237 updatedInput: { command: context.originalCommand },
238 decisionReason: { type: 'other', reason: 'Empty command is safe' },
239 }
240 }
241 return { behavior: 'passthrough', message: 'Command is not empty' }
242}
243
244function validateIncompleteCommands(
245 context: ValidationContext,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected