pub fn assess(
workdir: &Path,
home: Option<&Path>,
allowed: &[String],
) -> WorkdirVerdictExpand description
Decide whether workdir needs confirming.
home is the user’s home directory (None when it cannot be resolved, in
which case the home check simply cannot fire). allowed is
[security] allowed_workdirs; a workdir at or under any entry proceeds.
Comparison is textual on already-canonicalised paths - effective_workdir
canonicalises the --workdir flag, and the invocation directory is
canonical by construction. This deliberately does not touch the filesystem:
the check runs on every lev run, and a stat storm on the startup path
would be a poor trade for catching a symlinked home.