Skip to main content

Permission Policies

All six SDKs expose path permissions (PermissionsManager), data-plane access and redaction policies (DataPlanePolicy), network domain allowlist checks (NetworkPolicy / SecurityClient.checkDomain / check_network_domain), and credential tokenization (SecretMasker). These controls apply wherever they are attached to the agent, sandbox, or tool resolution path; they do not automatically mediate arbitrary network or filesystem calls inside custom application code.

from ish import Agent, DataPlanePolicy, RegisterAccessRule

policy = DataPlanePolicy(
rules=[
RegisterAccessRule(
agent_pattern="public_*",
source_tool_pattern="*",
target_tool_pattern="private_*",
mode="deny",
)
],
default_mode="allow",
mask_secrets=True,
)

agent = Agent(
name="reviewer",
model="gpt-4o-mini",
data_plane_policy=policy,
)

Data-plane policy (DataPlanePolicy)​

DataPlanePolicy restricts $DATA: / $SOURCE_DATA: cross-tool transfers and can mask secrets or PII in handled payloads:

Review rule precedence and defaults for your use case. A policy that defaults to allow needs explicit deny rules for restricted paths.

Network checks, secret masking​

Use NetworkPolicy (Python), check_network_domain (Rust), or SecurityClient (TypeScript, Go, C#, Java) to evaluate outbound host allowlists, and SecretMasker to issue capability-bound [SECRET:...] references:

from ish import NetworkPolicy, SecretMasker

network_policy = NetworkPolicy(allowed_domains=["api.example.com"], default_action="deny")
print(network_policy.is_allowed("https://api.example.com/v1/status"))

masker = SecretMasker()
token = masker.register("example-secret", provenance="application")
masked_text = masker.mask("credential: example-secret")

See Deterministic guardrails for PermissionsManager filesystem rules across all six SDKs and each SDK README for error types and secret restoration parameters.