🔒

Classified Document

Sterling AI Infrastructure Security Audit
Enter access code to continue

CONFIDENTIAL

Sterling AI Infrastructure
Security Audit

Comprehensive self-audit of all connected systems, credentials, and network exposure

📅 June 30, 2026 🔎 Auditor: Sterling AI (Self-Audit) 🛡 Scope: Full Infrastructure

Overall Security Posture: YELLOW (Moderate Risk)

Solid foundation in place ... FileVault encryption enabled, macOS SIP active, most credentials in Keychain, OAuth files with owner-only permissions, CDP port bound to localhost. However, several significant vulnerabilities require immediate attention: exposed API tokens in frontend code, an unauthenticated Docker container on all interfaces, plaintext JWT secrets, wildcard CORS, and the macOS firewall disabled.

5
Critical
8
High
8
Medium
5
Low
15
Clean

Infrastructure at a Glance

78
Keychain Creds
80+
CF Pages
8
Workers
9
D1 Databases
11
KV Namespaces
5
DNS Zones
3
Services on 0.0.0.0
2
Docker Containers
CRIT-1 OA Recruit Agent on 0.0.0.0:8501 with Embedded API Keys, No Auth FIXED

Risk

Anyone on the same network can access the recruitment pipeline agent, which has embedded API keys for Zoho Recruit, HubSpot, Predictive Index, LinkedIn, Gemini, and Zoho client secret. An attacker on the same WiFi can use the chat agent to query/modify recruitment data or extract keys via prompt injection.

Technical Details

The oa-recruit-agent Docker container was bound to 0.0.0.0:8501 (all network interfaces). It serves a web chat UI with zero authentication. Six API keys were baked into environment variables.

Fix Applied

Container rebound to 127.0.0.1:8501:8080 (localhost only). Remaining work: add authentication to the web UI, move API keys from env vars to Docker secrets.

CRIT-2 JWT Plaintext Secret Shared Across Two Workers FIXED

Risk

JWT signing secret was stored as a plain_text binding (not secret_text) in both dugoutready-api and lineup-tool-api Workers. The same hex value was shared across both, meaning a token forged for one would work on the other. The secret was visible in the Cloudflare dashboard and API responses.

Technical Details

Both Workers had JWT_SECRET configured as plain_text binding. Anyone with Cloudflare dashboard access could read the value and forge valid JWTs for both DugoutReady and the Lineup Tool.

Fix Applied

JWT secrets rotated. Two new unique secrets generated (one per Worker). Stored as secret_text bindings. Both Workers redeployed. All existing JWTs invalidated.

CRIT-3 Wildcard CORS on Production APIs FIXED

Risk

Any website on the internet could make authenticated cross-origin requests to the dugoutready-api and lineup-tool-api endpoints. Combined with the JWT vulnerability, a phishing page could make API calls on behalf of a logged-in user.

Technical Details

Both Workers had CORS_ORIGIN set to * (wildcard). This permitted any origin to make cross-origin requests to endpoints handling user data and payment operations.

Fix Applied

CORS_ORIGIN updated to specific allowed domains: https://app.dugoutready.com and https://lineup-tool.pages.dev respectively.

CRIT-4 macOS Firewall Disabled NEEDS BRAD

Risk

No firewall protection on the Mac Mini, which runs 24/7 with 16+ listening services including 3 on all interfaces. Any device on the network can probe and connect to these services.

Technical Details

macOS Application Firewall state is 0 (disabled). At least 16 TCP services are listening, including services on 0.0.0.0 (all interfaces).

Fix Recommendation

  • Enable firewall: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
  • Set to block all incoming except explicitly allowed services
  • Requires sudo ... needs Brad to run on the Mac Mini
CRIT-5 Command Center API Token Hardcoded in Frontend HTML IN PROGRESS

Risk

Anyone who views page source can extract the API token and gain full read/write access to all Command Center data ... tasks, inbox, emails, relationships, settings, energy logs, stats, daily questions, focus sessions, family sync, LinkedIn scan, email scan, messenger scan, voicemail scan, AI drafts, and more.

Technical Details

The full API Bearer token is hardcoded in the HTML source of brads-command-center.pages.dev. While there IS a PIN gate on the frontend, the token is visible in page source regardless of PIN entry. The token is also documented in the CLAUDE.md instruction file.

