Security
Security considerations and best practices for Calliope CLI.
API Key Security
Storage Options
Recommended: Environment Variables
export ANTHROPIC_API_KEY="sk-ant-..."Environment variables are:
- Not persisted to disk (unless in shell config)
- Not accessible to other processes easily
- Easy to rotate
Alternative: Config File
Keys entered during setup are stored in ~/.config/calliope/config.json.
To secure the config file:
chmod 600 ~/.config/calliope/config.jsonKey Rotation
If you suspect a key is compromised:
- Revoke the key at your provider’s dashboard
- Generate a new key
- Update your configuration:
# If using environment variable export ANTHROPIC_API_KEY="new-key-here" # If using config file calliope --setup
Don’t Commit Keys
Add to .gitignore:
# Calliope config
.env
.env.localUse .env.example for documentation:
# .env.example (safe to commit)
ANTHROPIC_API_KEY=
OPENAI_API_KEY=Execution Security
Path Traversal Protection
File operations are restricted to safe directories:
Allowed:
- Current working directory and subdirectories
- Home directory (
~) and subdirectories
Blocked:
- System directories (
/etc,/usr,/var) - Other users’ directories
- Path traversal attempts (
../../../etc/passwd)
Example:
User: Read /etc/passwd
Calliope: Error: Access denied - /etc/passwd is outside allowed directoriesFile Size Limits
To prevent memory issues:
- Read limit: 1 MB per file
- Write: No hard limit, but monitored
Command Execution
Shell commands:
- Run in a subprocess with timeout
- Use your shell environment
- Limited to 60 seconds by default
Permission Modes
Normal Mode (Default)
In normal mode, you’ll be prompted before tool execution:
[shell] $ npm install
Execute? (y/n)This allows you to:
- Review commands before execution
- Block suspicious operations
- Maintain control
God Mode
Enabled with -g or --god-mode:
calliope -gIn god mode:
- All tool calls execute without confirmation
- Suitable for trusted, automated tasks
- Shows a warning on startup
Use god mode carefully. Only enable for:
- Well-defined, specific tasks
- Trusted project directories
- Automated workflows you’ve tested
Sandboxing
Current Limitations
Calliope CLI runs with your user permissions. Commands can:
- Access files you can access
- Run programs you can run
- Use network resources
Recommendations
For sensitive environments:
Run in a container:
docker run -it -v $(pwd):/workspace node:20 bash npm install -g @calliopelabs/cli calliopeUse a dedicated user:
sudo useradd -m calliope-user sudo su - calliope-user npm install -g @calliopelabs/cliVirtual environments: Run in a VM or cloud development environment for isolation.
Network Security
API Communications
All API calls use HTTPS:
- Anthropic:
api.anthropic.com - OpenAI:
api.openai.com - Google:
generativelanguage.googleapis.com - etc.
Proxy Support
If you need to route through a proxy:
export HTTPS_PROXY=http://proxy.example.com:8080
calliopeLocal Models
For air-gapped or high-security environments, use Ollama:
# No external network calls
export OLLAMA_BASE_URL=http://localhost:11434
calliope
/provider ollamaAudit Trail
Conversation History
With autoSaveHistory: true, conversations are persisted. This provides:
- Record of what was requested
- Record of what was executed
- Debugging and compliance support
Logging
Calliope logs:
- Tool calls and their parameters
- Tool results (truncated)
- Errors and exceptions
For enterprise audit requirements, consider using AGTerm which provides comprehensive audit logging.
Best Practices
Development Environments
- Use separate API keys for development and production
- Set spending limits at your provider’s dashboard
- Use lower-cost models for testing
Production Usage
- Review all commands before execution (use normal mode)
- Start with read-only tasks before enabling writes
- Use version control so changes can be reverted
- Test autonomous loops with low iteration counts first
Team Environments
- Use environment variables rather than shared config files
- Each team member should have their own API keys
- Document expected variables in
.env.example
Responsible AI Use
Content Guidelines
Calliope inherits the safety features of the underlying AI provider:
- Anthropic Claude has Constitutional AI
- OpenAI GPT has content policies
- etc.
However, as a tool executor, Calliope will attempt to run commands you request.
Recommendations
- Review generated code before deployment
- Test in staging before production
- Don’t blindly trust AI-generated security code
- Have humans review critical changes
Reporting Issues
Found a security issue?
- Do not open a public GitHub issue
- Email security@calliope.ai
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
We take security seriously and will respond promptly.