MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / readable_paths

Method readable_paths

crates/openshell-prover/src/policy.rs:263–274  ·  view source on GitHub ↗

All readable paths (union of `read_only` and `read_write`), with workdir added when `include_workdir` is true and not already present.

(&self)

Source from the content-addressed store, hash-verified

261 /// All readable paths (union of `read_only` and `read_write`), with workdir
262 /// added when `include_workdir` is true and not already present.
263 pub fn readable_paths(&self) -> Vec<String> {
264 let mut paths: Vec<String> = self
265 .read_only
266 .iter()
267 .chain(self.read_write.iter())
268 .cloned()
269 .collect();
270 if self.include_workdir && !paths.iter().any(|p| p == "/sandbox") {
271 paths.push("/sandbox".to_owned());
272 }
273 paths
274 }
275}
276
277/// The top-level policy model used by the prover.

Callers 5

test_filesystem_policyFunction · 0.80
encode_filesystemMethod · 0.80

Calls 1

pushMethod · 0.80

Tested by 4

test_filesystem_policyFunction · 0.64