FerrisPad is designed with security as a core principle. This document outlines our security model, what we protect against, and our roadmap.
| Area | Status | Notes |
|---|---|---|
| Core Editor (Rust) | ✅ Stable | Memory-safe by design |
| Plugin System (Lua) | ✅ Sandboxed | Stdlib blocked, path sandbox, instruction/memory limits |
| Auto-Updates | ✅ Stable | HTTPS only, no auto-install |
| Plugin Downloads | ✅ Stable | HTTPS + ed25519 signature verification |
- No Telemetry - Zero data collection, no phone-home
- Single Binary - No external runtime dependencies to compromise
- Memory Safety - Rust prevents buffer overflows, use-after-free
- Minimal Privileges - No elevated permissions required
- No
unsafein parsing code - File content treated as untrusted - Input validation - UTF-8 verification, bounds checking
- Dependency auditing - Regular
cargo auditchecks - HTTPS strict - Certificate verification for update checks
We minimize external dependencies. Key crates:
fltk- GUI frameworksyntect- Syntax highlightingmlua- Lua runtime (statically linked)serde/serde_json- Settings/session serialization
Run cargo audit to check for known vulnerabilities.
The plugin sandbox is hardened:
- Dangerous Lua standard libraries (
os,io,debug,package) are blocked - File access uses
api:read_file()/api:write_file()sandboxed to project root - Command execution uses
api:run_command()with a whitelist and timeout - Path traversal prevented via
fs::canonicalize()+ root check - Instruction limit (1M per hook) prevents infinite loops
- Memory limit (16 MB per plugin) prevents exhaustion
We protect against:
- Malicious plugins executing arbitrary shell commands
- Plugins accessing files outside project scope
- Path traversal attacks (
../../etc/passwd) - Injection via command arguments
- Infinite loops / memory exhaustion (DoS)
We do NOT protect against (OS responsibility):
- Compromised system binaries (e.g., malware replaced
/usr/bin/ruff) - System-level keyloggers or rootkits
- User voluntarily installing malware
If an attacker can modify binaries in the user's PATH, the system is already compromised. This is the same trust model as VSCode, Neovim, and Sublime Text.
- Block dangerous Lua libraries:
os,io,debug,package - Replace
io.popen()with controlledapi.run_command() - Replace
io.open()withapi.read_file()/api.write_file() - Path canonicalization to prevent traversal
- Instruction limits to prevent infinite loops
- Memory limits per plugin
Plugins declare required permissions in plugin.toml:
[permissions]
execute = ["ruff", "mypy"]Command execution permissions are enforced at runtime — plugins can only run whitelisted commands declared in their manifest. On first load, the user sees a per-command approval dialog ("This plugin wants to execute: ruff, mypy. Allow?"). Approvals are persisted to settings so the prompt only appears once per plugin.
- Embed ed25519 public key in FerrisPad binary (
src/app/services/plugin_verify.rs) - All downloaded plugins require valid signature — installation blocked if verification fails
- SHA-256 checksums for
init.luaandplugin.tomlin registry manifest - HTTPS with certificate verification via rustls
If you discover a security vulnerability:
- Do NOT open a public issue
- Email: [security contact to be added]
- Include: Description, reproduction steps, potential impact
- We aim to respond within 48 hours
- Download FerrisPad only from official sources (ferrispad.com, GitHub releases)
- Verify checksums when available
- Only install plugins from trusted sources
- Keep your system and tools (ruff, mypy, etc.) updated
- Never execute user input as shell commands
- Validate all file paths
- Use the provided API functions, not raw Lua
io/os - Document what external tools your plugin requires
- Don't bundle binaries - rely on user-installed tools
| Version | Security Changes |
|---|---|
| 0.9.0 | Initial plugin system (sandbox not hardened) |
| 0.9.1 | Added diagnostic panel, plugin API expansion |
| 0.9.2 | Lua sandbox hardened: stdlib blocked, path sandbox, instruction/memory limits, command whitelist. Permission prompts on plugin load with persistent approvals. Signed plugin downloads with ed25519 verification. Plugin Manager UI. Runtime cleanup on global disable |
Last updated: 2026-03