{"record":{"id":"883156f086d3996e","repo":"ruvnet/ruflo","slug":"dangerous-command","errorCode":"DANGEROUS_COMMAND","errorMessage":"Cannot allow dangerous command: ${command}","messagePattern":"Cannot allow dangerous command: (.+?)","errorType":"exception","errorClass":"SafeExecutorError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/security/src/safe-executor.ts","lineNumber":451,"sourceCode":"\n    return {\n      process: childProcess,\n      stdout: childProcess.stdout,\n      stderr: childProcess.stderr,\n      promise,\n    };\n  }\n\n  /**\n   * Adds a command to the allowlist at runtime.\n   *\n   * @param command - Command to add\n   */\n  allowCommand(command: string): void {\n    const basename = path.basename(command);\n\n    if (DANGEROUS_COMMANDS.includes(basename)) {\n      throw new SafeExecutorError(\n        `Cannot allow dangerous command: ${command}`,\n        'DANGEROUS_COMMAND'\n      );\n    }\n\n    if (!this.config.allowedCommands.includes(command)) {\n      this.config.allowedCommands.push(command);\n    }\n  }\n\n  /**\n   * Checks if a command is allowed.\n   *\n   * @param command - Command to check\n   * @returns True if command is allowed\n   */\n  isCommandAllowed(command: string): boolean {\n    const basename = path.basename(command);","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/security/src/safe-executor.ts#L433-L469","documentation":"Runtime allowlist extension refused: allowCommand was asked to approve a command whose basename appears in DANGEROUS_COMMANDS. The static constructor check is enforced identically at runtime, so an inherently dangerous executable cannot be allowed into the allowlist after the executor is built.","triggerScenarios":"Thrown at v3/@claude-flow/security/src/safe-executor.ts:451 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the dangerous command from the allowlist entry being added.","Use a safe alternative command that accomplishes the same task."],"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"}