clustermax 0.2.1__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. clustermax-0.3.0/PKG-INFO +532 -0
  2. clustermax-0.3.0/README.md +512 -0
  3. clustermax-0.3.0/clustermax.egg-info/PKG-INFO +532 -0
  4. {clustermax-0.2.1 → clustermax-0.3.0}/clustermax.egg-info/SOURCES.txt +22 -1
  5. {clustermax-0.2.1 → clustermax-0.3.0}/clustermax.egg-info/requires.txt +1 -0
  6. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/_version.py +1 -1
  7. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/audit_profiles.py +11 -2
  8. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/audit_report.py +199 -4
  9. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/audit_runner.py +18 -1
  10. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/banner.py +14 -1
  11. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/cli.py +67 -5
  12. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/criteria_links.py +22 -0
  13. clustermax-0.3.0/cmax/host_role.py +404 -0
  14. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/minimum_links.py +1 -1
  15. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/minimum_refresh.py +1707 -411
  16. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/minimum_sync.py +89 -11
  17. clustermax-0.3.0/cmax/obs_check.py +804 -0
  18. clustermax-0.3.0/cmax/obs_discovery.py +558 -0
  19. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/audit-common.sh +500 -16
  20. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/audit_findings.py +469 -11
  21. clustermax-0.3.0/cmax/scripts/1-audit/bad_epoll.py +147 -0
  22. clustermax-0.3.0/cmax/scripts/1-audit/checks/_fanout.py +266 -0
  23. clustermax-0.3.0/cmax/scripts/1-audit/checks/fabric/nic-topology-check.py +1473 -0
  24. clustermax-0.3.0/cmax/scripts/1-audit/checks/fabric/vf-interface-exposure.py +348 -0
  25. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/fabric/virtio-net-check.py +116 -70
  26. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/gpu/vboost.py +72 -45
  27. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/platform_config.py +25 -62
  28. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/system/hbm_memory_exposure.py +36 -49
  29. clustermax-0.3.0/cmax/scripts/1-audit/checks/system/hugepages.py +295 -0
  30. clustermax-0.3.0/cmax/scripts/1-audit/checks/system/ingress_nginx_cve_2025_1974.py +188 -0
  31. clustermax-0.3.0/cmax/scripts/1-audit/checks/system/k8s_scheduling.py +373 -0
  32. clustermax-0.3.0/cmax/scripts/1-audit/checks/system/kubernetes_nodes_proxy.py +238 -0
  33. clustermax-0.3.0/cmax/scripts/1-audit/checks/system/storage_config.py +260 -0
  34. clustermax-0.3.0/cmax/scripts/1-audit/checks/system/tenant_pod_defaults.py +722 -0
  35. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/cluster-audit-k8s.sh +236 -39
  36. clustermax-0.3.0/cmax/scripts/1-audit/cluster-audit-slurm-security.sh +1191 -0
  37. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/cluster-audit-slurm.sh +299 -149
  38. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/cluster-audit-standalone.sh +16 -4
  39. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/container-check.sh +8 -0
  40. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/criteria-checks.json +11 -0
  41. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/host-check.sh +644 -30
  42. clustermax-0.3.0/cmax/scripts/1-audit/host_fleet.py +229 -0
  43. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/k8s-control.sh +35 -4
  44. clustermax-0.3.0/cmax/scripts/1-audit/k8s_runtime_software.py +125 -0
  45. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/merge_audit.py +120 -0
  46. clustermax-0.3.0/cmax/scripts/1-audit/minimum-versions.json +22780 -0
  47. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/minimum_versions.py +4 -3
  48. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/plan_audit.py +17 -6
  49. clustermax-0.3.0/cmax/scripts/1-audit/pwnescape-host-facts.sh +219 -0
  50. clustermax-0.3.0/cmax/scripts/1-audit/pwnescape.py +443 -0
  51. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/run_checks.py +27 -0
  52. clustermax-0.3.0/cmax/scripts/1-audit/security_fleet.py +194 -0
  53. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/security_version_audit.py +191 -111
  54. clustermax-0.3.0/cmax/scripts/1-audit/ubuntu_kernel_cves.py +225 -0
  55. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/security.py +1131 -33
  56. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/target_selection.py +132 -17
  57. {clustermax-0.2.1 → clustermax-0.3.0}/pyproject.toml +7 -2
  58. {clustermax-0.2.1 → clustermax-0.3.0}/setup.py +1 -1
  59. clustermax-0.3.0/tests/test_host_isolation.py +51 -0
  60. clustermax-0.3.0/tests/test_minimum_pages.py +145 -0
  61. clustermax-0.3.0/tests/test_nightly_version.py +46 -0
  62. clustermax-0.3.0/tests/test_select_tests.py +57 -0
  63. clustermax-0.3.0/tests/test_stable_release.py +393 -0
  64. clustermax-0.2.1/PKG-INFO +0 -350
  65. clustermax-0.2.1/README.md +0 -331
  66. clustermax-0.2.1/clustermax.egg-info/PKG-INFO +0 -350
  67. clustermax-0.2.1/cmax/scripts/1-audit/checks/_fanout.py +0 -125
  68. clustermax-0.2.1/cmax/scripts/1-audit/checks/fabric/nic-topology-check.py +0 -691
  69. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-slurm-security.sh +0 -658
  70. clustermax-0.2.1/cmax/scripts/1-audit/minimum-versions.json +0 -845
  71. clustermax-0.2.1/tests/test_nightly_version.py +0 -48
  72. {clustermax-0.2.1 → clustermax-0.3.0}/LICENSE +0 -0
  73. {clustermax-0.2.1 → clustermax-0.3.0}/clustermax.egg-info/dependency_links.txt +0 -0
  74. {clustermax-0.2.1 → clustermax-0.3.0}/clustermax.egg-info/entry_points.txt +0 -0
  75. {clustermax-0.2.1 → clustermax-0.3.0}/clustermax.egg-info/top_level.txt +0 -0
  76. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/__init__.py +0 -0
  77. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/audit_review.py +0 -0
  78. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/cmax.yaml +0 -0
  79. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/logo.py +0 -0
  80. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/progress.py +0 -0
  81. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/report_style.py +0 -0
  82. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/runtime_paths.py +0 -0
  83. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/fabric/nccl-ib-qps-check.py +0 -0
  84. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/fabric/nccl-topology-file-check.py +0 -0
  85. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/system/arm-smmu-virtualization-check.py +0 -0
  86. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/checks/system/vm-iommu-check.py +0 -0
  87. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/cluster-audit-k8s-security.sh +0 -0
  88. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/cluster-audit-standalone-security.sh +0 -0
  89. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/gpu_profiles.py +0 -0
  90. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/kubernetes_quantities.py +0 -0
  91. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/monitoring-k8s.sh +0 -0
  92. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/run.sh +0 -0
  93. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/run_legacy_audit.py +0 -0
  94. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/scripts/1-audit/validate_audit.py +0 -0
  95. {clustermax-0.2.1 → clustermax-0.3.0}/cmax/yaml_support.py +0 -0
  96. {clustermax-0.2.1 → clustermax-0.3.0}/setup.cfg +0 -0
