"""Shell danger level enumeration."""

from __future__ import annotations

from enum import IntEnum


class ShellDangerLevel(IntEnum):
    """Severity classification for dangerous shell commands.

    Levels are ordered from least to most severe so that numeric
    comparisons (``level >= ShellDangerLevel.HIGH``) work naturally.
    """

    LOW = 1
    """Minor risk — command may have unintended side-effects but is
    generally recoverable (e.g. ``chmod 777`` on a single file)."""

    MEDIUM = 2
    """Moderate risk — command can cause data loss or security exposure
    in common scenarios (e.g. ``sudo rm``, ``wget | sh``)."""

    HIGH = 3
    """High risk — command is likely to cause significant, hard-to-reverse
    damage (e.g. ``dd if=``, ``mkfs``)."""

    CRITICAL = 4
    """Critical risk — command can destroy the entire system or create a
    fork bomb (e.g. ``rm -rf /``, ``:(){ :|:& };:``)."""
