Skip to content

Ultimate Hardening 2.6.1

Choose a tag to compare

@Kal1010101 Kal1010101 released this 15 Nov 23:55
· 69 commits to main since this release

Fix release, with security hardening for the Ansible role. A dry run no longer claims module 1 updated packages, --check-update no longer crashes on a large GitHub response, and the Ansible role can pin the exact package or commit it installs, accepts only UH_* settings and saves reports readable by their owner only.

Fixed

  • --dry-run no longer says "System packages updated" for module 1 or counts
    it as a fix, so a preview that changes nothing now ends with
    "0 fixes applied".
  • --check-update died silently with exit 141 when GitHub's release response
    was larger than a pipe buffer (64 KB): echo was killed by SIGPIPE once
    grep -m1 had its match, and set -o pipefail ended the run. It now
    searches the saved response directly.
  • Reading AIDE's database path and an --aide-verify fingerprint file no
    longer depends on sed finishing before head exits.
  • Ansible role: uh_install_method: git failed on every run after the first
    (ansible-core 2.19's git module cannot update a shallow tag checkout). The
    role now makes a full clone, about 11 MB.

Changed

  • The test that keeps cmd | grep -q out of the code now also catches
    pipes into head, grep -m and awk … exit that do not handle their
    status, the same SIGPIPE-under-pipefail bug class.
  • OpenSSF Scorecard runs on every push to main and weekly, publishing its
    results to the Security tab and the public Scorecard API.

Security

  • Ansible role: uh_settings accepts only UH_* keys. It becomes the
    environment of the tool, which runs as root, so a key such as BASH_ENV
    or LD_PRELOAD could run code as root.
  • Ansible role: uh_package_sha256 pins the package's hash in your own
    playbook, checked instead of the release's SHA256SUMS, so a release whose
    package and checksums were both replaced is caught. uh_git_commit does
    the same for a git install: the role stops if the release tag does not
    point at that commit.
  • Ansible role: saved compliance reports are mode 0600 instead of 0644; they
    list each host's failed checks.

Documentation

  • docs/comparison.md compares the tool with Lynis, OpenSCAP and
    ComplianceAsCode, ansible-lockdown and dev-sec, says when to pick one of
    those instead, and how to use them together. The README links it.
  • The README opens with a demo of a preview, an apply and a revert, recorded
    in a Debian 12 container.
  • The README says how to upgrade from 2.5.0 or earlier, and mentions the KVM
    virtual machine round trips run before a release.