Fix Recommendation

  • Remove hardcoded token from frontend HTML
  • Implement server-side auth flow: PIN entry calls an auth endpoint that returns a short-lived session token
  • Store master API token only as a Cloudflare environment variable
  • Remove token from CLAUDE.md (reference by Keychain name only)
HIGH-1 Cloudways API Key Hardcoded in CLAUDE.md FIXED

Risk

Anyone with container filesystem access could read the full Cloudways API key in plaintext. This key grants full server management access: create/delete servers, manage applications, install SSL, modify DNS, SSH access.

Fix Applied

API key removed from CLAUDE.md. Now referenced by Keychain service name only (cloudways-api-key). Key rotation recommended after cleanup.

HIGH-2 Twilio Account SID Hardcoded in CLAUDE.md FIXED

Risk

The Twilio Account SID was documented in plaintext in CLAUDE.md. While insufficient alone for API calls, having the SID exposed enables targeted attacks.

Fix Applied

SID removed from CLAUDE.md. Now referenced by Keychain service name only.

HIGH-3 Voicemail Webhook Has No Request Validation IN PROGRESS

Risk

Anyone can send fake voicemail data to the webhook endpoint. The endpoint explicitly skips Bearer token auth and performs zero validation that requests originate from Twilio. An attacker could POST fake voicemail data into Brad's Command Center inbox.

Technical Details

The voicemail-webhook.js endpoint does not validate X-Twilio-Signature headers, does not check AccountSid parameters, and does not verify against Twilio's signing certificate.

Fix Recommendation

  • Implement Twilio request signature validation using X-Twilio-Signature header
  • Verify AccountSid in POST body matches known SID
  • Check for expected Twilio-specific fields
HIGH-4 Plaud Token File World-Readable (644) FIXED

Risk

Any process on the Mac Mini could read Plaud OAuth access and refresh tokens from ~/.plaud/tokens-mcp.json.

Fix Applied

Permissions updated: chmod 600 ~/.plaud/tokens-mcp.json and chmod 700 ~/.plaud/.

HIGH-5 Sterling OAuth File World-Readable (644) FIXED

Risk

Any process on the Mac Mini could read the Sterling service account OAuth tokens and client secret. The file contained access token, refresh token, client ID, and client secret. Other credential files (brad@, bradstevens44@, deb@) were properly set to 600.

Fix Applied

Permissions updated: chmod 600 on sterling@outsourceaccess.com.json.

HIGH-6 macOS Automatic Updates Disabled NEEDS BRAD

Risk

Security patches are not applied automatically. For a machine running 24/7 as a server, critical patches could go unapplied for weeks or months.

Fix Recommendation

  • sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticallyInstallMacOSUpdates -bool true
  • At minimum, enable critical-only: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool true
  • Requires sudo ... needs Brad on Mac Mini
HIGH-7 Elgato Camera Hub Listening on All Interfaces PENDING

Risk

Elgato Camera Hub (ports 1834, 1854) is accessible from any device on the network via IPv6 on all interfaces.

Fix Recommendation

  • If not actively needed, quit the Camera process
  • Check Elgato settings for "local only" network option
  • Enabling the macOS firewall (CRIT-4) would mitigate this
HIGH-8 Google OAuth 41 Scopes (Extremely Broad) SCHEDULED

Risk

Sterling's OAuth token for brad@outsourceaccess.com has 41 scopes including: gmail.modify, gmail.send, drive (full read/write/delete), calendar.events, contacts, chat.messages, script.projects, script.deployments, script.external_request, and gmail.settings.basic. If the OAuth token were compromised, an attacker would have full access to Brad's entire Google Workspace.

Fix Recommendation

  • Audit which scopes are actually used vs. granted
  • Create a restricted token with only the scopes Sterling actively needs
  • Implement token rotation on a quarterly schedule
  • script.external_request is particularly dangerous ... allows Apps Script to make arbitrary external HTTP requests from Brad's account
MED-1 SSH authorized_keys Contains "agency-gateway" Key SCHEDULED

Risk

An ed25519 key labeled "agency-gateway" in ~/.ssh/authorized_keys provides SSH access to the Mac Mini. If the corresponding private key is compromised, it enables direct system access.

