Refuse profile env and args that would run code or touch files on the nodes
env is an allowlist of tuning families less path, plugin, library, address and credential names (NCCL_*_PLUGIN, CUDA_INJECTION64_PATH and the like got through the old denylist); llama.cpp's LLAMA_ARG_* are checked as flags. args refuse --trust-remote-code, --log-file, --slot-save-path, --tool-parser-plugin, --middleware, --allowed-local-media-path and others that read, write or load, and what the agent sets itself. Checked in the catalog and again on the node before an engine starts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c522e8b2aa
commit
c19abe95e1
6 files changed
+241
-21
No files matched your search
@@ -920,6 +920,12 @@ func (a *Agent) startShard(ctx context.Context, m *llmgwv1.StartShard, out chan<
|
||||
|
||||
// Validate before launching. An engine that refuses a profile does so after
|
||||
// minutes of loading; catching it here costs nothing.
|
||||
// Checked again here, whatever sent the profile: this is the process
|
||||
// about to run as root.
|
||||
if err := engines.UnsafeArgs(spec.Profile.Engine, spec.Profile.Args); err != nil {
|
||||
report(supervisor.Failed, err.Error(), nil)
|
||||
return
|
||||
}
|
||||
if err := eng.Validate(spec.Profile, gpuInfo(inv, spec.GPUIndices)); err != nil {
|
||||
report(supervisor.Failed, err.Error(), nil)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user