Awesome Reviewers

Treat any “filter” (e.g., file ignores) as non-security unless it is enforced by a trusted, bypass-resistant control point.

Apply this standard:

Example (safe-shaped approval only):

requestToolApproval: async (request) => {
  const input = request.input as { commands?: unknown; files?: unknown };

  // Approve ONLY an explicitly supported, typed allowlist shape
  if (request.toolName === "run_commands" && Array.isArray(input.commands)) {
    const allowed = new Set(["ls", "git status", "git log --oneline -20"]);
    if (input.commands.every(c => typeof c === "string" && allowed.has(c.trim()))) {
      return { approved: true };
    }
  }

  return { approved: false };
}

Security outcome: controls become harder to bypass, fewer tool executions slip through due to malformed inputs, and secrets/configuration won’t be accidentally committed.