Skip to content

Commit 63d6bca

Browse files
committed
docs(security): correct bcrypt cost + remove false encryption-at-rest claim
Two doc errors caught by the 2026-05 security audit (P0-3): 1. SECURITY.md claimed bcrypt cost 10. The code has been using cost 12 since gearbox/internal/framework/auth/password.go was written; the doc just never caught up. Cost 12 is the 2026 OWASP baseline, so the code is right and the doc was lagging. 2. SECURITY.md claimed "Credential Encryption: API keys encrypted at rest (AES-256-GCM)". That implementation does not exist anywhere in the codebase — a grep for "aes" / "GCM" / "cipher" returns zero hits in gearbox-agent. Secrets are protected by filesystem permissions (mode 0600) only. The claim is replaced with an honest description of the actual posture, plus guidance on how to layer real encryption-at-rest underneath (FDE / KMS). Also adds the 2026-05 audit to the Security Audit History table. The "real fix" for #2 (implementing envelope encryption with a KMS- or TPM-backed key) is tracked separately; co-locating the decryption key with the ciphertext on the same filesystem buys nothing real and the honest doc is more defensible than the theatrical implementation.
1 parent 09b5737 commit 63d6bca

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

SECURITY.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Gearbox includes the following security features:
147147

148148
### Authentication & Authorization
149149

150-
- **Bcrypt Password Hashing**: Industry-standard password hashing (cost 10)
150+
- **Bcrypt Password Hashing**: Industry-standard password hashing (cost 12; OWASP 2026 baseline)
151151
- **Session Management**: Secure, HTTP-only session cookies
152152
- **Password Requirements**: Minimum 50 bits entropy, blocks common passwords
153153
- **Multi-factor Support**: WebAuthn/Passkey support for strong authentication
@@ -171,7 +171,13 @@ Gearbox includes the following security features:
171171
### Data Protection
172172

173173
- **Secret Redaction**: Automatic redaction in debug logs
174-
- **Credential Encryption**: API keys encrypted at rest (AES-256-GCM)
174+
- **Filesystem-Protected Secrets**: API keys, webhook secrets, and admin
175+
credentials are stored as files owned by the agent user with mode `0600`
176+
(owner read/write only). Encryption-at-rest is **not** currently
177+
implemented; if the filesystem is compromised by an attacker with the
178+
agent's UID or root, secrets are exposed. Deployments that need
179+
encryption-at-rest should run the agent on a filesystem with FDE
180+
(LUKS, FileVault, etc.) or use an external KMS-backed secret store.
175181
- **Secure Password Storage**: Admin credentials written to file with 0600 permissions
176182
- **Session Secrets**: 256-bit minimum session secret requirement
177183

@@ -195,9 +201,10 @@ Subscribe to the repository to receive notifications of security updates.
195201

196202
## Security Audit History
197203

198-
| Date | Auditor | Scope | Findings | Status |
199-
|------------|----------------|----------------|----------|-----------|
200-
| 2026-01-31 | Internal Scan | Full codebase | 10 total | ✅ Resolved |
204+
| Date | Auditor | Scope | Findings | Status |
205+
|------------|-----------------------|---------------------------------------------|---------------------------------|----------------|
206+
| 2026-01-31 | Internal Scan | Full codebase | 10 total | ✅ Resolved |
207+
| 2026-05-10 | Internal Deep Audit | Auth, agent API, HAProxy pipeline, SQL/XSS, agent subprocess | 4 P0, 8 P1, 10 P2, 8 P3 | 🔄 In progress |
201208

202209
## Contact
203210

0 commit comments

Comments
 (0)