Skip to main content

run_interactive_prompt

Function run_interactive_prompt 

Source
pub fn run_interactive_prompt(
    command: &str,
    reason: &str,
    rule_id: Option<&str>,
    config: &InteractiveConfig,
) -> InteractiveResult
Expand description

Display the interactive prompt and wait for user input.

§Arguments

  • command - The blocked command
  • reason - Why the command was blocked
  • rule_id - Optional rule ID that triggered the block
  • config - Interactive mode configuration

§Returns

The result of the interactive session.

§Security

This function includes multiple security checks:

  • TTY detection before prompting
  • Random verification code generation
  • Timeout enforcement
  • Single-use codes (new code on each call)