@@ -0,0 +1,532 @@
1
+ Metadata-Version: 2.4
2
+ Name: clustermax
3
+ Version: 0.3.0
4
+ Summary: ClusterMAX GPU cluster audit and security CLI
5
+ Author: SemiAnalysis
6
+ Maintainer: SemiAnalysis
7
+ License-Expression: Apache-2.0
8
+ Project-URL: Homepage, https://clustermax.semianalysis.com/
9
+ Project-URL: Documentation, https://www.clustermax.ai/criteria
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: prompt-toolkit<4,>=3.0.52
14
+ Requires-Dist: PyYAML>=6
15
+ Provides-Extra: dev
16
+ Requires-Dist: build>=1; extra == "dev"
17
+ Requires-Dist: pytest>=8; extra == "dev"
18
+ Requires-Dist: pytest-xdist>=3; extra == "dev"
19
+ Dynamic: license-file
20
+
21
+ # ClusterMAX
22
+
23
+ <div align="center">
24
+
25
+ **English** | [中文](README_zh.md)
26
+
27
+ </div>
28
+
29
+ This repo is for `cmax`, a CLI tool that we use to audit GPU clusters and standalone machines during research for ClusterMAX.
30
+
31
+ The initial release is a small subset of our full test suite. It supports our recent article on neocloud security that precedes ClusterMAX 3.0.
32
+
33
+ This version of the `cmax` CLI provides the following commands:
34
+
35
+ | Command | Function |
36
+ |---|---|
37
+ | `cmax audit security` | This command runs a focused, read-only security audit. |
38
+ | `cmax audit` | This command runs a full cluster audit covering more than just security. |
39
+ | `cmax audit review` | This command reviews a saved audit output without running new checks. |
40
+
41
+ ## Install ClusterMAX
42
+
43
+ The [security release preparation checklist](docs/security-release-preparation.md)
44
+ describes the added checks and publication gates. PR validation does not publish
45
+ a stable package.
46
+
47
+ Stable publication uses a manually dispatched, approved workflow. It verifies
48
+ the PyPI upload before creating the matching GitHub tag and Release from the
49
+ same commit and artifacts. Nightly publication does not create GitHub Releases.
50
+
51
+ ClusterMAX requires Python 3.10 or later. Install the current release:
52
+ ```
53
+ uv venv
54
+ source .venv/bin/activate
55
+ uv pip install clustermax
56
+ cmax -v
57
+ ```
58
+
59
+ You can also use the `--pre` option to install the latest nightly release:
60
+ ```
61
+ uv pip install --pre -U clustermax
62
+ ```
63
+
64
+ Use `-h` to see available options when using the CLI:
65
+ ```
66
+ cmax -h
67
+ cmax audit -h
68
+ cmax audit security -h
69
+ ```
70
+
71
+ The prepared stable release is `0.3.0`. Subsequent nightly releases use the
72
+ `0.3.1.devYYYYMMDDNN` format, which sorts after `0.3.0` when `--pre` is enabled.
73
+ The version change in this branch does not publish either channel.
74
+
75
+ ## Public documentation
76
+
77
+ The [ClusterMAX website](https://clustermax.semianalysis.com/) explains the rating system. The [evaluation criteria](https://www.clustermax.ai/criteria) list our full checklist, while the [expectations page](https://www.clustermax.ai/expectations) lists or clearest expectations for Slurm, Kubernetes, standalone machines, monitoring dashboards, and health checks.
78
+
79
+ ## Run a security audit
80
+
81
+ The current [minimum-version table](https://www.clustermax.ai/minimum-versions) lists the software and firmware versions used for grading, with vendor advisories behind each value. Its [machine-readable form](https://semianalysisai.github.io/ClusterMAX/minimum-versions.json) is the table `cmax audit security` fetches on startup (skip with `--no-fetch-minimums`). The `minimum-versions-publish` workflow deploys that one file to the GitHub Pages site of this repository. Its `refreshed` stamp moves every day after a successful refresh, and its `changed` stamp moves only when a minimum value changes. The command line keeps the last fetched table in `~/.cache/clustermax/`, so an offline run grades against that copy instead of the older table inside the package. When the fetch fails and the table in use was last refreshed more than 7 days ago, the audit gives a warning.
82
+
83
+ The read-only Bad Epoll check, `security.badEpoll.status`, checks the running
84
+ kernel against [CVE-2026-46242](https://ubuntu.com/security/CVE-2026-46242).
85
+ It maps Ubuntu 24.04 GA 6.8 generic, Ubuntu 22.04 HWE 6.8 generic, Ubuntu
86
+ 24.04 NVIDIA 6.17 (`nvidia` and `nvidia-64k`), and Ubuntu 26.04 GA 7.0 generic
87
+ packages. Each source package uses
88
+ its own fixed-version minimum. It requires matching running-kernel signature and installed-package
89
+ evidence. A newer installed kernel does not clear a failure until it is running.
90
+ Unsupported flavors, missing evidence, and active or unreadable livepatch state
91
+ produce an unknown result that requires provider patch evidence. The check does
92
+ not run an exploit or attest that a provider's kernel is genuine. An explicitly
93
+ pinned minimum table without the mapping produces an unknown result.
94
+
95
+ Security collection distinguishes the host, GPU Operator containers, and active
96
+ GPU workloads on the sampled worker. Driver detection can read the loaded
97
+ kernel module when `nvidia-smi` is outside the host search path. Toolkit
98
+ detection also checks the GPU Operator installation directory. CUDA Toolkit
99
+ versions come from `nvcc` or toolkit metadata, never the driver compatibility
100
+ version or an image tag.
101
+
102
+ The network probe prefers a verified privileged host-root mount when available.
103
+ It can enumerate PCI devices through sysfs if `lspci` is missing. It uses
104
+ read-only `mlxconfig -e` queries and grades only the Current column. Defaults
105
+ and next-boot settings do not establish current isolation. It does not install
106
+ tools or start `mst`.
107
+ Missing permissions, incomplete scans, and unassessed firmware trains remain
108
+ unknown. A completed topology scan alone does not prove exclusive ownership
109
+ of the physical NVLink domain.
110
+
111
+ Held installed kernels participate in the reboot check. Missing installed-kernel
112
+ inventory cannot produce a PASS. The NVIDIA 6.17 and Ubuntu 26.04 mappings also
113
+ check [Fragnesia and Dirty Frag](https://ubuntu.com/security/CVE-2026-46300)
114
+ against the source-package minimum. A newer downloaded table cannot silently remove
115
+ the kernel mappings shipped with this client. If it lacks those mappings,
116
+ the client reports the mismatch and retains its installed table.
117
+
118
+ On Ubuntu 22.04 and 24.04, the `generic` and `generic-64k` kernels built from
119
+ the GA `linux` source package (5.15 and 6.8) are also graded per CVE against
120
+ the Ubuntu tracker for
121
+ [CVE-2026-64531](https://ubuntu.com/security/CVE-2026-64531) and
122
+ [CVE-2026-64378](https://ubuntu.com/security/CVE-2026-64378).
123
+ [CVE-2026-46227](https://ubuntu.com/security/CVE-2026-46227) (SCTP
124
+ `SCTP_SENDALL` container escape) and
125
+ [CVE-2026-98432](https://ubuntu.com/security/CVE-2026-98432) (IPv4
126
+ `inet_opt` use-after-free in `ip_options_build()`) are graded on Ubuntu 22.04,
127
+ 24.04, and 26.04 for every kernel source package that the tracker lists on
128
+ that release: GA, HWE, cloud (AWS, Azure, GCP, Oracle, IBM, GKE), NVIDIA, lowlatency, FIPS,
129
+ realtime, and the others. The minimum table has one row per source package.
130
+ The kernel family and the flavor in the running release string select the
131
+ row. A `needed`, `pending`, `deferred`, or `ignored` (for example, end of life)
132
+ tracker state fails because Ubuntu has not released a fix for that kernel. A
133
+ `released` state compares the running ABI with the published fixed ABI after
134
+ the standard bulletin grace period. A kernel with no row is unknown, because the
135
+ audit cannot check it: for example a custom or mainline build, a package newer
136
+ than the table, or a release string the audit cannot read. A kernel that
137
+ matches more than one row is also unknown. riscv64 kernels have no row of
138
+ their own, because their `generic` flavor name cannot be told apart from the
139
+ amd64 and arm64 kernels. The two CVEs above check only the GA kernel, so they
140
+ do not make other kernels unknown.
141
+
142
+ The daily refresh also discovers Ubuntu kernel CVEs before a fix exists. It
143
+ reads the Ubuntu CVE search for `linux` CVEs published since 2026-10-01 and
144
+ within the last 30 days. It adds each CVE that Ubuntu rates `critical`, or
145
+ `high` with a CVSS v3 score of 9.0 or more, and that the tracker lists for the
146
+ GA `linux` package on 22.04, 24.04, or 26.04. A discovered CVE gets the same
147
+ per-kernel rows as the CVEs above, under the key `linuxCve<year>_<number>`, and
148
+ each row carries `"discovered": true`. The audit reads the kernel CVE groups
149
+ from the minimum table, so it grades a discovered CVE without a client change.
150
+ A discovered CVE stays in the table after it leaves the 30-day window, so a
151
+ later fix is still graded. A `needs-triage` row of a discovered CVE makes that
152
+ kernel unknown. The refresh pull request lists each new discovered CVE for
153
+ review. A fetched table that lacks a kernel CVE group of the installed table
154
+ is rejected, and the client keeps its installed table. The refresh fails if
155
+ the table grows above 3 MiB, so it stays below the 4 MiB client fetch limit.
156
+
157
+ An absent host Docker installation or an absent CUDA Toolkit in the inspected
158
+ scope remains not applicable. This differs from an unreadable tool or failed
159
+ probe, which remains unknown. A complete bare-metal PCI scan with no VFIO
160
+ assignment makes that sampled host's passthrough check not applicable. UFM
161
+ control settings require provider evidence. The tenant profile skips this
162
+ provider-side check until a control record is supplied. A skip does not certify
163
+ the fabric. Shared InfiniBand fabrics still need the provider's security review.
164
+
165
+ The following results have explicit assessment scopes:
166
+
167
+ - **BMC/IPMI:** A PASS means the completed local read commands returned no
168
+ usable management data. A generic IPMI error response remains recorded as
169
+ `error-response`, not an access-denied response. Missing tools, timeouts and
170
+ incomplete node coverage remain unknown. Network BMC interfaces are not tested.
171
+ - **NVLink:** A complete topology scan plus an operator ownership attestation
172
+ can pass. Set `CLUSTERMAX_NVLINK_DOMAIN_EXCLUSIVE_ATTESTED=true` only when the
173
+ entire observed physical domain belongs to the allocation. GPU counts alone
174
+ do not establish ownership. The evidence records the attestation source.
175
+ - **ConnectX firmware:** The parser preserves NVIDIA's explicit GA
176
+ ["46.3008 or newer" range](https://raw.githubusercontent.com/NVIDIA/product-security/main/2026/5699/5699.json).
177
+ Later trains can pass for the mapped ConnectX-8 and BlueField-3 firmware
178
+ families. Older LTS floors remain separate. Unknown products do not inherit
179
+ that range merely because their version is higher.
180
+ - **Virtio-Net:** Verified current NIC mode passes the current-exposure check.
181
+ Stored firmware remains unassessed when unreadable. Recheck it before enabling
182
+ DPU mode. A NIC-mode sample cannot clear missing or mixed fleet evidence.
183
+ - **DPU host policy:** An enabled RShim path can fail the configured restriction
184
+ policy without proving DPU login or an exploit. Runtime locks, permissions and
185
+ ownership need separate checks. The audit does not start RShim or change modes.
186
+ On BlueField-3, the Arm OS does not boot in NIC mode
187
+ ([NVIDIA mode documentation](https://docs.nvidia.com/doca/archive/2-9-4/bluefield-modes-of-operation/index.html)).
188
+
189
+ The security profile selects the version and isolation checks from the complete audit. Use `-s` or `--show` to list the applicable checks before the audit runs:
190
+
191
+ ```console
192
+ $ cmax audit security --show
193
+ [versions] Minimum versions
194
+ securityVersions.nvidiaDriver.status: Security Versions / NVIDIA Driver
195
+ ...
196
+
197
+ [isolation] Security isolation
198
+ security.januscape.status: Security / Januscape
199
+ ...
200
+ ```
201
+
202
+ Use `--dry-run -o yaml` to show the resolved plan. This will be useful for future releases of the clustermax CLI. The following example selects a standalone virtual machine:
203
+
204
+ ```console
205
+ $ cmax audit security --vm --dry-run -o yaml
206
+ # Only audit security manifest is enabled, unrelated tests are not
207
+ version: 4
208
+ manifest_selection:
209
+ enabled:
210
+ - audit.audit
211
+ disabled_count: 0
212
+ disabled_by_phase:
213
+ audit: 0
214
+ audit_profile:
215
+ name: security
216
+ dry_run: true
217
+ command: cmax audit security
218
+ target:
219
+ selection: explicit
220
+ environment: vm
221
+ harness: standalone
222
+ scope:
223
+ core_collector: true
224
+ checks:
225
+ fabric: true
226
+ gpu: false
227
+ system: false
228
+ general_findings_report: false
229
+ standard_report: true
230
+ artifacts:
231
+ - audit.out
232
+ - audit.values.json
233
+ checks:
234
+ - securityVersions.nvidiaDriver.status
235
+ - securityVersions.nvidiaContainerToolkit.status
236
+ - securityVersions.cudaToolkit.status
237
+ - securityVersions.runc.status
238
+ - securityVersions.docker.status
239
+ - securityVersions.connectxFirmware.status
240
+ - securityVersions.dcgm.status
241
+ - securityVersions.dcgmExporter.status
242
+ - securityVersions.virtioNetBluefield.status
243
+ - securityVersions.virtioNetBluefield.exposure
244
+ - securityVersions.dpuHostIsolation.status
245
+ - security.januscape.status
246
+ - security.guestKernel.newerInstalled
247
+ - security.fragnesia.status
248
+ - bmc-ipmi
249
+ - ufm-profile
250
+ - pcie-passthrough
251
+ - nvlink-boundary
252
+ ```
253
+
254
+ The resolved plan enables only `audit.audit`. It uses the standard artifact
255
+ files, progress wrapper, and report formatter. On Slurm, the security profile
256
+ uses a focused collector that runs the worker security inventory, container
257
+ version inventory, and backend fabric checks that its report needs.
258
+
259
+ Every live audit reports its target before it collects data. An interactive
260
+ run requires confirmation. The default answer cancels the audit with exit code
261
+ 130:
262
+
263
+ ```text
264
+ # ClusterMAX audit target
265
+ Command: cmax audit security
266
+ Target: Local machine
267
+ Host: <hostname>
268
+ System: macOS <version> (<architecture>)
269
+ Access: current shell; cluster credentials are not used
270
+ Compatibility: limited; Linux GPU checks can report unavailable components
271
+ Selection: auto-detected
272
+ Run this audit? [y]es, [c]hange target or access, [N]o:
273
+ ```
274
+
275
+ Enter `c` to select the local machine, a Kubernetes cluster, or a Slurm
276
+ cluster. Kubernetes selection accepts a kubeconfig path and a context. It
277
+ validates the connection before the audit starts. Slurm selection validates
278
+ the current Slurm client session.
279
+
280
+ Run the security audit after you confirm that the target is correct. The command
281
+ uses `-v` detail by default.
282
+ ```bash
283
+ cmax audit security
284
+ ```
285
+
286
+ Use `-vvv` for the most detail.
287
+ ```bash
288
+ cmax audit security -vvv
289
+ ```
290
+
291
+ ## Notes on usage
292
+
293
+ Interactive audits print a short cluster prayer below the startup logo.
294
+ The prayer is decorative and does not change GPU settings or audit results.
295
+ It is omitted from piped output, help, version output, and inspection commands
296
+ such as `--show` or `--dry-run`. Set `CLUSTERMAX_PROGRESS=0` to hide the startup
297
+ logo, prayer, and progress display.
298
+
299
+ The command detects Slurm, Kubernetes, containers, virtual machines, macOS, and standalone hosts automatically, and confirms the selection interactively with the user. To skip this confirmation and force the CLI to use a certain approach, use `--local`, `--slurm`, `--k8s`, `--container`, `--vm`, or `--standalone`. Use `--kubeconfig PATH` to select Kubernetes credentials. An explicit target option confirms the target in a non-interactive run. Use `--yes` to accept an auto-detected target without a prompt.
300
+
301
+ Run Slurm audits from a login node and Kubernetes audits from a machine with `kubectl` access. When a standalone command starts on a cluster node, or a Slurm command starts on a compute node, the CLI shows the evidence, scope, and recommended command before work starts.
302
+
303
+ The mismatch menu defaults to cancel. Select `c` and then confirm with `y` to continue on this host. Select `r` to review sanitized detection details and the [public issue form](https://github.com/SemiAnalysisAI/ClusterMAX/issues/new). The CLI does not upload anything. Review the preview before sharing it, and do not attach credentials, cluster names, hostnames, or raw logs.
304
+
305
+ `--yes` or `--allow-cluster-node` skips the mismatch menu and runs the selected target on this host. Without a terminal, a mismatched run stops unless one of them is present.
306
+
307
+ For Slurm on Kubernetes, including Slinky, the CLI shows the Slurm role separately from the runtime context. When auto-detection finds both interfaces reachable, it asks which interface to use. `--yes` keeps the auto-detected interface, and `--slurm` or `--k8s` selects one. Without a terminal, the run stops unless one of these is present. An explicit interface skips this choice, but a Slurm run from a compute node still requires `--yes`, `--allow-cluster-node`, or interactive confirmation.
308
+
309
+ The regression tests use synthetic signals to cover cancellation, reporting, overrides, mixed interfaces, and failed access checks. They do not establish live cluster qualification.
310
+
311
+ Users can run the command multiple times. Each run writes timestamped artifacts
312
+ under `~/.clustermax/audit/` by default.
313
+
314
+ A failed security check produces exit code 2. Use `--exit-zero` when the caller
315
+ requires exit code 0.
316
+
317
+ See [the security audit section](#run-a-security-audit) for the criteria,
318
+ report format, and evidence limits.
319
+
320
+ ## Run a cluster audit
321
+
322
+ Version 0.3.0 runs the core audit. Use `-s` or `--show` to list every check without collecting data:
323
+
324
+ ```bash
325
+ cmax audit --show
326
+ ```
327
+
328
+ The preview groups the full audit checks into these profiles:
329
+
330
+ | Profile | Scope |
331
+ |---|---|
332
+ | `versions` | This profile shows component versions and required minimums. |
333
+ | `isolation` | This profile shows kernel, virtualization, and tenant isolation. |
334
+ | `hardware` | This profile shows GPU, memory, and input-output virtualization. |
335
+ | `software` | This profile shows GPU development and diagnostic tools. |
336
+ | `containers` | This profile shows the container runtime and its GPU integration. |
337
+ | `orchestration` | This profile shows Slurm workers, Pyxis, and Kubernetes kubelets. |
338
+ | `networking` | This profile shows fabric topology, adapter naming, and NCCL configuration. |
339
+ | `storage` | This profile shows binary storage installation and configuration checks. |
340
+ | `health` | This profile shows node health and GPU telemetry checks. |
341
+
342
+ Use a profile as an audit subcommand to select its checks:
343
+
344
+ ```bash
345
+ cmax audit hardware --show
346
+ cmax audit hardware
347
+ cmax audit networking --slurm
348
+ ```
349
+
350
+ Every named profile uses the same core collector wrapper, progress display,
351
+ artifact directory, and report formatter. A profile limits the supplemental
352
+ checks and the terminal report to its selected audit checks. The shared
353
+ collector still records the inventory that the selected checks need. The Slurm
354
+ security profile also omits complete-audit sections that do not supply security
355
+ evidence.
356
+
357
+ The complete audit reads seven days of retained kernel history for GPU errors.
358
+ It checks every node in an active Slurm allocation and every Kubernetes GPU
359
+ node. It uses the current-boot `dmesg` buffer when the journal is not readable.
360
+
361
+ Each live profile saves `audit.out` and `audit.values.json`. The security
362
+ profile returns exit code 2 when its standard report contains a failed check.
363
+ Use `--exit-zero` when an automation system requires exit code 0.
364
+
365
+ Every audit report uses the same status blocks. `PASS` is green, `WARNING` is
366
+ yellow, `FAIL` is red, and `SKIPPED` is dim when output goes to a terminal.
367
+ Redirected output stays plain text. The default `-v` output shows every passed,
368
+ warning, failed, and skipped check. It also shows each observed version, its
369
+ minimum version, and a link to that component in the published
370
+ [minimum-version table](https://www.clustermax.ai/minimum-versions), such as
371
+ [`runc`](https://www.clustermax.ai/minimum-versions#runc). The `-vv` output adds
372
+ labeled CVE and vendor documentation links. The `-vvv` output adds the issue
373
+ description and recommended remediation. The CLI does not provide an output
374
+ level below `-v`.
375
+
376
+ Target aliases select an environment for the complete audit:
377
+
378
+ ```bash
379
+ cmax audit slurm
380
+ cmax audit k8s
381
+ cmax audit standalone
382
+ cmax audit vm
383
+ cmax audit container
384
+ ```
385
+
386
+ These commands are equivalent to the matching `--slurm`, `--k8s`,
387
+ `--standalone`, `--vm`, and `--container` options.
388
+
389
+ The Slurm audit checks Pyxis through the container options that Pyxis adds to
390
+ `srun --help`. It records the installed package version when package metadata
391
+ is available. The check does not start a container or wait for a GPU allocation.
392
+ If the options are unavailable, the audit links to the
393
+ [NVIDIA Pyxis installation instructions](https://github.com/NVIDIA/pyxis#installation).
394
+
395
+ The full audit also evaluates the published criteria that have binary results
396
+ from a cluster target. These checks verify scheduler CUDA device assignment,
397
+ Lmod, Kubernetes ReadWriteMany storage, and Nsight Compute profiling permission.
398
+ The audit omits criteria that require commercial, contractual, performance,
399
+ reliability, provider-side, or scale-out network evidence.
400
+
401
+ After target selection, the audit runs only checks that apply to that target.
402
+ A standalone container, virtual machine, or bare-metal host omits every check
403
+ that applies only to Slurm or Kubernetes. These checks include GRES, Pyxis,
404
+ scheduler topology, multi-node NCCL, health programs, prologs, NHC,
405
+ auto-remediation, and kubelet CPU Manager.
406
+
407
+ A Kubernetes audit discovers provider components across all namespaces, because
408
+ managed services can use provider-specific namespaces and current Kubernetes
409
+ application labels. The audit also distinguishes a container runtime binary
410
+ from a compatibility link whose command name is `docker`. When the audit finds
411
+ Promtail with Loki or Elasticsearch, it reports the aggregation system as the
412
+ logging stack and reports Promtail only as a detected log shipper.
413
+
414
+ The Kubernetes BMC and IPMI check uses the confirmed Kubernetes identity to
415
+ create a privileged pod that mounts each worker host root. The report names
416
+ each checked node and states the fleet coverage. This evidence proves what that
417
+ administrative identity can reach. It does not prove that an ordinary workload
418
+ pod can reach the same local management interface. The check examines up to 32
419
+ worker nodes by default. Set `CLUSTERMAX_AUDIT_K8S_BMC_NODE_LIMIT` to a larger
420
+ positive integer when a larger fleet requires complete coverage.
421
+ Because the probe runs as root on the host, an exposed BMC on Kubernetes is a
422
+ WARNING, not a CRITICAL: root on a bare-metal host can usually reach the
423
+ in-band BMC. Verify that tenants cannot schedule privileged pods or mount host
424
+ IPMI devices. On Slurm and standalone hosts the probe runs as the tenant user,
425
+ so an exposed BMC stays CRITICAL.
426
+
427
+ The focused security audit (`cmax audit security`) grades host-level minimums
428
+ on every GPU host, not only the sampled worker: the GPU driver, NVIDIA
429
+ Container Toolkit, runc, Docker, ConnectX firmware, DCGM, and the kernel
430
+ advisories. Each check reports the worst host, names it, and lists every host's
431
+ result. ConnectX devices are listed as `host/device`. A GPU host the audit
432
+ cannot read leaves a passing check unknown. Kubernetes reuses the BMC host-root
433
+ pod on each node; Slurm runs a short one-GPU step on each GPU node with
434
+ `--immediate=30`, so a busy node is reported as unread instead of waiting. Up
435
+ to 32 GPU hosts are read by default; set `CLUSTERMAX_AUDIT_SECURITY_HOST_LIMIT`
436
+ for larger fleets.
437
+
438
+ Kubernetes full, security, and isolation audits also inspect ClusterRoles and
439
+ ClusterRoleBindings for `get` permission on `nodes/proxy`. The report identifies
440
+ the subjects, roles, bindings, and node-name restrictions, including wildcard
441
+ grants. A matching grant produces `FAIL`. Administrative grants can be intentional
442
+ and are included for review. An incomplete inventory produces `WARNING` unless
443
+ the audit has already found a grant. This check reads RBAC configuration. It does
444
+ not connect to kubelets or execute commands in pods. See the
445
+ [Kubernetes kubelet authorization documentation](https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/)
446
+ and [Graham Helton's nodes/proxy writeup](https://grahamhelton.com/blog/nodes-proxy-rce).
447
+
448
+ Kubernetes full, security, and isolation audits also check pod image tags for
449
+ [ingress-nginx CVE-2025-1974](https://github.com/kubernetes/kubernetes/issues/131009).
450
+ Affected upstream tags produce `FAIL`. Fixed tags start at v1.11.5 and v1.12.1.
451
+ The check reads pods across all namespaces, including non-GPU nodes. It identifies
452
+ controllers by image, command, or ingress-nginx labels and retains each result.
453
+ Denied or incomplete inventory, digest-only images, custom builds, and prerelease
454
+ tags produce `WARNING` when a fixed version cannot be established. An affected
455
+ tag still produces `FAIL` when other evidence is missing.
456
+
457
+ This check reads metadata only. It does not send admission requests, execute
458
+ commands in pods, or read Secrets. A fixed tag does not verify binary identity
459
+ or webhook isolation. Disabling admission does not turn an affected tag into
460
+ a patched version. A complete inventory with no identified controller is
461
+ `SKIPPED`; scaled-to-zero workloads and unrecognized custom builds remain outside
462
+ its scope. Slurm and standalone audits do not run this collector.
463
+
464
+ The standalone audit also omits scale-out network checks. It does not inspect
465
+ InfiniBand, RoCE, RDMA, HCA naming, PKeys, UFM, SHARP, fabric topology, or
466
+ GPUDirect RDMA. The report marks their criteria as `SKIPPED`. Slurm and
467
+ Kubernetes audits keep their scale-out checks.
468
+
469
+ The standalone audit still reads the local PCI device list to determine
470
+ whether the NVIDIA GPU driver security criterion applies to the host.
471
+
472
+ The platform configuration checks have separate entry points. The hardware
473
+ profile runs `vm-iommu-check.py` and `arm-smmu-virtualization-check.py`. The
474
+ networking profile runs `nccl-topology-file-check.py` on Slurm and
475
+ `nccl-ib-qps-check.py` on Slurm or Kubernetes. The entry points reuse one host
476
+ collection during an audit run.
477
+
478
+ The core audit collects cluster, host, GPU, storage, network, health, and
479
+ security data. It does not run the planned performance or reliability tests.
480
+
481
+ Each audit command sets its execution profile and selected harness explicitly.
482
+ An inherited `CLUSTERMAX_AUDIT_SCOPE` or `CLUSTERMAX_AUDIT_HARNESS` value cannot
483
+ change the confirmed selection. `cmax audit` uses the complete profile. Each
484
+ named subcommand uses its matching focused profile.
485
+
486
+ Run or review the core audit with these commands:
487
+
488
+ ```bash
489
+ cmax audit
490
+ cmax audit review
491
+ ```
492
+
493
+ ClusterMAX detects Slurm, Kubernetes, or a standalone machine. Use `--slurm`,
494
+ `--k8s`, `--local`, or `--standalone` when detection is incorrect. The command
495
+ uses the same target report and confirmation as the security audit.
496
+
497
+ Each audit saves its results in `~/.clustermax/audit/<timestamp>/`. Set
498
+ `CLUSTERMAX_RUNS_ROOT` when you need the ingest-compatible
499
+ `<root>/<cluster>/<timestamp>/audit/` layout.
500
+
501
+ The audit is read-only. This section gives the requirements, checks, and output
502
+ files.
503
+
504
+ Use `cmax audit review` to open the newest saved audit. You can also specify an
505
+ audit directory, an `audit.values.json` file, or an `audit.out` file:
506
+
507
+ ```bash
508
+ cmax audit review runs/<cluster>/<timestamp>/audit/audit.out
509
+ cmax audit review --command 'find runc'
510
+ cmax audit review --command 'show securityVersions.runc.status'
511
+ ```
512
+
513
+ Use `-v` to include passing and skipped checks. Use `-vv` to include observed
514
+ evidence. Use `-vvv` to include recommended remediation and labeled reference
515
+ URLs. Use `--command raw` to print the saved collector log. Use
516
+ `--no-interactive` to print the review and exit.
517
+
518
+ ## Repository contents
519
+
520
+ | Path | Contents |
521
+ |---|---|
522
+ | `cmax/` | This directory contains the command code and `cmax.yaml` configuration. |
523
+ | `cmax/scripts/1-audit/` | This directory contains the scripts that run an audit. |
524
+ | `tests/audit/` | This directory contains all audit tests, fixtures, and test helpers. |
525
+
526
+ This release excludes provider results, internal notes, the private dashboard,
527
+ benchmark implementations, bundled data, and database code.
528
+
529
+ ## License
530
+
531
+ All published ClusterMAX source code uses the Apache License 2.0. See
532
+ [LICENSE](LICENSE).