Return true when value is an OpenShell credential placeholder for key.
(value: str, key: str)
| 32 | |
| 33 | |
| 34 | def _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 | |
| 45 | def _default_policy() -> sandbox_pb2.SandboxPolicy: |
no outgoing calls
no test coverage detected