Discover Centmin Mod today
Register Now

Stable Branch fix cmsec python cwd import, JSON fallback, dnf updateinfo errors and…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Nov 28, 2026 at 6:34 PM.

  1. eva2000

    eva2000 Administrator Staff Member

    60,650
    12,635
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,302
    Local Time:
    4:41 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix cmsec python cwd import, JSON fallback, dnf updateinfo errors and cache key races in 132.00stable

    Five defects shared by every cmsec check. A root run from a directory
    holding a json.py imported it; the Python-free JSON fallback produced
    invalid JSON when a quote appeared after the first line; a failed dnf
    updateinfo query read as an update listing; and the cache could store a
    verdict under a key that no longer matched the host, or serve any stored
    verdict when the state key could not be computed.

    Changes:
    - tools/cmm-security/checks/*.sh (all 10 checks): json_escape() runs
    python3 -I (isolated mode), and its sed fallback joins all lines before
    escaping, so multi-line text with quotes stays valid JSON. The 8 checks
    that run dnf updateinfo print the dnf error and record a reason when the
    query fails.
    - tools/cmm-security/cmsec.sh: the same two fixes in
    cmsec_json_escape_inner(); run_check_fresh() rechecks the state key
    after the check runs and caches the result only when it is unchanged;
    an empty state key skips the cache.
    - tools/cmm-security/lib/cache.sh: cache reads, stale reads and writes
    refuse an empty state key.

    Continue reading...

    132.00stable branch