ops: unlock cortex-production SSH via GHA - #229
Conversation
Greptile SummaryThis workflow adds fixed production and staging SSH targets. On the production UFW path, it disables the host firewall after allowing SSH, so the change should not merge until UFW remains enabled and SSH access is narrowed to the required rule. Confidence Score: 3/5Not safe to merge until the production workflow stops disabling the host firewall. The executed check confirmed that the production SSH path disables UFW after adding SSH rules, leaving other listening services without host-level ingress filtering. Files Needing Attention: .github/workflows/ops-box-ssh-access.yml
|
| ufw --force enable || true | ||
| ufw reload || true | ||
| ufw allow from any to any port 22 proto tcp || true | ||
| ufw --force disable || true |
There was a problem hiding this comment.
The production target enters the ufw branch, adds SSH allow rules, and then unconditionally disables UFW for the entire host. This removes host-level ingress filtering for every listening service, not just SSH, so services reachable through the cloud perimeter can be exposed without the host firewall protection.
Keep UFW enabled and use a narrowly scoped SSH rule instead. Remove the global disable command.
How this was verified: A controlled execution of the checked-in UFW branch showed SSH rules are added and UFW is then changed from enabled to disabled.
Artifacts
- Authored executable validation source mocks UFW and iptables, checks the exact workflow markers, and asserts that the UFW branch disables UFW after SSH rules, proving the command path safely.
- Executed pre-command capture records cortex-production's UFW-mode state as enabled without using credentials, network access, or live firewall commands, establishing the comparison baseline.
- Executed simulation trace records both SSH allow commands followed by `ufw --force disable` and ends with simulated UFW disabled, confirming the global disable occurs unconditionally.
Hardcode cortex-production IP; disable host ufw that still drops :22. PROD_HOST secret still points at legacy base-prod.