{"record":{"id":"dd014f721892ccc1","repo":"ruvnet/ruflo","slug":"empty-allowlist","errorCode":"EMPTY_ALLOWLIST","errorMessage":"At least one allowed command must be specified","messagePattern":"At least one allowed command must be specified","errorType":"exception","errorClass":"SafeExecutorError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/security/src/safe-executor.ts","lineNumber":198,"sourceCode":"      pattern => new RegExp(this.escapeRegExp(pattern), 'i')\n    );\n\n    this.validateConfig();\n  }\n\n  /**\n   * Escapes special regex characters.\n   */\n  private escapeRegExp(str: string): string {\n    return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n  }\n\n  /**\n   * Validates executor configuration.\n   */\n  private validateConfig(): void {\n    if (this.config.allowedCommands.length === 0) {\n      throw new SafeExecutorError(\n        'At least one allowed command must be specified',\n        'EMPTY_ALLOWLIST'\n      );\n    }\n\n    // Check for dangerous commands in allowlist\n    const dangerousAllowed = this.config.allowedCommands.filter(\n      cmd => DANGEROUS_COMMANDS.includes(path.basename(cmd))\n    );\n\n    if (dangerousAllowed.length > 0) {\n      throw new SafeExecutorError(\n        `Dangerous commands cannot be allowed: ${dangerousAllowed.join(', ')}`,\n        'DANGEROUS_COMMAND_ALLOWED'\n      );\n    }\n  }\n","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/security/src/safe-executor.ts#L180-L216","documentation":"SafeExecutor config validation (EMPTY_ALLOWLIST): the constructor was given an allowedCommands array with zero entries. An allowlist-based executor with an empty allowlist would either block everything or, worse, be tempted to bypass checks, so construction fails fast.","triggerScenarios":"Thrown at v3/@claude-flow/security/src/safe-executor.ts:198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty allowedCommands array when constructing the SafeExecutor.","Load the allowlist from configuration and fail fast at startup if it is empty."],"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-14T05:17:10.506Z"}