mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-25 14:18:54 +00:00
Merge pull request #13415 from Apokleos/disable-sb-bmnt
kata-types: disallow sandbox bind mounts from annotations
This commit is contained in:
@@ -1154,14 +1154,12 @@ impl Annotation {
|
||||
config.runtime.shared_mounts = serde_json::from_str(value.as_str())?;
|
||||
}
|
||||
KATA_ANNO_CFG_SANDBOX_BIND_MOUNTS => {
|
||||
let args: Vec<String> = value
|
||||
.to_string()
|
||||
.split_ascii_whitespace()
|
||||
.map(str::to_string)
|
||||
.collect();
|
||||
for arg in args {
|
||||
config.runtime.sandbox_bind_mounts.push(arg.to_string());
|
||||
}
|
||||
// Host bind-mount paths are operator-controlled configuration only.
|
||||
// Never honor them from untrusted workload annotations.
|
||||
warn!(
|
||||
sl!(),
|
||||
"Annotation {} is not permitted from workload annotations", key
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
warn!(sl!(), "Annotation {} not enabled", key);
|
||||
|
||||
Reference in New Issue
Block a user