Aamer Akhter
f0f43ddbad
Require the hook-event secret unconditionally, not only under a managed tunnel
...
COD-54 gated the /api/hook-event + /api/status-telemetry localhost bypass
behind the shared X-Codeman-Hook-Secret only WHILE a managed tunnel was
running, keeping a plain localhost bypass otherwise. But Codeman can't detect
a user's OWN loopback reverse proxy (their own `cloudflared --url`,
`tailscale serve`, nginx -> 127.0.0.1), which proxies internet traffic into
the loopback origin with req.ip === 127.0.0.1 — so that setup kept the unsafe
plain bypass.
Require the secret on the loopback bypass unconditionally. Managed-session
hooks already always present it (X-Codeman-Hook-Secret from
$CODEMAN_HOOK_SECRET_FILE, generated for every instance), so the legitimate
hook channel is unaffected; only the previously-unguarded own-proxy path is
now rejected. Drops the now-unused getTunnelRunning param from
registerAuthMiddleware.
Tests: cod54-hook-event-auth (tunnel-down now also requires the secret, plus
a good-secret positive case); auth-security (hook tests present the secret to
reach schema validation).
2026-06-14 12:46:58 -04:00
..
2026-06-08 15:41:46 +02:00
2026-06-10 20:41:34 +02:00
2026-06-10 20:41:34 +02:00
2026-06-14 08:49:36 +02:00
2026-06-10 01:38:40 +02:00
2026-02-26 16:44:34 +01:00
2026-01-27 23:15:25 +01:00
2026-06-09 20:02:15 +02:00
2026-06-11 10:27:09 +02:00
2026-06-14 12:46:58 -04:00
2026-02-12 13:44:07 +01:00
2026-03-07 07:33:44 +01:00
2026-02-26 16:44:34 +01:00
2026-03-01 16:50:23 +01:00
2026-06-08 11:01:34 -04:00
2026-06-14 12:46:58 -04:00
2026-06-11 10:16:47 +02:00
2026-06-10 22:47:02 +02:00
2026-03-01 16:50:23 +01:00
2026-06-08 09:56:06 -04:00
2026-06-14 08:43:57 +02:00
2026-06-14 08:43:57 +02:00
2026-06-12 09:09:14 -04:00
2026-06-12 09:09:14 -04:00
2026-06-10 01:30:43 +02:00
2026-06-07 04:33:11 +02:00
2026-06-10 01:30:43 +02:00
2026-06-09 20:02:15 +02:00
2026-06-08 09:56:06 -04:00
2026-06-10 01:30:43 +02:00
2026-06-10 03:41:04 +02:00
2026-06-12 09:09:14 -04:00
2026-05-12 09:57:08 +02:00
2026-06-10 01:30:43 +02:00
2026-06-10 18:06:45 +02:00
2026-03-07 07:33:44 +01:00
2026-02-26 16:44:34 +01:00
2026-02-18 12:51:35 +01:00
2026-06-08 11:01:34 -04:00
2026-06-09 03:19:51 +02:00
2026-02-12 13:44:07 +01:00
2026-02-26 15:58:26 +01:00
2026-06-10 01:30:43 +02:00
2026-03-21 19:23:37 +01:00
2026-03-21 07:20:18 +01:00
2026-06-08 10:27:18 -04:00
2026-02-26 16:44:34 +01:00
2026-02-12 18:26:16 +01:00
2026-06-09 20:02:17 +02:00
2026-06-08 18:01:20 +02:00
2026-06-10 01:30:43 +02:00
2026-06-10 01:30:43 +02:00
2026-01-21 22:36:45 +01:00
2026-06-10 01:30:43 +02:00
2026-02-19 14:00:10 +01:00
2026-01-21 14:01:47 +01:00
2026-06-10 18:06:45 +02:00
2026-03-01 16:50:23 +01:00
2026-06-08 15:46:10 +02:00
2026-03-07 07:33:44 +01:00
2026-02-26 16:44:34 +01:00
2026-06-10 20:41:34 +02:00
2026-03-07 07:33:44 +01:00
2026-03-07 07:33:44 +01:00
2026-03-07 07:33:44 +01:00
2026-01-25 07:52:40 +01:00
2026-03-01 14:33:18 +01:00
2026-02-26 16:44:34 +01:00
2026-06-10 16:16:20 +02:00
2026-06-10 03:41:04 +02:00
2026-02-18 18:14:13 +01:00
2026-06-09 20:02:15 +02:00
2026-06-10 17:08:36 +02:00
2026-06-14 07:33:52 +02:00
2026-06-14 09:30:01 +02:00
2026-06-10 20:41:34 +02:00
2026-06-10 01:30:43 +02:00
2026-06-10 04:07:26 +02:00
2026-06-10 20:50:24 +02:00
2026-02-26 16:44:34 +01:00
2026-06-10 01:30:43 +02:00
2026-06-10 16:23:57 +02:00
2026-06-10 01:30:43 +02:00
2026-06-09 20:02:15 +02:00
2026-06-10 01:30:43 +02:00
2026-03-07 07:33:44 +01:00
2026-02-28 14:45:39 +01:00
2026-01-22 11:30:10 +01:00
2026-05-12 10:11:47 +02:00
2026-03-12 16:08:39 +01:00
2026-02-28 17:39:44 +01:00
2026-02-28 17:39:44 +01:00
2026-01-21 07:19:49 +01:00
2026-02-26 16:44:34 +01:00
2026-06-10 18:06:45 +02:00
2026-06-10 13:34:45 -04:00
2026-06-09 15:39:03 -04:00
2026-02-26 16:44:34 +01:00
2026-06-09 15:39:03 -04:00
2026-06-10 19:56:30 -04:00
2026-02-26 16:44:34 +01:00
2026-05-25 23:28:58 +02:00
2026-01-25 21:29:35 +01:00
2026-06-10 01:30:43 +02:00
2026-06-10 20:41:34 +02:00
2026-06-14 07:33:52 +02:00
2026-01-22 11:30:10 +01:00
2026-05-19 11:43:36 +02:00