Fix critical validation gap for run volume parameters #324
+123
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The registry validator had a blind spot: while
isConfigEnvValid()
enforces that environment variable templates are namespaced with the server name, there was no equivalent guard forserver.Run.Volumes
. As a result, any volume mapping could reference parameters from a completely different server and still pass validation, only to explode later at runtime with an opaque Docker error.Problem
Here’s the kind of misconfiguration we were silently accepting:
Because nothing double-checked
server.Run.Volumes
,{{wrong-name.storage_path}}
skated by unchecked. When Docker spun up the container it couldn’t resolve that parameter and failed with a cryptic message.Impact
More than twenty production servers rely on templated volumes today, including:
arxiv-mcp-server
→{{arxiv-mcp-server.storage_path}}:/app/papers
markdownify
→{{markdownify.paths|volume|into}}
aks
→{{aks.azure_dir}}:/home/mcp/.azure
Any typo in those prefixes would have slipped through CI and landed in the registry, leaving operators to discover the failure only after deployment.
Solution
isRunVolumesValid()
to mirror the existing environment validation rules.{{server.param}}
) or a filtered expression ({{server.param|filter|into}}
).Before
$ go run ./cmd/validate --name my-server ✅ Config env is valid ✅ License validation skipped # Invalid volume parameter silently accepted!
After
Testing
arxiv-mcp-server
,markdownify
, andaks
all pass with the new guardrails.This closes the validation gap and surfaces configuration mistakes where they belong—in CI, not in production.