Untracked from git and added to .gitignore. The file stays on disk at public_html/admin/downloads/ (served behind admin auth) and in the jarvis-private + VM110 copies — it is no longer pushed to GitHub going forward.
NOTE: prior revisions remain in GitHub history; a git filter-repo purge + force-push is still pending user sign-off, as are rotations of the secrets that were in it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- login.php: Redis-backed per-IP rate limit (10 fails / 15 min lockout), keyed off CF-Connecting-IP/X-Forwarded-For so it sees the real client behind NPM; fails open if Redis is down
- login.php: session_regenerate_id(true) on successful auth (prevents session fixation)
- php.ini: session.use_strict_mode = 1 (reject unknown/attacker-supplied session IDs)
- netscan.php: constant-time hash_equals for the registration-key check (matches agent.php)
Cookie flags already HttpOnly + SameSite=Lax (verified live). Agent auth verified: missing/bad X-Agent-Key -> 401 on every machine action.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removed live secret literals from git-tracked code (all were on GitHub):
- deploy/reactor.py: Claude/Groq API keys, DB pass, Gmail/iCloud app passwords now from os.environ (loaded via systemd EnvironmentFile=/etc/jarvis-arc/reactor.env, root:www-data 0640)
- public_html/login.php: used a private hardcoded PDO connection; now uses config.php DB_* constants
- deploy/jarvis-backup.sh (runs via cron), jarvis-deploy.sh, jarvis-watchdog.sh: DB pass now sourced from /etc/jarvis/db.env (root:root 0600)
- removed dead agent/jarvis-arc-reactor.py (unreferenced old duplicate leaking an old Groq key + stale Ollama IP)
- added deploy/reactor.env.example and deploy/db.env.example templates
Verified live: reactor restarted with all 21 handlers + DB poller (job round-trip OK), login works, mysqldump auth via env OK.
NOTE: these keys remain in GitHub history and should be rotated (Claude/Groq/Gmail/iCloud/DB). Separate decision needed on INFRASTRUCTURE-REFERENCE.md (full cred doc still tracked) + history purge.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- install.sh, install-agent.sh: require JARVIS_REG_KEY env var or interactive prompt instead of baked-in key (matches install-mac.sh/install-windows.ps1 behavior)
- netscan.php: reuse AGENT_REGISTRATION_KEY constant instead of a duplicate literal
- agent.php + api.php: add session-authed "regkey" action so the admin install modal fetches the current key at runtime
- jarvis-agents.js: fetch reg key via /api/agent/regkey instead of hardcoding it; pass JARVIS_REG_KEY in the Linux install one-liner
- INFRASTRUCTURE-REFERENCE.md: scrub old key literal (rotated; real value lives only in api/config.php on VM211)
Key rotated on the box + rolled out to all 11 agents (verified all re-register online). New value is in the gitignored api/config.php only.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>