Security Model
Overview
Architecture Security
flowchart TB
subgraph trusted["User's Machine (Trusted)"]
token["API Token<br/>(env var)"]
sshkeys["SSH Keys<br/>(filesystem)<br/>0600 perms"]
state[("Local State<br/>~/.spuff/state.db")]
end
subgraph semitrust["Cloud VM (Semi-trusted)"]
providerapi["Provider API<br/>(external)"]
sshserver["SSH Server<br/>Port 22"]
agent["spuff-agent<br/>Port 7575 (localhost only)<br/>Token auth required"]
note["No private keys stored<br/>No API tokens stored<br/>Ephemeral by design"]
end
token -->|"HTTPS (TLS)"| providerapi
sshkeys -->|"SSH Agent Forwarding<br/>(keys never leave machine)"| sshserver
sshkeys -->|"SSH (encrypted)"| sshserver
style note fill:#f5f5f5,stroke:#ccc,stroke-dasharray: 5 5Threat Model
Assets to Protect
Asset
Location
Protection
Threat Actors
Attack Scenarios
Scenario 1: VM Compromise
Scenario 2: API Token Theft
Scenario 3: Network Interception
Security Controls
Authentication
Cloud Provider API
SSH Access
Agent API
Network Security
Exposed Ports
Port
Service
Exposure
Notes
Firewall Recommendations
VM Hardening
Data Protection
At Rest
Data
Storage
Protection
In Transit
Channel
Protection
Secrets Management
Do's
Don'ts
Security Considerations
SSH Agent Forwarding Risks
Cloud-Init Secrets
Ephemeral Security Benefits
Compliance Considerations
For Sensitive Workloads
Data Residency
Incident Response
If API Token Compromised
If VM Compromised
If SSH Key Compromised
Security Checklist
Initial Setup
Ongoing
For Teams
Reporting Vulnerabilities
References
Last updated
Was this helpful?