CLI-Anything Bundle #81 — IPMI BMC Trust Recon Pack
Four agent-native, read-only trust-recon CLI tools for the Linux IPMI BMC trust surface — the layers that decide whether a managed server's out-of-band-management story can still be TRUSTED: the BMC tool binary + kernel device + driver + unit + config census (binaries statted — never executed — /dev/ipmi* nodes strictly stat-only, /proc/modules driver token classes, openipmi/ipmi/freeipmi/ipmievd unit presence + drop-in counts, freeipmi/ipmi config family with credential KEY-PRESENCE grammar), the SEL (System Event Log) persistence + record posture census (SEL state files, capped read-only record grammar with public sensor vocabulary — credential-shaped lines ride KEY-PRESENCE rows only), the SDR-cache sensor/threshold grammar census (record-type classes over the public SDR vocabulary, six threshold-key presence rows, assertion-posture classes — values as bounded numeric shapes only), and the chassis power/boot posture census (ipmi-chassis-config grammar — power_restore_policy public vocabulary, boot-device public vocabulary, power keys as parse-presence counts — never executed). Each tool parses documented grammar and stats/reads documented files — and nothing is ever executed, no /dev/ipmi* node is ever opened (opening one talks to the BMC), nothing is ever dialed, and no credential value, raw BMC address, hostname or serial ever prints (values ride USER1/BMC1/CONFIG1/SELF1/SDRFILE1/SENSORID1/CHCONF1/ASSET1/SN1 class tokens only).
- ipmipeek — BMC tool + device + driver + unit + config census: lookup-root binary posture (ipmitool, ipmi-sel, ipmimonitoring, ipmi-config, bmc-info, ipmi-locate stat-found, never executed, DUAL_INSTALL at 2+ roots, BARE_TOOL when bins ride with zero device nodes and zero drivers); /dev/ipmi0, /dev/ipmi1, /dev/ipmidev/0 STRICTLY stat-only (mode/type/major/minor + perm class, DEVICE_PERM on weak perms); /proc/modules capped-tail driver posture (ipmi_si/ipmi_devintf/ipmi_msghandler/ipmi_ssif/ipmi_watchdog search-match token rows, full lines never carried); openipmi/ipmi/freeipmi/ipmievd unit presence + drop-in counts (UNIT_WITHOUT_TOOL); freeipmi/ipmi config census with credential KEY-PRESENCE grammar (values never read or printed, CREDS_WEAK_PERM on weak perms, ORPHAN_CONFIG for a lone config dir); remote-posture shape counts (never a raw address); honest rc6.
- ipmiselpeek — SEL persistence + record posture census: SEL tool binary posture (ipmi-sel/ipmitool stat-rowed, never executed, BARE_SELTOOL when a tool rides with zero SEL files and no readable state dir); /var/lib/freeipmi, /var/lib/ipmi, /var/cache/ipmimonitoring globs of ipmi_sel*/sel*log* cache shapes (SELF token rows, SEL_WORLD_WRITABLE / SEL_PERM findings, EMPTY_SEL_DIR honesty); capped read-only record grammar (timestamp numeric shapes iso/epoch/slashtime, ASSERT/DEASSERT direction tokens, public SDR sensor vocabulary with non-public sensors riding SENSORNAME index tokens only); credential-shaped key/value lines ride KEY_PAIR_PRESENT rows (values never read or printed); public-grammar fingerprints with DUP_SELFILE notes; UNPARSEABLE_SELFILE for content with zero parsed records; honest rc6.
- ipmisensorpeek — SDR-cache sensor/threshold posture census: lookup list over /var/lib/freeipmi + /var/cache/ipmimonitoring (plus --cache-dir/--cache-file roots) globbing *sdr* caches with identities riding SDRFILE1/SDRFILE2 tokens (cache file names can embed BMC hostnames — they never print); record-type class rows for the public SDR vocabulary (FULL_SENSOR/COMPACT_SENSOR/EVENT_ONLY, public names temperature/voltage/fan/intrusion/power supply/memory ecc print fine, non-public names ride SENSORID tokens); threshold-key presence rows for the six lower_/upper_ non-critical/critical/non-recoverable keys with numeric shape classes only (non-numeric fires THRESH_VALUE_NONNUM); EVENTEN assertion-posture rows; username/password/password2 as KEY-PRESENCE rows (values never read); group/world-writable caches fire SDR_PERM + SDR_CREDS_PERM; identical record fingerprints ride the DUP_SDRCACHE note; EMPTY_SDRLIB / EMPTY_RECORDS honesty; UNPARSEABLE_SDRCACHE finding; honest rc6.
- ipmichassispeek — chassis power/boot posture census from the ipmi-chassis-config grammar: named candidates /etc/ipmi-chassis-config + /etc/freeipmi/ipmi-chassis.conf plus *chassis*.conf* glob dirs (plus --conf-dir/--conf-file roots), identities riding CHCONF tokens; section law (SectionStart/End grammar, DUP_KEY on a key declared twice in one section, DUP_SECTION note on identical public-key fingerprints); power_restore_policy rows riding ALWAYS_POWER_ON/RESTORE_PREVIOUS/ALWAYS_POWER_OFF (POLICY_UNPARSEABLE otherwise); boot_device rows riding PXE/HDD/CDROM/DIAG/FLOPPY/BIOS-SETUP; power_on/power_off/power_cycle as POWKEY presence counts (the keys are never anything but parse presence — never executed); boot_flag_valid/cmos_clear BOOTFLAG rows; firmware_version/bios_version strictly version-shape-gated; asset_tag/serial_number/product_serial/board_serial and username/password/password2 as KEY-PRESENCE rows (values never read); writable configs fire CHASSIS_PERM, asset/cred keys inside a world-writable file fire ASSET_EXPOSURE/CHASSIS_CREDS_PERM, ALWAYS_POWER_ON inside a writable file fires POLICY_WEAK_PERM; EMPTY_CHCONF / EMPTY_RECORDS / UNPARSEABLE_CHASSISCONF honesty; honest rc6.
The contract
Every tool: rc0 clean / rc4 findings / rc6 honest nothing-readable / rc3 bad usage (argparse subclass law); --json emits exactly one report object with the keys data/findings/notes/rc/summary/tool; the default mode prints one human summary line plus capped findings rows. python3 -m cli_anything.<tool> [--json] with per-tool IPMI_* env overrides (see each SKILL.md). Pure Python stdlib — zero spawned lines, zero writes, zero network; binaries, devices, configs, state files and caches are read and statted once, and nothing is ever executed. No /dev/ipmi* character device is ever opened (opening one talks to the BMC); no power/boot key is ever sent; no BMC tool binary is ever executed; no credential value, raw BMC address, hostname, sensor serial or asset tag is ever printed (USER1/BMC1/CONFIG1/SELF1/SDRFILE1/SENSORID1/CHCONF1/ASSET1/SN1 class tokens only). The census never "fixes" a posture — it names it.