Security considerations

July 15, 2026 · View on GitHub

This document describes security-relevant properties of Primus as a YAML-driven training framework for AMD GPUs (ROCm, RCCL, containers). It is intended for operators, platform engineers, and security reviewers. It does not replace organizational policies, threat models, or vendor hardening guides.

Related documentation: Environment variables, Installation, CLI reference.


1. Overview

AspectDescription
RolePrimus orchestrates distributed training jobs; it is not a general user-facing network service.
Authentication / authorizationNo built-in authentication, authorization, or multi-tenant isolation in Primus itself.
ResponsibilitySecurity posture is determined by the scheduler, container runtime, network, storage, identity systems, and operational practices of the deployment environment.

Treat Primus like privileged infrastructure software: run it on appropriately isolated hosts and networks, and govern secrets and data the same way you would for large-scale ML training elsewhere.


2. Secrets management

Secrets are commonly passed as environment variables consumed by Primus, launchers, or third-party libraries.

Variable (examples)Typical use
HF_TOKENHugging Face token for gated models and authenticated downloads.
WANDB_API_KEYWeights & Biases API key for experiment logging.
DATABRICKS_HOST / DATABRICKS_TOKENDatabricks or MLflow-related credentials when those integrations are used.

Practices

PracticeDetail
Do not hardcode secretsAvoid putting tokens or passwords directly in YAML, shell history, or committed scripts.
Prefer indirectionUse ${VAR} substitution in configs to reference environment-injected values rather than literals.
SlurmUse --export deliberately; prefer site-specific secret injection or credential helpers where available.
ContainersPass secrets with --env or via runner/.primus.yaml env forwarding—never bake them into images.
RotationRotate API keys and tokens on a schedule and after personnel or scope changes.

A broader catalog of variables appears in Environment variables.


3. Container security

Primus-oriented container runs often require elevated access so ROCm, profilers, and high-performance networking behave correctly.

Common high-privilege options

OptionTypical purpose
--privileged trueBroad device access (often required for ROCm workflows on some setups).
--cap-add SYS_PTRACEDebugging and profiling tooling.
--cap-add CAP_SYS_ADMINAdministrative operations expected by parts of the ROCm/tooling stack.
--security-opt seccomp=unconfinedRelaxes seccomp constraints for compatibility with drivers and tools.
--ipc hostShared memory semantics for large tensors and collectives.
--network hostHost networking—frequently used for multi-node RCCL performance and simplicity.

Device access (examples)

DeviceRole
/dev/kfdROCm kernel interface.
/dev/driGPU render nodes.
/dev/infinibandInfiniBand character devices when using IB.

Risks

RiskWhy it matters
Privileged containersSubstantial host access; container escape or compromise has high impact.
Host networkingExposes the container to the host’s network namespace; services may bind broadly.
Shared IPCPotential for cross-process interference or information leakage if workloads share hosts improperly.

Mitigations

MitigationDetail
Dedicated training nodesRun training on isolated machines rather than mixed with user-facing services.
Network controlsApply firewall rules and segmentation so only required ports and peers are reachable.
Trusted imagesPull from trusted registries, pin digests, and verify image provenance.
MonitoringTrack CPU, memory, GPU, and network usage; alert on anomalous processes or egress.

4. Third-party dependencies

Primus integrates third-party submodules and Python packages; each carries its own license and maintenance cadence.

Representative submodules

ComponentNotes (non-exhaustive)
Megatron-LMMIT License; NVIDIA upstream.
TorchTitanApache 2.0; PyTorch / Meta ecosystem.
MaxTextApache 2.0; Google upstream.
Megatron-BridgeNVIDIA NeMo ecosystem.
Emerging-OptimizersNVIDIA NeMo ecosystem.
HummingbirdXTAMD AGI ecosystem.

Python dependencies

Runtime tooling often includes packages such as loguru, wandb, nltk, matplotlib, mlflow, and others as declared in project requirements—verify the canonical list in the repository’s requirements.txt (or lockfile) for your revision.

Recommendations

RecommendationRationale
Pin versionsReproducible builds and controlled upgrade paths.
Update submodulesSecurity and correctness fixes flow from upstream projects.
Monitor advisoriesSubscribe to upstream security notices for frameworks you enable.

5. Network security

PropertyDetail
RCCL / NCCL trafficNot encrypted at the application layer; assumes a trusted network path.
CoordinationMASTER_ADDR and MASTER_PORT should reside on a private or otherwise trusted segment.
InfiniBandOften on a dedicated fabric; still treat adjacent compromised hosts as in-scope for lateral movement.
TLS / mTLSPrimus does not provide TLS or mTLS for inter-node training traffic by default.

For physical and logical networking topics, see Multi-node networking.


6. Data security

AssetConsideration
Training dataMay include PII, licensed corpora, or export-controlled material—classify and restrict accordingly.
CheckpointsContain full model state; treat as sensitive intellectual property.
Storage permissionsUse least privilege on shared filesystems and object stores.
HF_TOKENGrants access to gated Hugging Face assets—protect like any other long-lived credential.

Checkpoint formats and operational practices are described in Checkpoint management.


7. What is not verified

The following items reflect typical gaps in public-facing evidence for many research and infrastructure codebases; confirm against your organization’s audits and CI for your fork and deployment.

TopicStatus (evidence-based caveat)
Independent security auditNo comprehensive third-party audit of this codebase is asserted here.
CI secrets scanningNo guarantee of automated secret detection in CI unless your pipeline adds it.
Dependency vulnerability scanningNo guarantee of continuous SCA unless your pipeline adds it.
Container imagesImages may contain unpatched OS or Python packages—scan and rebuild on a schedule.
RCCL / NCCL trafficNot encrypted or mutually authenticated by default; rely on network trust boundaries.

Use this section as a checklist for your production controls: add scanning, signing, policy-as-code, and periodic reviews appropriate to your threat model.