{"record":{"id":"2276cf7566ab8ae8","repo":"ruvnet/ruflo","slug":"invalid-argument","errorCode":"INVALID_ARGUMENT","errorMessage":"Command not allowed: ${subcommand}","messagePattern":"Command not allowed: (.+?)","errorType":"exception","errorClass":"BdBridgeError","httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts","lineNumber":434,"sourceCode":"    }\n  }\n\n  /**\n   * Execute a bd command with validated arguments\n   *\n   * @param args - Command arguments (validated and sanitized)\n   * @returns Command output\n   */\n  async execBd(args: string[], skipCache = false): Promise<BdResult<string>> {\n    const startTime = Date.now();\n\n    // Validate all arguments\n    const validatedArgs = this.validateAndSanitizeArgs(args);\n\n    // Validate subcommand is allowed\n    const subcommand = validatedArgs[0];\n    if (subcommand && !ALLOWED_BD_COMMANDS.has(subcommand)) {\n      throw new BdBridgeError(\n        `Command not allowed: ${subcommand}`,\n        'INVALID_ARGUMENT',\n        'bd',\n        validatedArgs\n      );\n    }\n\n    // Check cache for cacheable commands\n    const cacheKey = hashArgs(validatedArgs);\n    const isCacheable = !skipCache && subcommand && BdBridge.CACHEABLE_COMMANDS.has(subcommand);\n    const isStatic = subcommand && BdBridge.STATIC_COMMANDS.has(subcommand);\n\n    if (isCacheable) {\n      const cached = staticCache.get(cacheKey) as BdResult<string> | undefined;\n      if (cached) {\n        this.logger.debug('Cache hit for bd command', { command: subcommand });\n        return {\n          ...cached,","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts#L416-L452","documentation":"execBd() validated the (already-sanitized) first argument against the ALLOWED_BD_COMMANDS allowlist and it is not an permitted subcommand. The bd bridge only executes whitelisted subcommands; the rejected subcommand name is included so the caller can see which token was blocked.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:434 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only subcommands present in the allowlist; add the subcommand to the allowlist if it is legitimate.","Validate user-supplied commands against the allowlist before dispatch and report the permitted set."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}