Commit Graph

5 Commits

Author SHA1 Message Date
Baptiste Arnaud
23818bb0e5
🐛 Fix SSRF redirect bypass in HTTP Request and Code blocks (#2432)
## Summary

- **Fix SSRF via open redirect bypass** (GHSA-jxv3-m939-w95c): HTTP
Request block now uses `safeKy` instead of `ky`, and Code block's
sandboxed `fetch` now follows redirects manually with `redirect:
"manual"` + re-validation of each `Location` hop via
`validateHttpReqUrl`.
- **Improved safeKy tests**: redirect bypass tests now run end-to-end
through `safeKy` (not just indirect Location header checks), including
chained redirect scenarios.
- **Skip Vercel preview builds**: `nx-ignore` now exits early with code
0 when `VERCEL_ENV=preview`.

## Test plan

- [x] `bunx nx test @typebot.io/lib` — 76 tests pass (0 fail, 6 skip)
- [x] `NODE_ENV=development bun test packages/lib/src/safeKy.test.ts` —
8 tests pass (redirect bypass verified end-to-end)
- [x] `bunx nx typecheck @typebot.io/bot-engine` — passes
- [x] `bunx nx typecheck @typebot.io/variables` — passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 16:41:25 +02:00
Baptiste Arnaud
27aad0931d
🔧 Add custom nx-ignore command 2026-03-19 11:27:30 +01:00
Baptiste Arnaud
c2b251c7e5
♻️ Migrate to NX (#2418) 2026-03-18 15:29:32 +00:00
Baptiste Arnaud
87bc6602e5
🔧 Setup codex local env setup script 2026-02-11 11:15:25 +01:00
Baptiste Arnaud
e8e8381932
🔧 Clean up agent skills and worktree commands 2026-01-28 15:53:21 +01:00