Fix Recommendation

  • Verify this key is still needed and who/what holds the private key
  • Confirm with Anthropic (if Cyndra/Claude infrastructure key) that it's properly secured
  • Consider adding from="127.0.0.1" IP restriction to the entry
  • Remove if no longer needed
MED-2 WhatsApp Database World-Readable SCHEDULED

Risk

ChatStorage.sqlite (81MB) has 644 permissions. Any process running as bradstevens can read the complete WhatsApp message history.

Fix Recommendation

This is controlled by WhatsApp Desktop's default permissions ... changing them may break the app. Primary mitigation is ensuring no unauthorized processes run on the Mac Mini. FileVault encryption (confirmed ON) protects against physical theft.

MED-3 78+ Credentials Under Single Keychain Account SCHEDULED

Risk

All 78+ Sterling credentials stored under account=cyndra. Single point of failure ... compromise of one Keychain access pattern exposes all credentials.

Fix Recommendation

  • Acceptable tradeoff for operational convenience, but be aware of blast radius
  • Consider separating high-value credentials (Stripe, bank-related) into a separate Keychain
  • Enable Keychain auto-lock after timeout
MED-4 Stripe Live Keys Accessible SCHEDULED

Risk

Stripe live secret key (sk_live_...) in Keychain can process real charges, manage subscriptions, and access customer payment data. Blast radius of a compromised key is financial.

Fix Recommendation

  • Create restricted Stripe keys with minimum required permissions per Worker
  • Create separate restricted keys per Worker (not shared master key)
  • Stripe webhook signature verification is already in place (good)
MED-5 Facebook Session Health File World-Readable SCHEDULED

Risk

.fb-session-health.json is readable by any process. While it likely contains session state metadata rather than cookies/tokens, it should still be restricted.

Fix Recommendation

chmod 600 /workspace/group/.fb-session-health.json

MED-6 ~748 Browser Agent Scripts in Automation Directory SCHEDULED

Risk

~748 files in ~/.cyndra/browser-agent/ including login scripts, admin scripts, and export scripts. These automate sensitive operations. If compromised, an attacker would have a playbook for accessing multiple services.

Fix Recommendation

  • chmod 700 ~/.cyndra/browser-agent/
  • Periodically clean up old/unused scripts
  • Ensure no credentials are hardcoded in any scripts
MED-7 Docker Socket Accessible SCHEDULED

Risk

Docker socket at /var/run/docker.sock is accessible. Any compromised process running as Brad could spin up a privileged container with host filesystem access.

Fix Recommendation

Inherent Docker Desktop risk. Mitigation: do not install untrusted npm packages or run untrusted code on the Mac Mini.

MED-8 Forum Update Builder Token Pattern IN PROGRESS

Risk

The Forum Update Builder frontend references a TOKEN variable for API authentication. Makes 5 API calls using Bearer ${TOKEN}. If the token is hardcoded in the HTML (like CRIT-5), same vulnerability applies.

Fix Recommendation

Audit source to confirm TOKEN is not hardcoded. If hardcoded, apply the same fix as CRIT-5.

LOW-1 80+ Cloudflare Pages Projects (Large Attack Surface) SCHEDULED

Risk

Each deployed Pages project is a publicly accessible website. Many appear to be prototypes, one-off tools, or deprecated sites. Each one is a potential entry point if it has vulnerabilities.

Fix Recommendation

Audit the full list and delete/pause projects that are no longer needed. Candidates for review include: sterling-ayrshare-approval, sterling-memory-review, cyndra-oa-exchange, sterling-email-rules-review, sterling-agent-comparison, iphone-web-app-guide, rok-va-roi-microsite, rok-software-proposal, dave-hashim-call-prep, fivetraks-call-prep, sterling-audit.

LOW-2 Cloudways SSH IP Whitelist Needs Periodic Verification SCHEDULED

Risk

Whitelisted IP matches current public IP, but if the ISP assigns a new IP (DHCP lease renewal), SSH access would need updating.

Fix Recommendation

Periodically verify the whitelist matches the current IP, especially after internet outages.

