Four NEW agent-native read-only harnesses for the kernel's mandatory-access-control (LSM) and boot-integrity surface — which security modules the kernel actually stacks, what AppArmor and SELinux say versus do, and whether the boot chain's integrity machinery is present and running. Zero subprocesses, zero writes, no sockets, no policy runs — and AppArmor rule content NEVER leaves the tool (token classes only).
The ordered live stack from /sys/kernel/security/lsm verbatim, in position order, with registry classification (capability, yama, apparmor, selinux, smack, tomoyo, landlock, lockdown, integrity, safesetid — unknown names carried as UNKNOWN_NAME rows, never dropped). The boot-time lsm= argument from /proc/cmdline normalized per the kernel's documented comma-separated syntax and cross-checked against the space-separated live list (match verbatim on the row; live is truth). Per-LSM securityfs dir verdicts: LSM_DIR_PRESENT / LSM_DIR_ABSENT (finding — a stack-listed module with no dir) / LSM_DIR_NOT_DIR. AppArmor enabled-parameter cross-check: N while stack-listed = APPARMOR_STATE_DRIFT finding. Selinux mount + lockdown dir as data rows. rc0 clean / rc4 findings / rc6 no lsm list / rc2 usage.
Every profile under /etc/apparmor.d with the documented grammar: named profile headers (profile NAME flags=(...)) and bare-attachment bodies, nested subprofiles tracked per file. Rule content is NEVER printed — every line is reduced to token classes first. Findings: flags=(unconfined) = UNCONFINED_PROFILE; bare ux/Ux exec tokens = UNCONFINED_EXEC_TOKEN; change_profile / change_profile.onexec / change_hat = CHANGE_PROFILE_DELEGATION; brace imbalance = UNBALANCED_PROFILE; unreadable = UNREADABLE. Data: px/Pix, ix/Ix, cx/Cix transition counts (word-bounded), signal/ptrace/unix/dbus mediation heads, #include <...> system class with head names, quoted-local and include-if-exists classes, disable/ entries, and the abstractions/tunables/local/disable/force-complain layer map. Presence law: an EMPTY profile file still counts as reached policy; rc6 is reserved for an absent apparmor.d or nothing readable. rc0 clean / rc4 findings / rc6 no apparmor.d / rc2 usage.
/etc/selinux/config parsed under the KEY=VALUE law: SELINUX= (enforcing | permissive | disabled; anything else = UNKNOWN_SELINUX_VALUE), SELINUXTYPE= with per-policy-subdir presence rows (policy/, contexts/, users/) and DANGLING_SELINUXTYPE for named types with no directory, other keys as OTHER_KEY rows (key name only, secret-name masking truth), "="-less lines as UNPARSABLE_ROW, and symlink configs carried via single-hop readlink. /sys/fs/selinux as live truth: enforce value (1/0), booleans dir count, ENFORCE_UNREADABLE finding when the dir is mounted but the file refuses. The drift law: declared enforcing + live 0 = DRIFT_WEAKER_THAN_DECLARED finding; stronger-than-declared is a data row, never a finding; MOUNTED_DESPITE_DISABLED and DECLARED_DISABLED_CONSISTENT close the posture. rc0 clean / rc4 findings / rc6 no SELinux surface / rc2 usage.
Lockdown from /sys/kernel/security/lockdown under the bracketed-active-mode law (raw text carried verbatim on every row; bracketless = UNPARSED_LOCKDOWN data). IMA: the live policy counted by LINES ONLY — content is never echoed (battery-asserted canary law). EVM state digit with EVM_UNPARSED honesty. Secure Boot from efivarfs: the SecureBoot- variable's documented 4 attribute bytes + value byte (1 = SECUREBOOT_ON, 0 = SECUREBOOT_OFF, short file = SECUREBOOT_VAR_MALFORMED finding, no efivars dir = SECUREBOOT_UNAVAILABLE for BIOS/legacy hosts — a data row, never a finding). Module signature enforcement (sig_enforce) as data. The kernel command line's integrity tokens (lockdown=, ima_policy=, ima_appraise=, integrity=) ride along as data rows that never decide rc. rc0 clean / rc4 findings / rc6 none of the five kernel surfaces / rc2 usage.
unzip CLI-Anything_Bundle41_MACTrustRecon_v1.0.zip cp -r lsmpeek /path/to/skills/
cd lsmpeek/agent-harness && python3 -m cli_anything.lsmpeek --root / --json cd apparmorpeek/agent-harness && python3 -m cli_anything.apparmorpeek --root / --json cd selinuxpeek/agent-harness && python3 -m cli_anything.selinuxpeek --root / --json cd integritypeek/agent-harness && python3 -m cli_anything.integritypeek --root / --json
sha256sum CLI-Anything_Bundle41_MACTrustRecon_v1.0.zip
Battery truth: 425 checks total per full sweep (lsmpeek 122 + apparmorpeek 100 + selinuxpeek 119 + integritypeek 84) — fired twice from the kit + a clean-room fire from this exact shipping zip, 0 failed every time. Live smokes on a real 8-member LSM stack host: contract-consistent (rc4 with real findings). Apache-2.0, stdlib-only, Python 3.8+.