sasy-security-plugin
v0.1.0
Published
SASY policy enforcement plugin for OpenClaw — gates tool calls via DDlog rules with full graph-aware taint tracking
Downloads
7
Maintainers
Readme
SASY Security Plugin for OpenClaw
Policy enforcement plugin that gates every tool call through SASY DDlog rules, with full graph-aware taint tracking for stateful policies (e.g. toxic-flow detection).
Installation
openclaw plugins install sasy-security-pluginWhat it does
The plugin registers six lifecycle hooks:
| Hook | Purpose |
|------|---------|
| before_tool_call | Policy gate — blocks or allows every tool invocation |
| after_tool_call | Tracks tool results in the dependency graph |
| llm_input | Tracks LLM prompts for taint propagation |
| llm_output | Tracks LLM responses for taint propagation |
| message_received | Tracks incoming user messages |
| message_sending | Tracks outgoing agent messages |
The before_tool_call hook is the gatekeeper.
The other five hooks build a causal dependency
graph so DDlog policies can reason about prior
context (e.g. "did this session read a sensitive
file before attempting a web fetch?").
Configuration
Add to your ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"sasy-security": {
"enabled": true,
"config": {
"mode": "local",
"grpcHost": "localhost",
"grpcPort": 50051,
"entity": "your-entity-name",
"roles": "your-role1,your-role2"
}
}
}
}
}Config fields
| Field | Env var | Default | Description |
|-------|---------|---------|-------------|
| mode | — | cloud | cloud (REST to sasy.fly.dev) or local (gRPC to sasy binary) |
| rmUrl | — | https://sasy.fly.dev | REST endpoint (cloud mode) |
| grpcHost | SASY_GRPC_HOST | localhost | gRPC target host (local mode) |
| grpcPort | SASY_GRPC_PORT | 50051 | gRPC target port (local mode) |
| failOpen | SASY_FAIL_OPEN | false | Allow tool calls when backend is unreachable |
| entity | SASY_ENTITY | "" | Pre-authenticated entity name |
| roles | SASY_ROLES | "" | Comma-separated roles for DDlog |
| tenantId | SASY_TENANT_ID | default | Tenant ID for multi-tenancy |
| timeoutMs | — | 2000 | Timeout for policy checks (ms) |
Environment variables
Environment variables override config file values. Useful in Docker deployments:
SASY_MODE=local
SASY_GRPC_HOST=sasy # Docker service name
SASY_GRPC_PORT=50051
SASY_ENTITY=openclaw-gateway
SASY_ROLES=reference-monitor-user,llm-accessRequirements
- A running
sasybinary with a compiled DDlog policy plugin (.sofile). See the SASY getting started guide for compilation and setup. - Entity and roles must match your
auth_config.yamlso DDlogHasRole()rules can evaluate correctly.
Modes
Cloud mode (default)
REST calls to https://sasy.fly.dev. Requires an
API key set via the SASY_API_KEY environment
variable.
Local mode
gRPC calls to a local sasy binary. Auth context
is sent via gRPC metadata (x-entity, x-roles,
x-tenant-id) — no API key needed.
License
Apache-2.0
