Refuse grant paths that cannot be mounted
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -260,6 +260,14 @@ fn check_grant(grant: &LoadedGrant, problems: &mut Vec<GrantProblem>) {
|
||||
None,
|
||||
format!("{:?} is not a valid absolute path", path),
|
||||
);
|
||||
} else if path.contains([':', ',']) {
|
||||
// Mounted as `--volume=<path>:<path>:ro`, where both are separators.
|
||||
push(
|
||||
problems,
|
||||
file.clone(),
|
||||
None,
|
||||
format!("{:?} cannot be mounted: it contains ':' or ','", path),
|
||||
);
|
||||
}
|
||||
}
|
||||
// Rule 8: every host must be a valid host pattern.
|
||||
|
||||
Reference in New Issue
Block a user