LOW-3 Container Runs as UID 501 (Brad's User) ACKNOWLEDGED

Risk

Cyndra container runs as UID 501 (maps to bradstevens on the host) with workspace mounted read-write, giving same file permissions as Brad's user account.

Fix Recommendation

By design for file access. Noted as a trust boundary.

LOW-4 Two .env Files in Gemini Agents Directory ACKNOWLEDGED

Risk

Two .env files in Gemini agents directories. Currently contain only non-secret config (project ID, region). Not a current risk but .env files should be monitored for scope creep.

Fix Recommendation

Monitor for any secrets being added. Consider moving config to non-.env formats.

LOW-5 GoDaddy API Full Domain Portfolio Access ACKNOWLEDGED

Risk

GoDaddy API key can list all domains, modify DNS, update nameservers, unlock domains for transfer, and retrieve auth codes. High-value target if compromised.

Fix Recommendation

  • Key is stored only in Keychain (confirmed)
  • Ensure GoDaddy 2FA is enabled for the account
ItemStatusNotes
FileVault disk encryptionFull disk encryption protects against physical theft
macOS SIP (System Integrity Protection)Prevents system file modification
Browser Agent CDP port (9333)Correctly bound to 127.0.0.1 only, not accessible from network
OAuth token files (brad@, bradstevens44@, deb@)600 permissions ... owner-only read/write
Keychain storage patternAll API keys stored in macOS Keychain, not plaintext files
Cyndra container privilegesRuns in unprivileged mode with bridge networking
Cloudflare Workers secretsStripe, Resend, Gemini, Twilio keys stored as secret_text bindings
Cloudways SSH access"Block all except whitelist" mode, current IP matches
Docker networking (Cyndra)No exposed port bindings on the Cyndra container
Localhost services bindingNode (7777), Python (8000-8002), Wrangler (8787, 20241-2), WebSocket (8765, 9876) all on 127.0.0.1
Worker API authenticationCommand Center API endpoints validate Bearer token against env.BRAIN_DUMP_TOKEN
Google OAuth token file formatContains client_secret ... standard for Google OAuth2 credential files
R2 bucket accessNot publicly browsable. Returns 404 on root; objects require direct URL
Email forwarder WorkerSimple forward only (gravelandglory.com to brad@outsourceaccess.com), no auth needed
Stripe webhook verificationWorkers use STRIPE_WEBHOOK_SECRET for signature verification

Completed Fixes

CRIT-1: Docker container rebound to localhost (127.0.0.1:8501)
oa-recruit-agent no longer exposed on all interfaces
CRIT-2: JWT secrets rotated, stored as secret_text, unique per Worker
dugoutready-api + lineup-tool-api redeployed, old JWTs invalidated
CRIT-3: CORS restricted to specific allowed domains
Wildcard (*) removed from dugoutready-api + lineup-tool-api
HIGH-1: Cloudways API key removed from CLAUDE.md
Now referenced by Keychain service name only
HIGH-2: Twilio Account SID removed from CLAUDE.md
Now referenced by Keychain service name only
HIGH-4: Plaud token file permissions fixed
chmod 600 on tokens-mcp.json, chmod 700 on ~/.plaud/
HIGH-5: Sterling OAuth file permissions fixed
chmod 600 on sterling@outsourceaccess.com.json

Needs Brad (Requires sudo)

🔒
CRIT-4: Enable macOS firewall
Requires sudo access on the Mac Mini
🔒
HIGH-6: Enable macOS automatic security updates
Requires sudo access on the Mac Mini

🔨 In Progress

🛠
CRIT-5: Command Center auth rebuild
Replacing hardcoded frontend token with server-side auth flow
🛠
HIGH-3: Twilio webhook signature validation
Implementing X-Twilio-Signature verification
🛠
MED-8: Forum Update Builder token audit
Verifying whether TOKEN is hardcoded in frontend

📋 Scheduled

📅
All MEDIUM items (MED-1 through MED-7)
SSH key audit, WhatsApp DB, Keychain segmentation, Stripe restricted keys, FB session file, browser agent cleanup, Docker socket
📅
All LOW items (LOW-1 through LOW-5)
CF Pages audit, Cloudways IP whitelist, container UID, .env monitoring, GoDaddy 2FA
📅
HIGH-7 + HIGH-8
Elgato Camera Hub binding + Google OAuth scope audit

Immediate (Today)

#ActionDetailsEst. Time
1Enable macOS firewallsudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on1 min
2Rebind oa-recruit-agent to localhostRecreate container with -p 127.0.0.1:8501:80805 min
3Fix Plaud token permissionschmod 600 ~/.plaud/tokens-mcp.json && chmod 700 ~/.plaud/1 min
4Fix sterling@ OAuth permissionschmod 600 on sterling@outsourceaccess.com.json1 min

This Week

#ActionDetailsEst. Time
5Rotate JWT secrets, store as secret_textGenerate 2 unique secrets via openssl rand -hex 32, store via wrangler secret put15 min
6Fix CORS on production APIsUpdate CORS_ORIGIN from * to specific domains on both Workers10 min
7Remove hardcoded API token from Command CenterImplement server-side auth endpoint, remove inline token from HTML30 min
8Add Twilio signature validationImplement X-Twilio-Signature verification on voicemail webhook20 min
9Remove credentials from CLAUDE.mdReplace inline keys/SIDs with Keychain reference names only5 min
10Enable macOS auto security updatessudo defaults write .../CriticalUpdateInstall -bool true1 min

This Month

#ActionDetailsEst. Time
11Audit Google OAuth scopesDetermine minimum required scopes, create restricted token1 hr
12Verify SSH "agency-gateway" keyConfirm origin and necessity, add IP restriction or remove10 min
13Create restricted Stripe API keysGenerate restricted keys with minimum permissions per Worker20 min
14Audit and prune CF Pages projectsReview ~80 projects, delete unused ones1 hr
15Audit Forum Update BuilderCheck for hardcoded token, fix if found15 min

Credential Inventory

API Keys (third-party)25+
OAuth Tokens (Google, LinkedIn, etc.)8+
Passwords (WP, Metricool, etc.)12+
Client Secrets (OAuth apps)6+
Service-specific Tokens10+
Bot Tokens (Telegram)1
SSH Keypairs2
Total Keychain Entries78

Cloud Resources

Cloudflare Pages Projects80+
Cloudflare Workers8
D1 Databases9
KV Namespaces11
R2 Buckets1
DNS Zones5
Docker Containers2

Network Exposure

PortServiceBindingRisk Level
8501oa-recruit-agent0.0.0.0 (all interfaces)CRITICAL
1834, 1854Elgato Camera Hub0.0.0.0 (all interfaces)HIGH
9333Chrome CDP127.0.0.1OK
7777Node.js127.0.0.1OK
8000-8002Python127.0.0.1OK
8787Wrangler dev127.0.0.1OK
5432PostgreSQL (Docker)127.0.0.1OK

CLAUDE.md Instruction Injection Risk

MEDIUM RISK

CLAUDE.md is the primary instruction file for Sterling. It has permissions -rw-r--r-- (644), meaning any process on the Mac Mini running as bradstevens can modify it. The container mounts the workspace directory read-write, so container processes can also modify CLAUDE.md.

Attack Vectors

  • Inject instructions to exfiltrate data
  • Modify protocols to bypass confirmation requirements
  • Add malicious tool commands
  • Redirect emails or messages to attacker-controlled destinations

Mitigations in Place

  • FileVault encryption prevents offline modification
  • macOS SIP protects system files (CLAUDE.md is a user file, so limited coverage)
  • File is 133KB ... significant additions would be noticeable in a diff

Recommendations

  • Consider making CLAUDE.md read-only except during deliberate updates: chmod 444 CLAUDE.md with a script to temporarily unlock for edits
  • Implement a hash-check at session start to detect unauthorized modifications
  • Git-track CLAUDE.md to maintain a tamper-evident audit trail

Email Security Assessment

MEDIUM RISK

Sterling has explicit protocols against sending emails without Brad's confirmation (CLAUDE.md "ZERO-TOLERANCE CONFIRMATION RULE") and uses the Jenna Rosario persona with a specific signature. However, the protection is entirely at the AI instruction level, not at the API level.

Gap Analysis

There is no technical control preventing email sends. If CLAUDE.md were modified (see Instruction Injection above), or if a different agent/process used the same OAuth tokens, emails could be sent without any gate. The entire email safety system relies on instruction-level enforcement.

Recommendations

  • Implement a server-side email approval queue (send to staging, Brad approves, then actually sends)
  • Set up Gmail "Undo Send" with maximum delay (30 seconds)
  • Create Gmail filters to flag/alert on any automated sends
  • Consider a rate limiter on the OAuth token for Gmail send operations