pub enum ProjectConfigTrust {
Untrusted,
Trusted,
}Expand description
Trust level applied to a ./mcpls.toml discovered relative to the
process’s current working directory.
A CWD-discovered project-local config is not the same trust tier as an
explicit --config/MCPLS_CONFIG path: it can be planted by whoever
controls the checked-out repository, and it controls the command and
args mcpls spawns as well as [workspace] (which can redirect the
spawn target via roots or drive a filesystem-walk DoS via
heuristics_max_depth). ServerConfig::load treats it as
Untrusted by default; callers that want it honored
must opt in via ServerConfig::load_with_trust.
An explicitly passed --config/MCPLS_CONFIG path is unaffected by this
enum and is always trusted: naming a path is itself the user’s consent.
Variants§
Untrusted
Ignore a CWD-discovered ./mcpls.toml entirely; fall through to the
global config tier or built-in defaults.
Trusted
Load a CWD-discovered ./mcpls.toml normally.
Trait Implementations§
Source§impl Clone for ProjectConfigTrust
impl Clone for ProjectConfigTrust
Source§fn clone(&self) -> ProjectConfigTrust
fn clone(&self) -> ProjectConfigTrust
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more