clustermax 0.2.1__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 (67) hide show
  1. clustermax-0.2.1/LICENSE +190 -0
  2. clustermax-0.2.1/PKG-INFO +350 -0
  3. clustermax-0.2.1/README.md +331 -0
  4. clustermax-0.2.1/clustermax.egg-info/PKG-INFO +350 -0
  5. clustermax-0.2.1/clustermax.egg-info/SOURCES.txt +65 -0
  6. clustermax-0.2.1/clustermax.egg-info/dependency_links.txt +1 -0
  7. clustermax-0.2.1/clustermax.egg-info/entry_points.txt +2 -0
  8. clustermax-0.2.1/clustermax.egg-info/requires.txt +6 -0
  9. clustermax-0.2.1/clustermax.egg-info/top_level.txt +1 -0
  10. clustermax-0.2.1/cmax/__init__.py +5 -0
  11. clustermax-0.2.1/cmax/_version.py +3 -0
  12. clustermax-0.2.1/cmax/audit_profiles.py +149 -0
  13. clustermax-0.2.1/cmax/audit_report.py +1279 -0
  14. clustermax-0.2.1/cmax/audit_review.py +315 -0
  15. clustermax-0.2.1/cmax/audit_runner.py +114 -0
  16. clustermax-0.2.1/cmax/banner.py +472 -0
  17. clustermax-0.2.1/cmax/cli.py +528 -0
  18. clustermax-0.2.1/cmax/cmax.yaml +5 -0
  19. clustermax-0.2.1/cmax/criteria_links.py +137 -0
  20. clustermax-0.2.1/cmax/logo.py +169 -0
  21. clustermax-0.2.1/cmax/minimum_links.py +82 -0
  22. clustermax-0.2.1/cmax/minimum_refresh.py +2461 -0
  23. clustermax-0.2.1/cmax/minimum_sync.py +383 -0
  24. clustermax-0.2.1/cmax/progress.py +2024 -0
  25. clustermax-0.2.1/cmax/report_style.py +90 -0
  26. clustermax-0.2.1/cmax/runtime_paths.py +29 -0
  27. clustermax-0.2.1/cmax/scripts/1-audit/audit-common.sh +1426 -0
  28. clustermax-0.2.1/cmax/scripts/1-audit/audit_findings.py +1909 -0
  29. clustermax-0.2.1/cmax/scripts/1-audit/checks/_fanout.py +125 -0
  30. clustermax-0.2.1/cmax/scripts/1-audit/checks/fabric/nccl-ib-qps-check.py +17 -0
  31. clustermax-0.2.1/cmax/scripts/1-audit/checks/fabric/nccl-topology-file-check.py +17 -0
  32. clustermax-0.2.1/cmax/scripts/1-audit/checks/fabric/nic-topology-check.py +691 -0
  33. clustermax-0.2.1/cmax/scripts/1-audit/checks/fabric/virtio-net-check.py +1798 -0
  34. clustermax-0.2.1/cmax/scripts/1-audit/checks/gpu/vboost.py +438 -0
  35. clustermax-0.2.1/cmax/scripts/1-audit/checks/platform_config.py +2238 -0
  36. clustermax-0.2.1/cmax/scripts/1-audit/checks/system/arm-smmu-virtualization-check.py +22 -0
  37. clustermax-0.2.1/cmax/scripts/1-audit/checks/system/hbm_memory_exposure.py +784 -0
  38. clustermax-0.2.1/cmax/scripts/1-audit/checks/system/vm-iommu-check.py +17 -0
  39. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-k8s-security.sh +8 -0
  40. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-k8s.sh +3731 -0
  41. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-slurm-security.sh +658 -0
  42. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-slurm.sh +3410 -0
  43. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-standalone-security.sh +8 -0
  44. clustermax-0.2.1/cmax/scripts/1-audit/cluster-audit-standalone.sh +2463 -0
  45. clustermax-0.2.1/cmax/scripts/1-audit/container-check.sh +213 -0
  46. clustermax-0.2.1/cmax/scripts/1-audit/criteria-checks.json +734 -0
  47. clustermax-0.2.1/cmax/scripts/1-audit/gpu_profiles.py +198 -0
  48. clustermax-0.2.1/cmax/scripts/1-audit/host-check.sh +2206 -0
  49. clustermax-0.2.1/cmax/scripts/1-audit/k8s-control.sh +2096 -0
  50. clustermax-0.2.1/cmax/scripts/1-audit/kubernetes_quantities.py +24 -0
  51. clustermax-0.2.1/cmax/scripts/1-audit/merge_audit.py +722 -0
  52. clustermax-0.2.1/cmax/scripts/1-audit/minimum-versions.json +845 -0
  53. clustermax-0.2.1/cmax/scripts/1-audit/minimum_versions.py +442 -0
  54. clustermax-0.2.1/cmax/scripts/1-audit/monitoring-k8s.sh +928 -0
  55. clustermax-0.2.1/cmax/scripts/1-audit/plan_audit.py +141 -0
  56. clustermax-0.2.1/cmax/scripts/1-audit/run.sh +97 -0
  57. clustermax-0.2.1/cmax/scripts/1-audit/run_checks.py +276 -0
  58. clustermax-0.2.1/cmax/scripts/1-audit/run_legacy_audit.py +72 -0
  59. clustermax-0.2.1/cmax/scripts/1-audit/security_version_audit.py +1902 -0
  60. clustermax-0.2.1/cmax/scripts/1-audit/validate_audit.py +95 -0
  61. clustermax-0.2.1/cmax/security.py +1915 -0
  62. clustermax-0.2.1/cmax/target_selection.py +459 -0
  63. clustermax-0.2.1/cmax/yaml_support.py +11 -0
  64. clustermax-0.2.1/pyproject.toml +45 -0
  65. clustermax-0.2.1/setup.cfg +4 -0
  66. clustermax-0.2.1/setup.py +39 -0
  67. clustermax-0.2.1/tests/test_nightly_version.py +48 -0
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025 SemiAnalysis
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,350 @@
1
+ Metadata-Version: 2.4
2
+ Name: clustermax
3
+ Version: 0.2.1
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
+ Dynamic: license-file
19
+
20
+ # ClusterMAX
21
+
22
+ This repo is for `cmax`, a CLI tool that we use to audit GPU clusters and standalone machines during research for ClusterMAX. The initial release supports our recent article on neocloud security that precedes ClusterMAX 3.0.
23
+
24
+ Version 0.2.1 of the `cmax` CLI provides these functional commands:
25
+
26
+ | Command | Function |
27
+ |---|---|
28
+ | `cmax audit security` | This command runs a focused, read-only security audit. |
29
+ | `cmax audit` | This command runs the complete cluster audit. |
30
+ | `cmax audit review` | This command reviews a saved audit without new checks. |
31
+
32
+ ## Install ClusterMAX
33
+
34
+ ClusterMAX requires Python 3.10 or later. Install the current release:
35
+ ```
36
+ uv venv
37
+ source .venv/bin/activate
38
+ uv pip install clustermax
39
+ cmax -v
40
+ ```
41
+
42
+ You can also use the `--pre` option to install the latest nightly release:
43
+ ```
44
+ uv pip install --pre -U clustermax
45
+ ```
46
+
47
+ Use `-h` to see available options when using the CLI:
48
+ ```
49
+ cmax -h
50
+ cmax audit -h
51
+ cmax audit security -h
52
+ ```
53
+
54
+ Nightly releases use the `0.3.0.devYYYYMMDDNN` format until the stable 0.3.0
55
+ release. This version is newer than stable 0.2.1 when `--pre` is enabled.
56
+
57
+ ## Public documentation
58
+
59
+ 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.
60
+
61
+ ## Run a security audit
62
+
63
+ 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://www.clustermax.ai/minimum-versions.json) is the table `cmax audit security` fetches on startup (skip with `--no-fetch-minimums`).
64
+
65
+ 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:
66
+
67
+ ```console
68
+ $ cmax audit security --show
69
+ [versions] Minimum versions
70
+ securityVersions.nvidiaDriver.status: Security Versions / NVIDIA Driver
71
+ ...
72
+
73
+ [isolation] Security isolation
74
+ security.januscape.status: Security / Januscape
75
+ ...
76
+ ```
77
+
78
+ 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:
79
+
80
+ ```console
81
+ $ cmax audit security --vm --dry-run -o yaml
82
+ # Only audit security manifest is enabled, unrelated tests are not
83
+ version: 4
84
+ manifest_selection:
85
+ enabled:
86
+ - audit.audit
87
+ disabled_count: 0
88
+ disabled_by_phase:
89
+ audit: 0
90
+ audit_profile:
91
+ name: security
92
+ dry_run: true
93
+ command: cmax audit security
94
+ target:
95
+ selection: explicit
96
+ environment: vm
97
+ harness: standalone
98
+ scope:
99
+ core_collector: true
100
+ checks:
101
+ fabric: true
102
+ gpu: false
103
+ system: false
104
+ general_findings_report: false
105
+ standard_report: true
106
+ artifacts:
107
+ - audit.out
108
+ - audit.values.json
109
+ checks:
110
+ - securityVersions.nvidiaDriver.status
111
+ - securityVersions.nvidiaContainerToolkit.status
112
+ - securityVersions.cudaToolkit.status
113
+ - securityVersions.runc.status
114
+ - securityVersions.docker.status
115
+ - securityVersions.connectxFirmware.status
116
+ - securityVersions.dcgm.status
117
+ - securityVersions.dcgmExporter.status
118
+ - securityVersions.virtioNetBluefield.status
119
+ - securityVersions.virtioNetBluefield.exposure
120
+ - securityVersions.dpuHostIsolation.status
121
+ - security.januscape.status
122
+ - security.guestKernel.newerInstalled
123
+ - security.fragnesia.status
124
+ - bmc-ipmi
125
+ - ufm-profile
126
+ - pcie-passthrough
127
+ - nvlink-boundary
128
+ ```
129
+
130
+ The resolved plan enables only `audit.audit`. It uses the standard artifact
131
+ files, progress wrapper, and report formatter. On Slurm, the security profile
132
+ uses a focused collector that runs the worker security inventory, container
133
+ version inventory, and backend fabric checks that its report needs.
134
+
135
+ Every live audit reports its target before it collects data. An interactive
136
+ run requires confirmation. The default answer cancels the audit with exit code
137
+ 130:
138
+
139
+ ```text
140
+ # ClusterMAX audit target
141
+ Command: cmax audit security
142
+ Target: Local machine
143
+ Host: <hostname>
144
+ System: macOS <version> (<architecture>)
145
+ Access: current shell; cluster credentials are not used
146
+ Compatibility: limited; Linux GPU checks can report unavailable components
147
+ Selection: auto-detected
148
+ Run this audit? [y]es, [c]hange target or access, [N]o:
149
+ ```
150
+
151
+ Enter `c` to select the local machine, a Kubernetes cluster, or a Slurm
152
+ cluster. Kubernetes selection accepts a kubeconfig path and a context. It
153
+ validates the connection before the audit starts. Slurm selection validates
154
+ the current Slurm client session.
155
+
156
+ Run the security audit after you confirm that the target is correct. The command
157
+ uses `-v` detail by default.
158
+ ```bash
159
+ cmax audit security
160
+ ```
161
+
162
+ Use `-vvv` for the most detail.
163
+ ```bash
164
+ cmax audit security -vvv
165
+ ```
166
+
167
+ ## Notes on usage
168
+
169
+ 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.
170
+
171
+ Users can run the command multiple times. Each run writes timestamped artifacts
172
+ under `~/.clustermax/audit/` by default.
173
+
174
+ A failed security check produces exit code 2. Use `--exit-zero` when the caller
175
+ requires exit code 0.
176
+
177
+ See [the security audit section](#run-a-security-audit) for the criteria,
178
+ report format, and evidence limits.
179
+
180
+ ## Run a cluster audit
181
+
182
+ Version 0.2.1 runs the core audit. Use `-s` or `--show` to list every check without collecting data:
183
+
184
+ ```bash
185
+ cmax audit --show
186
+ ```
187
+
188
+ The preview groups the full audit checks into these profiles:
189
+
190
+ | Profile | Scope |
191
+ |---|---|
192
+ | `versions` | This profile shows component versions and required minimums. |
193
+ | `isolation` | This profile shows kernel, virtualization, and tenant isolation. |
194
+ | `hardware` | This profile shows GPU, memory, and input-output virtualization. |
195
+ | `software` | This profile shows GPU development and diagnostic tools. |
196
+ | `containers` | This profile shows the container runtime and its GPU integration. |
197
+ | `orchestration` | This profile shows Slurm workers, Pyxis, and Kubernetes kubelets. |
198
+ | `networking` | This profile shows fabric topology, adapter naming, and NCCL configuration. |
199
+ | `storage` | This profile shows binary storage installation and configuration checks. |
200
+ | `health` | This profile shows node health and GPU telemetry checks. |
201
+
202
+ Use a profile as an audit subcommand to select its checks:
203
+
204
+ ```bash
205
+ cmax audit hardware --show
206
+ cmax audit hardware
207
+ cmax audit networking --slurm
208
+ ```
209
+
210
+ Every named profile uses the same core collector wrapper, progress display,
211
+ artifact directory, and report formatter. A profile limits the supplemental
212
+ checks and the terminal report to its selected audit checks. The shared
213
+ collector still records the inventory that the selected checks need. The Slurm
214
+ security profile also omits complete-audit sections that do not supply security
215
+ evidence.
216
+
217
+ The complete audit reads seven days of retained kernel history for GPU errors.
218
+ It checks every node in an active Slurm allocation and every Kubernetes GPU
219
+ node. It uses the current-boot `dmesg` buffer when the journal is not readable.
220
+
221
+ Each live profile saves `audit.out` and `audit.values.json`. The security
222
+ profile returns exit code 2 when its standard report contains a failed check.
223
+ Use `--exit-zero` when an automation system requires exit code 0.
224
+
225
+ Every audit report uses the same status blocks. `PASS` is green, `WARNING` is
226
+ yellow, `FAIL` is red, and `SKIPPED` is dim when output goes to a terminal.
227
+ Redirected output stays plain text. The default `-v` output shows every passed,
228
+ warning, failed, and skipped check. It also shows each observed version, its
229
+ minimum version, and a link to that component in the published
230
+ [minimum-version table](https://www.clustermax.ai/minimum-versions), such as
231
+ [`runc`](https://www.clustermax.ai/minimum-versions#runc). The `-vv` output adds
232
+ labeled CVE and vendor documentation links. The `-vvv` output adds the issue
233
+ description and recommended remediation. The CLI does not provide an output
234
+ level below `-v`.
235
+
236
+ Target aliases select an environment for the complete audit:
237
+
238
+ ```bash
239
+ cmax audit slurm
240
+ cmax audit k8s
241
+ cmax audit standalone
242
+ cmax audit vm
243
+ cmax audit container
244
+ ```
245
+
246
+ These commands are equivalent to the matching `--slurm`, `--k8s`,
247
+ `--standalone`, `--vm`, and `--container` options.
248
+
249
+ The Slurm audit checks Pyxis through the container options that Pyxis adds to
250
+ `srun --help`. It records the installed package version when package metadata
251
+ is available. The check does not start a container or wait for a GPU allocation.
252
+ If the options are unavailable, the audit links to the
253
+ [NVIDIA Pyxis installation instructions](https://github.com/NVIDIA/pyxis#installation).
254
+
255
+ The full audit also evaluates the published criteria that have binary results
256
+ from a cluster target. These checks verify scheduler CUDA device assignment,
257
+ Lmod, Kubernetes ReadWriteMany storage, and Nsight Compute profiling permission.
258
+ The audit omits criteria that require commercial, contractual, performance,
259
+ reliability, provider-side, or scale-out network evidence.
260
+
261
+ After target selection, the audit runs only checks that apply to that target.
262
+ A standalone container, virtual machine, or bare-metal host omits every check
263
+ that applies only to Slurm or Kubernetes. These checks include GRES, Pyxis,
264
+ scheduler topology, multi-node NCCL, health programs, prologs, NHC,
265
+ auto-remediation, and kubelet CPU Manager.
266
+
267
+ A Kubernetes audit discovers provider components across all namespaces, because
268
+ managed services can use provider-specific namespaces and current Kubernetes
269
+ application labels. The audit also distinguishes a container runtime binary
270
+ from a compatibility link whose command name is `docker`. When the audit finds
271
+ Promtail with Loki or Elasticsearch, it reports the aggregation system as the
272
+ logging stack and reports Promtail only as a detected log shipper.
273
+
274
+ The Kubernetes BMC and IPMI check uses the confirmed Kubernetes identity to
275
+ create a privileged pod that mounts each worker host root. The report names
276
+ each checked node and states the fleet coverage. This evidence proves what that
277
+ administrative identity can reach. It does not prove that an ordinary workload
278
+ pod can reach the same local management interface. The check examines up to 32
279
+ worker nodes by default. Set `CLUSTERMAX_AUDIT_K8S_BMC_NODE_LIMIT` to a larger
280
+ positive integer when a larger fleet requires complete coverage.
281
+
282
+ The standalone audit also omits scale-out network checks. It does not inspect
283
+ InfiniBand, RoCE, RDMA, HCA naming, PKeys, UFM, SHARP, fabric topology, or
284
+ GPUDirect RDMA. The report marks their criteria as `SKIPPED`. Slurm and
285
+ Kubernetes audits keep their scale-out checks.
286
+
287
+ The standalone audit still reads the local PCI device list to determine
288
+ whether the NVIDIA GPU driver security criterion applies to the host.
289
+
290
+ The platform configuration checks have separate entry points. The hardware
291
+ profile runs `vm-iommu-check.py` and `arm-smmu-virtualization-check.py`. The
292
+ networking profile runs `nccl-topology-file-check.py` on Slurm and
293
+ `nccl-ib-qps-check.py` on Slurm or Kubernetes. The entry points reuse one host
294
+ collection during an audit run.
295
+
296
+ The core audit collects cluster, host, GPU, storage, network, health, and
297
+ security data. It does not run the planned performance or reliability tests.
298
+
299
+ Each audit command sets its execution profile and selected harness explicitly.
300
+ An inherited `CLUSTERMAX_AUDIT_SCOPE` or `CLUSTERMAX_AUDIT_HARNESS` value cannot
301
+ change the confirmed selection. `cmax audit` uses the complete profile. Each
302
+ named subcommand uses its matching focused profile.
303
+
304
+ Run or review the core audit with these commands:
305
+
306
+ ```bash
307
+ cmax audit
308
+ cmax audit review
309
+ ```
310
+
311
+ ClusterMAX detects Slurm, Kubernetes, or a standalone machine. Use `--slurm`,
312
+ `--k8s`, `--local`, or `--standalone` when detection is incorrect. The command
313
+ uses the same target report and confirmation as the security audit.
314
+
315
+ Each audit saves its results in `~/.clustermax/audit/<timestamp>/`. Set
316
+ `CLUSTERMAX_RUNS_ROOT` when you need the ingest-compatible
317
+ `<root>/<cluster>/<timestamp>/audit/` layout.
318
+
319
+ The audit is read-only. This section gives the requirements, checks, and output
320
+ files.
321
+
322
+ Use `cmax audit review` to open the newest saved audit. You can also specify an
323
+ audit directory, an `audit.values.json` file, or an `audit.out` file:
324
+
325
+ ```bash
326
+ cmax audit review runs/<cluster>/<timestamp>/audit/audit.out
327
+ cmax audit review --command 'find runc'
328
+ cmax audit review --command 'show securityVersions.runc.status'
329
+ ```
330
+
331
+ Use `-v` to include passing and skipped checks. Use `-vv` to include observed
332
+ evidence. Use `-vvv` to include recommended remediation and labeled reference
333
+ URLs. Use `--command raw` to print the saved collector log. Use
334
+ `--no-interactive` to print the review and exit.
335
+
336
+ ## Repository contents
337
+
338
+ | Path | Contents |
339
+ |---|---|
340
+ | `cmax/` | This directory contains the command code and `cmax.yaml` configuration. |
341
+ | `cmax/scripts/1-audit/` | This directory contains the scripts that run an audit. |
342
+ | `tests/audit/` | This directory contains all audit tests, fixtures, and test helpers. |
343
+
344
+ This release excludes provider results, internal notes, the private dashboard,
345
+ benchmark implementations, bundled data, and database code.
346
+
347
+ ## License
348
+
349
+ All published ClusterMAX source code uses the Apache License 2.0. See
350
+ [LICENSE](LICENSE).