Restrict HTTP file artifact inputs
This commit is contained in:
@@ -85,6 +85,7 @@ Primary app settings consumed by adapters:
|
||||
- `profile_dir` (optional custom profile source)
|
||||
- `schema_dir`
|
||||
- `server.addr`
|
||||
- `server.artifact_root` (HTTP `serve` file input root)
|
||||
- `defaults.render_format`
|
||||
|
||||
Execution profile/request settings used through runner:
|
||||
@@ -116,6 +117,10 @@ Artifact refs:
|
||||
|
||||
- Supported reference types: `inline`, `file`.
|
||||
- Unsupported types return `ErrUnsupportedRefType`.
|
||||
- CLI `run` and `render` use direct filesystem file reads for `file` references.
|
||||
- HTTP `serve` uses a restricted artifact reader: `inline` references work without a root, while `file` references require `server.artifact_root` or `--artifact-root` and must stay inside that root.
|
||||
- HTTP file paths are resolved with clean absolute paths and containment checks, not string-prefix checks.
|
||||
- Symlinks inside the root are followed by the operating system; the configured root must not be writable by untrusted users.
|
||||
|
||||
LLM adapter:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user