Skip to content

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 09 Aug 22:14
· 5 commits to main since this release
v0.2.1
1d0334b

Install

cargo install mandible

Or download a pre-compiled binary from the assets below. Verify with the accompanying .sha256.


This release addresses the root causes behind the execution safety lockouts introduced in previous versions. By fixing a severe underlying argument-parsing bug and refining fallback behaviors, Mandible is now globally safer and has restored documentation support for essential system-state tools.

Critical Safety & Execution Hardening

  • Fixed the Empty Positional Hazard (<tool> -- ""): The primary cause of the catastrophic system freezes reported in earlier versions has been identified and fixed. A clap completion probe was passing an empty string as a first positional argument (<tool> -- ""). For pattern-matching tools like pkill, an empty string means "match everything." Measured in a private PID namespace, pkill -- "" killed every reachable process. This specific argument shape is now globally refused at the execution chokepoint (Spec §6 rule 2a) for all tools.
  • Blocked Dangerous Fallbacks (-h): Mandible normally falls back to -h if --help fails. However, for machine-state tools (halt, poweroff, reboot, shutdown), -h is an action flag meaning "halt". Unprivileged execution was the only thing preventing Mandible from rebooting the host machine during a background sweep. The -h fallback is now strictly refused for these specific system tools.
  • Specification Correction: Corrected the safety rationale in spec.md. The previous assumption that killall foo --help was dangerous was factually incorrect (on glibc, GNU getopt permutes arguments and safely processes --help first). The true hazard was the empty positional bug mentioned above.

Restored Tool Support

  • Process Killers & System Tools Browsable: With the root execution bugs fixed, tools previously locked behind a blanket ban (pkill, killall, fuser, reboot, shutdown, etc.) are now safely probed using a strict <tool> --help shape.
  • Coverage Boost: Twelve of the thirteen previously locked tools now parse successfully. pkill now yields 27 fully described flags, and killall/fuser yield 16 each. This bumps overall described coverage from 89.20% to 89.23%.

Parser Accuracy Improvements

  • Removed Inaccurate clap CompleteEnv Probe: This probe was the source of the dangerous empty positional argument. Beyond being unsafe, it was highly inaccurate—lacking a strict protocol signature, it relied on shape heuristics that falsely matched unrelated tools (like echo, bzless, and update-alternatives). Removing it deleted eight bogus parses and actually improved described accuracy without losing valid data for any tool.

Project Metadata

  • Canonical Repository Move: The project's official repository is now [https://github.com/AS-FOSS/mandible](https://github.com/AS-FOSS/mandible). This update is reflected in the crates.io metadata and the mandible mandible easter egg.