mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-28 22:06:31 +00:00
make swarm-zombie runs act with ACT_BIND=true (Makefile:898), and workflow.sh also binds when roles/web-app-cst-* exist. A bound job works in the host checkout, so the deploy step's make setup -> make dotenv rewrote the host .env: INFINITO_DEPLOY_MODE=swarm, the swarm distro, INFINITO_SWARM_STEP_TIMEOUT_MINUTES=690 and NIX_CONFIG. call-test-deploy.yml puts the act GITHUB_TOKEN into NIX_CONFIG, and nix_config.py copied its access-tokens line into .env, so the token sat in plaintext in the host worktree and the next local gate failed test_distros and test_build. Two layers: - workflow.sh passes INFINITO_DOTENV_HOST_OWNED=true whenever it binds, so the job keeps the host .env (the guard compose.yml already uses). - nix_config.py writes the access-tokens line only on a real GitHub runner (detect_gha_act: GITHUB_ACTIONS without ACT), never under act or on a developer machine. Not covered: .env files that already hold a token need make dotenv-force and the token revoked; self-hosted GitHub runners still write the short-lived job token; INFINITO_API_*_KEY values still pass through. Tests: test_nix_config.py (3, new) and test_workflow.py (3 new of 11); negative control: with the fix lines reverted, 2 of 3 fail in each file. Both files pass (3 and 11). ruff and shellcheck clean. MEDUSA 100 %: three files under env paths scanned under renamed paths, because the scanner's excludes skip any path containing env. Reported by Stage 2.0. 🎯 Fix: 90 % 💥 Break: 5 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 86 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>