Skip to content

Make the allowlisted DB host SSRF test independent of DNS - #1547

Merged
helpcodeai merged 1 commit into
mainfrom
fix/ssrf-spec-no-dns
Nov 6, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/ssrf-spec-no-dns

Conversation

@helpcodeai

@helpcodeai helpcodeai commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The test "allows a blocked host when explicitly allowlisted" in database.engine.ssrf.spec.ts connected to db.internal:5432. That really resolves a hostname, so on some runners it waited for DNS and hit the 5 s Jest timeout. It made main CI red once on 2c87b7e (#1542) and passed on every later run.

The test now allowlists 127.0.0.1 and connects to port 1. Loopback is blocked by default, so the test still proves the allowlist lets a blocked host through. Port 1 is closed, so the driver fails at once with ECONNREFUSED: no DNS and no connect timeout.

Changes

  • database.engine.ssrf.spec.ts: allowlisted host db.internal replaced by 127.0.0.1:1.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

cd packages/backend && npx jest src/connectors/engines/database.engine.ssrf.spec.ts --maxWorkers=2: 8 passed, 3.2 s.

Test-only change. No behaviour change in Cloud or self-hosted.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test): only this spec was run locally; the full suite runs in CI
  • This PR has a descriptive title

Related Issues

Flaky main run on 2c87b7e (#1542).

@helpcodeai
helpcodeai enabled auto-merge (squash) November 6, 2026 08:12
@helpcodeai
helpcodeai merged commit 3dc2604 into main Nov 6, 2026
17 checks passed
@helpcodeai
helpcodeai deleted the fix/ssrf-spec-no-dns branch November 6, 2026 08:29
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant