Skip to main content

Module confirmation

Module confirmation 

Source
Expand description

Safety confirmation flow for pages export.

Implements a multi-step confirmation flow that ensures users explicitly acknowledge the implications of publishing encrypted content to a public site.

§Confirmation Steps

  1. SecretScanAcknowledgment - If secrets detected, user must type “I understand the risks”
  2. ContentReview - User confirms they have reviewed the content summary
  3. PublicPublishingWarning - User types the target domain to confirm
  4. PasswordStrengthWarning - If password entropy < 60 bits, user chooses action
  5. RecoveryKeyBackup - User types the last word of the recovery key
  6. FinalConfirmation - User presses Enter twice

Structs§

ConfirmationConfig
Configuration for the confirmation flow.
ConfirmationFlow
Manages the multi-step confirmation flow.

Enums§

ConfirmationResult
Result of processing user input for a confirmation step.
ConfirmationStep
Confirmation step identifiers.
PasswordStrengthAction
Password strength action selected by user.
StepValidation
Result of a confirmation step validation.
UnencryptedConfirmResult
Result of unencrypted export confirmation.

Constants§

EXIT_CODE_UNENCRYPTED_NOT_CONFIRMED
Exit code for unconfirmed unencrypted export.
MIN_STRONG_PASSWORD_BITS
Minimum password entropy in bits for full strength.
UNENCRYPTED_ACK_PHRASE
Required phrase for unencrypted export acknowledgment.

Functions§

check_robot_mode_unencrypted
Check if robot mode allows unencrypted export.
count_required_steps
Get the number of required steps for the given configuration.
estimate_password_entropy
Calculate password entropy using character class analysis.
password_strength_label
Get a human-readable password strength label.
robot_mode_blocked_error
Generate the error JSON for blocked robot mode unencrypted export.
unencrypted_warning_lines
Format warning messages for unencrypted export.
validate_unencrypted_ack
Validate unencrypted export acknowledgment phrase.