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

Function _is_placeholder_for_env_key

e2e/python/test_sandbox_providers.py:34–42  ·  view source on GitHub ↗

Return true when value is an OpenShell credential placeholder for key.

(value: str, key: str)

Source from the content-addressed store, hash-verified

32
33
34def _is_placeholder_for_env_key(value: str, key: str) -> bool:
35 """Return true when value is an OpenShell credential placeholder for key."""
36 prefix = "openshell:resolve:env:"
37 if value == f"{prefix}{key}":
38 return True
39 token = value.removeprefix(prefix)
40 if token == value:
41 return False
42 return token.startswith("v") and token.endswith(f"_{key}")
43
44
45def _default_policy() -> sandbox_pb2.SandboxPolicy:

Calls

no outgoing calls

Tested by

no test coverage detected