Security Architecture
profClaw is designed with a defense-in-depth model. Security is enforced at multiple independent layers - a failure in one layer does not compromise the system.Security Components
Security Modes
Five modes from
deny (no tools) to full (unrestricted). Configured per channel, user, or globally.Guards
FsGuard (path traversal), SsrfGuard (SSRF/network), PromptGuard (injection), AuditScanner.
Audit Logging
Immutable audit trail of all tool calls, approvals, and security events.
Device Pairing
QR code pairing and DM verification for unknown senders.
Plugin Sandbox
Permission model for plugins, static code scanning, and trust tiers.
Security Modes
profClaw supports five security modes. The active mode applies globally but can be overridden per user or per chat channel.| Mode | Tools Available | Write/Exec Behavior | Best For |
|---|---|---|---|
deny | None | All tool calls blocked | Read-only chat, unknown users |
sandbox | Limited | Docker-isolated execution only | Untrusted input, shared deployments |
standard | Standard tier | Reads auto-approved; writes shown to user | Most deployments (default) |
ask | Full tier | All write/exec operations require approval | Production, sensitive codebases |
full | Full tier | All tools execute without prompts | Trusted local development only |
Risk Levels
All security events are classified by a numeric risk score. Scores are computed by the PromptGuard and AuditScanner based on detected patterns.| Level | Score | Default Behavior |
|---|---|---|
LOW | 0-24 | Logged only |
MEDIUM | 25-49 | Logged, surfaced in audit dashboard |
HIGH | 50-74 | Logged, may block depending on active mode |
CRITICAL | 75-100 | Blocked and alerts sent |
Default Security Configuration
Out of the box, profClaw runs instandard mode. These are the defaults applied when no security: block is present in settings.yml:
Security Responsibilities
| Layer | Your Responsibility | profClaw’s Default |
|---|---|---|
| Network | Set allowedHosts for external services | Block all private IPs via SsrfGuard |
| Filesystem | Extend allowedPaths for needed directories | Block secrets, system files, parent paths |
| Authentication | Configure your auth provider | Verify tokens per request |
| Secrets | Store in env vars, not settings.yml | Never log or expose key values |
| Models | Choose trusted AI providers | Validate all tool call parameters with Zod |
Hardening Checklist
For production deployments
For production deployments
- Set
security.modetoaskorstrict - Set
WEBHOOK_BASE_URLto your actual domain (not localhost) - Restrict chat channels with
allowedChannelsandallowedUsers - Set
ssrfGuard.allowedHostsexplicitly if the agent needs to call internal APIs - Enable device pairing for unknown sender verification
- Review audit logs regularly with
profclaw logs --audit
For shared or multi-tenant deployments
For shared or multi-tenant deployments
For local development
For local development
standardmode is safe and is the recommended default even locallyfullmode is only appropriate for solo developer machines with no external access- Run
profclaw doctor --securityto verify your configuration