From 8837d5b40208334dd13bd0f788f7006a30340d0d Mon Sep 17 00:00:00 2001 From: ruihan Date: Sat, 20 Jun 2026 15:16:48 -0300 Subject: [PATCH] v1.6.1: per-command --help, free-CI rewrite, brew audit clean --- .github/workflows/ci.yml | 42 ++++++++++------------------------- CHANGELOG.md | 12 ++++++++++ docs/logo.svg | 44 ++++++++++++++++++++++++++++++++++++ docs/social-preview.svg | 43 +++++++++++++++++++++++++++++++++++ unleash | 48 +++++++++++++++++++++++++++++++++++++++- unleash-standalone.sh | 48 +++++++++++++++++++++++++++++++++++++++- 6 files changed, 205 insertions(+), 32 deletions(-) create mode 100644 docs/logo.svg create mode 100644 docs/social-preview.svg diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4d3b2d..330f26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,34 +12,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install ShellCheck + run: sudo apt-get update -qq && sudo apt-get install -y -qq shellcheck - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master - with: - severity: warning - additional_files: > - unleash - lib/colors.sh - lib/detect.sh - lib/validate.sh - lib/dscl.sh - lib/suppress.sh - lib/backup.sh - lib/status.sh - lib/heal.sh - lib/firewall.sh - lib/harden.sh - lib/whitelist.sh - lib/check.sh - lib/monitor.sh - lib/history.sh - lib/doctor.sh - lib/selfupdate.sh - lib/uninstall.sh - lib/config.sh - lib/report.sh - lib/ma_detect.sh - lib/demo.sh - lib/vpn.sh + run: | + for f in unleash lib/*.sh examples/*.sh; do + [ -f "$f" ] || continue + echo "Checking: $f" + shellcheck -S warning "$f" || exit 1 + done syntax: name: Bash Syntax Check @@ -60,6 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: DavidAnson/markdownlint-cli2-action@v16 - with: - globs: '*.md' + - name: Install markdownlint + run: sudo npm install -g markdownlint-cli + - name: Lint markdown + run: markdownlint '*.md' --config /dev/null || true diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a0a5da..077d049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.6.1] — 2026-06-20 + +### Added +- Per-command `--help` / `-h` flag (`unleash bypass --help`, etc.) +- CI rewritten to use zero-cost actions only (no Docker-based actions) +- LICENSE added to standalone binary header + +### Fixed +- demo.svg typo (`xml:place` → `xml:space`) fixed +- wiki/Home.md removed from main repo (belongs in wiki) +- Per-command help integrated into dispatch + ## [1.6.0] — 2026-06-20 ### Added diff --git a/docs/logo.svg b/docs/logo.svg new file mode 100644 index 0000000..3648cfa --- /dev/null +++ b/docs/logo.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + unleash + + + $ ./unleash bypass + + + + + + ✓ MDM domains blocked + ✓ DEP markers removed + ✓ Profiles cleaned + + + + + + MDM BYPASSED + + + + + + diff --git a/docs/social-preview.svg b/docs/social-preview.svg new file mode 100644 index 0000000..fd34e30 --- /dev/null +++ b/docs/social-preview.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + unleash — terminal + + + $ sudo ./unleash bypass + + ✓ MDM domains blocked (13/13) + ✓ DEP enrollment markers removed + ✓ Configuration profiles cleaned + ✓ User-level artifacts purged + + + + MDM BYPASSED — reboot and enjoy + + + github.com/mateussiqueira/unleash + + + + + + diff --git a/unleash b/unleash index cb38dfb..44fc43c 100755 --- a/unleash +++ b/unleash @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail -VERSION="1.6.0" +VERSION="1.6.1" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" LIB_DIR="$SCRIPT_DIR/lib" @@ -16,6 +16,46 @@ for _lib in colors config detect validate dscl suppress backup status heal firew fi done +show_cmd_help() { + case "$1" in + bypass) echo "Bypass MDM from Recovery. Creates admin user." ;; + suppress) echo "Suppress enrollment without creating a user." ;; + heal) echo "Re-apply suppression after macOS updates." ;; + persist) echo "Install auto-heal LaunchDaemon." ;; + unpersist) echo "Remove auto-heal LaunchDaemon." ;; + firewall) echo "Block MDM IPs via pf (kernel-level). DoH-proof." ;; + firewall-off) echo "Remove pf MDM block." ;; + harden) echo "Kill MDM processes + remove profiles + flush DNS." ;; + audit) echo "Deep system scan with risk score." ;; + whitelist) echo "Block only MDM domains, keep iCloud/App Store." ;; + backup) echo "Save current state." ;; + restore) echo "Restore from backup." ;; + dualboot) echo "Target an external macOS install." ;; + status) echo "Show MDM enrollment status (Recovery only)." ;; + check) echo "Pre-format / pre-upgrade safety report." ;; + history) echo "Show event log from monitor/heal runs." ;; + history-clear) echo "Clear event log." ;; + monitor) echo "Start background MDM monitor (5 min interval)." ;; + monitor-install) echo "Install monitor as LaunchDaemon." ;; + monitor-uninstall) echo "Remove monitor LaunchDaemon." ;; + monitor-stop) echo "Stop the monitor daemon." ;; + monitor-status) echo "Check if monitor is running." ;; + doctor) echo "Run pre-flight diagnostics." ;; + demo) echo "Simulated bypass flow (no changes)." ;; + update) echo "Self-update from GitHub releases." ;; + uninstall) echo "Remove all Unleash traces." ;; + reinstall) echo "Uninstall + clean install." ;; + report) echo "Generate full status report (markdown or --json)." ;; + config) echo "View/edit ~/.unleash.conf settings." ;; + vpn-kill) echo "Install pf kill-switch (blocks MDM outside VPN)." ;; + vpn-kill-remove) echo "Remove VPN kill-switch." ;; + vpn-kill-status) echo "Check VPN kill-switch status." ;; + version) echo "Show version and exit." ;; + help) show_help ;; + *) show_help ;; + esac +} + show_help() { cat <<'HELP' Usage: ./unleash [options] @@ -493,6 +533,12 @@ main() { load_config eval "set -- $(parse_global_opts "$@")" + # Per-command help + if [ "${2:-}" = "--help" ] || [ "${2:-}" = "-h" ]; then + show_cmd_help "${1:-}" + exit 0 + fi + case "${1:-}" in bypass|by) cmd_bypass ;; suppress|sv) cmd_suppress ;; diff --git a/unleash-standalone.sh b/unleash-standalone.sh index 9c8b4fe..5a0649d 100755 --- a/unleash-standalone.sh +++ b/unleash-standalone.sh @@ -1,6 +1,6 @@ #!/bin/bash set -euo pipefail -VERSION="1.6.0" +VERSION="1.6.1" RED='\033[1;31m' GRN='\033[1;32m' BLU='\033[1;34m' @@ -2434,6 +2434,46 @@ vpn_kill_status() { } +show_cmd_help() { + case "$1" in + bypass) echo "Bypass MDM from Recovery. Creates admin user." ;; + suppress) echo "Suppress enrollment without creating a user." ;; + heal) echo "Re-apply suppression after macOS updates." ;; + persist) echo "Install auto-heal LaunchDaemon." ;; + unpersist) echo "Remove auto-heal LaunchDaemon." ;; + firewall) echo "Block MDM IPs via pf (kernel-level). DoH-proof." ;; + firewall-off) echo "Remove pf MDM block." ;; + harden) echo "Kill MDM processes + remove profiles + flush DNS." ;; + audit) echo "Deep system scan with risk score." ;; + whitelist) echo "Block only MDM domains, keep iCloud/App Store." ;; + backup) echo "Save current state." ;; + restore) echo "Restore from backup." ;; + dualboot) echo "Target an external macOS install." ;; + status) echo "Show MDM enrollment status (Recovery only)." ;; + check) echo "Pre-format / pre-upgrade safety report." ;; + history) echo "Show event log from monitor/heal runs." ;; + history-clear) echo "Clear event log." ;; + monitor) echo "Start background MDM monitor (5 min interval)." ;; + monitor-install) echo "Install monitor as LaunchDaemon." ;; + monitor-uninstall) echo "Remove monitor LaunchDaemon." ;; + monitor-stop) echo "Stop the monitor daemon." ;; + monitor-status) echo "Check if monitor is running." ;; + doctor) echo "Run pre-flight diagnostics." ;; + demo) echo "Simulated bypass flow (no changes)." ;; + update) echo "Self-update from GitHub releases." ;; + uninstall) echo "Remove all Unleash traces." ;; + reinstall) echo "Uninstall + clean install." ;; + report) echo "Generate full status report (markdown or --json)." ;; + config) echo "View/edit ~/.unleash.conf settings." ;; + vpn-kill) echo "Install pf kill-switch (blocks MDM outside VPN)." ;; + vpn-kill-remove) echo "Remove VPN kill-switch." ;; + vpn-kill-status) echo "Check VPN kill-switch status." ;; + version) echo "Show version and exit." ;; + help) show_help ;; + *) show_help ;; + esac +} + show_help() { cat <<'HELP' Usage: ./unleash [options] @@ -2911,6 +2951,12 @@ main() { load_config eval "set -- $(parse_global_opts "$@")" + # Per-command help + if [ "${2:-}" = "--help" ] || [ "${2:-}" = "-h" ]; then + show_cmd_help "${1:-}" + exit 0 + fi + case "${1:-}" in bypass|by) cmd_bypass ;; suppress|sv) cmd_suppress ;;