Skip to content

fix: allow header-based routing when Host is an IP address#2581

Merged
tomassrnka merged 1 commit intomainfrom
fix/proxy-header-routing-ip-hosts
May 6, 2026
Merged

fix: allow header-based routing when Host is an IP address#2581
tomassrnka merged 1 commit intomainfrom
fix/proxy-header-routing-ip-hosts

Conversation

@tomassrnka
Copy link
Copy Markdown
Member

Summary

Fixes a regression from #2540 that broke SDK connectivity for any IP-based access to the client-proxy (bridge networks, LAN, on-prem deployments, e2b-local).

  • isLocalRequestHost() only accepted localhost and loopback IPs (127.0.0.1, ::1)
  • When the SDK connects via an IP like 192.168.100.66:3002, routing headers (E2b-Sandbox-Id, E2b-Sandbox-Port) were silently ignored
  • parseHost() then tried to extract a sandbox ID from the IP address and failed with ErrInvalidHost → HTTP 400

The fix: widen isLocalRequestHost() from ip.IsLoopback() to ip != nil.

This is safe because the shouldParseHeaders guard exists to prevent header spoofing on per-sandbox hostnames like 49983-sbx.e2b.app, where the hostname is authoritative. An IP address can never contain sandbox routing info — parseHost() will always fail on it — so there is nothing for headers to conflict with. Headers are the only routing mechanism that can work for IP hosts.

The per-sandbox hostname guard is unaffected: headers are still ignored when r.Host is a domain like 49983-sbx.e2b.app.

How it was found

e2b-local nightly build on 2026-05-05 failed the sandbox smoke test. The build itself succeeded, but sandbox.commands.run() returned HTTP 400 because the client-proxy rejected the bridge network host 192.168.100.66:3002:

WARN  invalid host  {"host": "192.168.100.66:3002"}  handler.go:30

The previous night's build (using commit 92ea305dd, before #2540) passed. Today's build (using ae68b805a, after #2540) failed.

Test plan

  • All existing TestGetTargetFromRequest tests pass
  • Added test cases for private IPv4, 10.x network, and public IPv4 hosts
  • Verify e2b-local nightly build passes with this fix

🤖 Generated with Claude Code

#2540 introduced shouldParseHeaders() to guard against header spoofing
on per-sandbox hostnames (e.g. 49983-sbx.e2b.app), where the sandbox ID
is encoded in the hostname and headers should not override it.

However, isLocalRequestHost() only accepted localhost and loopback IPs,
which means any IP-based access (bridge networks, LAN, on-prem) was
rejected — the proxy ignored routing headers and fell through to
parseHost(), which cannot extract a sandbox ID from an IP address.

An IP address can never contain sandbox routing info in its hostname,
so there is nothing for headers to conflict with. parseHost() will
always fail on an IP host regardless. Headers are the only routing
mechanism that can work.

Widen the check from ip.IsLoopback() to ip != nil so header-based
routing works for all IP hosts. The per-sandbox hostname guard is
unaffected — headers are still ignored for hosts like
49983-sbx.e2b.app where the hostname is authoritative.

Discovered via e2b-local nightly build failure: the SDK connects to the
client-proxy via a bridge network IP (192.168.100.66:3002) and was
getting HTTP 400 "invalid host" on every sandbox command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@cursor
Copy link
Copy Markdown

cursor Bot commented May 6, 2026

PR Summary

Medium Risk
Expands the set of requests eligible for header-based routing to any IP host, which could enable header spoofing if the proxy is reachable via raw IP from untrusted networks. Behavior is otherwise narrowly scoped and covered by added tests.

Overview
Updates isLocalRequestHost() so header-based sandbox routing (E2b-Sandbox-Id/E2b-Sandbox-Port) is allowed whenever Host parses as an IP address (not just loopback), preventing IP-host requests from falling back to parseHost() and returning ErrInvalidHost. Extends TestGetTargetFromRequest with new cases covering private and public IPv4 hosts to ensure routing headers are honored for IP-based access.

Reviewed by Cursor Bugbot for commit a4e825d. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has reached its monthly code review spending cap.

An organization admin can view or raise the cap at claude.ai/admin-settings/claude-code. The cap resets at the start of the next billing period.

Once the cap resets or is raised, push a new commit or reopen this pull request to trigger a review.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

❌ 10 Tests Failed:

Tests completed Failed Passed Skipped
2579 10 2569 7
View the top 2 failed test(s) by shortest run time
github.com/e2b-dev/infra/packages/docker-reverse-proxy/internal/auth::TestValidate
Stack Traces | 0s run time
=== RUN   TestValidate
=== PAUSE TestValidate
=== CONT  TestValidate
--- FAIL: TestValidate (0.00s)
github.com/e2b-dev/infra/packages/docker-reverse-proxy/internal/auth::TestValidate/completed_build_status
Stack Traces | 15.1s run time
=== RUN   TestValidate/completed_build_status
=== PAUSE TestValidate/completed_build_status
=== CONT  TestValidate/completed_build_status
2026/05/06 14:37:54 OK   20000101000000_auth.sql (4.12ms)
2026/05/06 14:37:54 OK   20000101000001_rls_for_migration_table.sql (899.71µs)
2026/05/06 14:37:54 OK   20231124185944_create_schemas_and_tables.sql (18.79ms)
2026/05/06 14:37:54 OK   20231220094836_create_triggers_and_policies.sql (3.47ms)
2026/05/06 14:37:54 OK   20231222181015_add_env_resources.sql (1.1ms)
2026/05/06 14:37:54 OK   20240103104619_add_team_email.sql (1.55ms)
2026/05/06 14:37:54 OK   20240106121919_add_team_ban_fields.sql (1.12ms)
2026/05/06 14:37:54 OK   20240202120312_add_kernel_version.sql (1.16ms)
2026/05/06 14:37:54 OK   20240219190940_add_max_length_hours.sql (942.29µs)
2026/05/06 14:37:54 OK   20240221023613_add_firecracker_version.sql (937.67µs)
2026/05/06 14:37:54 OK   20240221215408_update_firecracker_version.sql (1.06ms)
2026/05/06 14:37:54 OK   20240305221944_remove_tier_resources.sql (1.59ms)
2026/05/06 14:37:54 OK   20240315165236_create_env_builds.sql (6.62ms)
2026/05/06 14:37:54 OK   20240605070918_refactor_triggers_and_policies.sql (4.32ms)
2026/05/06 14:37:54 OK   20240625095352_add_envd_version.sql (993.19µs)
2026/05/06 14:37:54 OK   20240728094137_add_default_team_flag.sql (2.04ms)
2026/05/06 14:37:54 OK   20240909142106_drop_team_policies.sql (1.01ms)
2026/05/06 14:37:54 OK   20241120222814_add_team_api_key_metadata.sql (3.03ms)
2026/05/06 14:37:54 OK   20241121225404_add_team_api_key_id.sql (4.67ms)
2026/05/06 14:37:54 OK   20241127174604_add_env_creator.sql (1.55ms)
2026/05/06 14:37:54 OK   20241206124325_add_user_team_adder.sql (1.54ms)
2026/05/06 14:37:54 OK   20241213142106_create_snapshots.sql (2.19ms)
2026/05/06 14:37:54 OK   20250106142106_remove_team_is_default.sql (1.09ms)
2026/05/06 14:37:54 OK   20250206105106_add_snapshot_constraints.sql (3.09ms)
2026/05/06 14:37:54 OK   20250211160814_add_token_hashes.sql (5.34ms)
2026/05/06 14:37:54 OK   20250306105106_add_indexes.sql (4.29ms)
2026/05/06 14:37:54 OK   20250404151700_add_snapshots_sbx_started_at.sql (4.44ms)
2026/05/06 14:37:54 OK   20250409113306_add_envd_secured_to_snapshot.sql (968.16µs)
2026/05/06 14:37:54 OK   20250506112836_builds_status_index.sql (1.21ms)
2026/05/06 14:37:54 OK   20250507134356_add_max_specs_to_tier.sql (1.5ms)
2026/05/06 14:37:54 OK   20250513111201_tier_fix_max_memory.sql (1.07ms)
2026/05/06 14:37:54 OK   20250522105042_users_teams_add_created_at.sql (883.82µs)
2026/05/06 14:37:54 OK   20250528203546_ready_command.sql (626.35µs)
2026/05/06 14:37:54 OK   20250606204750_optimize_hashed_key_schema.sql (1.52ms)
2026/05/06 14:37:54 OK   20250606213446_deployment_cluster.sql (3.5ms)
2026/05/06 14:37:54 OK   20250624001047_deploy_cluster_policy.sql (629.95µs)
2026/05/06 14:37:54 OK   20250624001048_cluster_for_templates.sql (1.71ms)
2026/05/06 14:37:54 OK   20250624001049_cluster_for_builds.sql (666.95µs)
2026/05/06 14:37:54 OK   20250624232413_add_build_reason.sql (651.5µs)
2026/05/06 14:37:54 OK   20250708135400_snapshots_migrations.sql (1.13ms)
2026/05/06 14:37:54 OK   20250708135401_snapshot_pause_node_id.sql (627.9µs)
2026/05/06 14:37:54 OK   20250714132924_cluster_sandbox_domain.sql (606.19µs)
2026/05/06 14:37:54 OK   20250728085406_add_create_network_flag.sql (618.65µs)
2026/05/06 14:37:54 OK   20250802144312_update_firecracker_to_v1_12_1.sql (781.17µs)
2026/05/06 14:37:54 OK   20250815181502_change_build_reason_to_json.sql (4.01ms)
2026/05/06 14:37:54 OK   20250818114512_auto_pause.sql (919.59µs)
2026/05/06 14:37:54 OK   20250820102103_add_snapshots_indexes.sql (3.22ms)
2026/05/06 14:37:54 OK   20250824185633_build_node_not_nullable.sql (859.3µs)
2026/05/06 14:37:54 OK   20250824185634_snapshot_node_not_nullable.sql (830.03µs)
2026/05/06 14:37:54 OK   20250825100000_remove_default_keys.sql (686.32µs)
2026/05/06 14:37:54 OK   20250825102440_add_hash_indexes.sql (2.4ms)
2026/05/06 14:37:54 OK   20250825102800_hash_existing_keys.sql (3.82ms)
2026/05/06 14:37:54 OK   20250825102900_drop_mask_columns.sql (1.18ms)
2026/05/06 14:37:54 OK   20250901161352_add_concurrent_template_builds_to_tier.sql (1.09ms)
2026/05/06 14:37:54 OK   20250905134524_fix_env_builds_non_null_fields.sql (922.37µs)
2026/05/06 14:37:54 OK   20250910063940_make_raw_keys_nullable.sql (1.83ms)
2026/05/06 14:37:54 OK   20250910072612_access_tokens_id_non_nullable.sql (656.58µs)
2026/05/06 14:37:54 OK   20250910124212_remove_raw_keys.sql (1.86ms)
2026/05/06 14:37:54 OK   20250923094021_add_team_id_to_snapshots.sql (2.12ms)
2026/05/06 14:37:54 OK   20250923103546_add_snapshot_list_index.sql (1.86ms)
2026/05/06 14:37:54 OK   20250923103614_make_team_id_non_nullable.sql (866.99µs)
2026/05/06 14:37:54 OK   20251009170758_unique_snapshots.sql (1.03ms)
2026/05/06 14:37:54 OK   20251011200438_create_addons_table.sql (7.47ms)
2026/05/06 14:37:54 OK   20251018100653_add_build_version.sql (714.2µs)
2026/05/06 14:37:54 OK   20251026192416_addons_idempotency.sql (1.29ms)
2026/05/06 14:37:54 OK   20251030130958_add_env_index_to_snapshots.sql (1.12ms)
2026/05/06 14:37:54 OK   20251106172810_add_config_to_snapshots.sql (631.3µs)
2026/05/06 14:37:54 OK   20251121101953_build_node_id_nullable.sql (616.13µs)
2026/05/06 14:37:54 OK   20251127000000_add_machine_info_to_env_builds.sql (994.4µs)
2026/05/06 14:37:54 OK   20251216135834_index_snapshots_base_env_id.sql (1.12ms)
2026/05/06 14:37:54 OK   20251217000000_create_public_users_table.sql (4.41ms)
2026/05/06 14:37:54 OK   20251218160000_allow_m_n_builds_with_tags.sql (9.34ms)
2026/05/06 14:37:54 OK   20251218170000_optimize_build_assignment_indexes.sql (1.81ms)
2026/05/06 14:37:54 OK   20260121175429_add_team_slug.sql (11.26ms)
2026/05/06 14:37:54 OK   20260121175430_add_env_aliases_namespace.sql (1.71ms)
2026/05/06 14:37:54 OK   20260127120000_add_env_aliases_uuid_pkey.sql (6.58ms)
2026/05/06 14:37:54 OK   20260129105527_populate_env_aliases_namespace.sql (1.56ms)
2026/05/06 14:37:54 OK   20260204172712_remove_build_assignment_triggers.sql (2.91ms)
2026/05/06 14:37:54 OK   20260210120000_add_env_builds_created_at_index.sql (1.35ms)
2026/05/06 14:37:54 OK   20260210120001_add_env_and_build_source_columns.sql (2.46ms)
2026/05/06 14:37:54 OK   20260210120002_add_status_group_column.sql (4.78ms)
2026/05/06 14:37:54 OK   20260211120000_add_snapshot_templates.sql (3.43ms)
2026/05/06 14:37:54 OK   20260216120000_add_envs_team_id_source_index.sql (1.92ms)
2026/05/06 14:37:54 OK   20260218120000_add_team_id_to_env_builds.sql (6.57ms)
2026/05/06 14:37:54 OK   20260225120000_add_env_builds_team_status_group_index.sql (1.18ms)
2026/05/06 14:37:54 OK   20260228120000_snapshot_template_origin_node.sql (774.1µs)
2026/05/06 14:37:54 OK   20260304120000_volumes.sql (3.54ms)
2026/05/06 14:37:54 OK   20260305120000_add_env_builds_team_active_partial_index.sql (1.3ms)
2026/05/06 14:37:54 OK   20260305130000_create_active_template_builds.sql (2.8ms)
2026/05/06 14:37:54 OK   20260309120000_add_team_sandbox_scheduling_labels.sql (1.16ms)
2026/05/06 14:37:54 OK   20260310120000_add_snapshots_metadata_gin_index.sql (25.7ms)
2026/05/06 14:37:54 OK   20260312120000_fix_snapshots_jsonb_null_metadata.sql (2.39ms)
2026/05/06 14:37:54 OK   20260313120000_fix_snapshots_created_at.sql (1.77ms)
2026/05/06 14:37:54 OK   20260314120000_fix_snapshots_metadata_sql_null_trigger.sql (552.31µs)
2026/05/06 14:37:54 OK   20260316120000_users_teams_uuid_pkey.sql (5.42ms)
2026/05/06 14:37:54 OK   20260316130000_repoint_user_fks_to_public_users.sql (15.97ms)
2026/05/06 14:37:54 OK   20260413120000_active_template_builds_fk_envs.sql (2.57ms)
2026/05/06 14:37:54 OK   20260416120000_remove_user_team_provision_triggers.sql (7.34ms)
2026/05/06 14:37:54 OK   20260423170000_cluster_auth_org_id.sql (1.49ms)
2026/05/06 14:37:54 goose: successfully migrated database to version: 20260423170000
2026/05/06 14:37:54 OK   20000101000000_auth.sql (4.06ms)
2026/05/06 14:37:54 OK   20000101000001_rls_for_migration_table.sql (2.06ms)
2026/05/06 14:37:54 OK   20231124185944_create_schemas_and_tables.sql (18.41ms)
2026/05/06 14:37:54 OK   20231220094836_create_triggers_and_policies.sql (4.33ms)
2026/05/06 14:37:54 OK   20231222181015_add_env_resources.sql (1.19ms)
2026/05/06 14:37:54 OK   20240103104619_add_team_email.sql (1.46ms)
2026/05/06 14:37:54 OK   20240106121919_add_team_ban_fields.sql (1.16ms)
2026/05/06 14:37:54 OK   20240202120312_add_kernel_version.sql (1.21ms)
2026/05/06 14:37:54 OK   20240219190940_add_max_length_hours.sql (961.31µs)
2026/05/06 14:37:54 OK   20240221023613_add_firecracker_version.sql (931.2µs)
2026/05/06 14:37:54 OK   20240221215408_update_firecracker_version.sql (1.08ms)
2026/05/06 14:37:54 OK   20240305221944_remove_tier_resources.sql (1.62ms)
2026/05/06 14:37:54 OK   20240315165236_create_env_builds.sql (5.49ms)
2026/05/06 14:37:54 OK   20240605070918_refactor_triggers_and_policies.sql (4.54ms)
2026/05/06 14:37:54 OK   20240625095352_add_envd_version.sql (910.17µs)
2026/05/06 14:37:54 OK   20240728094137_add_default_team_flag.sql (2.18ms)
2026/05/06 14:37:54 OK   20240909142106_drop_team_policies.sql (999.04µs)
2026/05/06 14:37:54 OK   20241120222814_add_team_api_key_metadata.sql (3.29ms)
2026/05/06 14:37:54 OK   20241121225404_add_team_api_key_id.sql (4.65ms)
2026/05/06 14:37:54 OK   20241127174604_add_env_creator.sql (1.58ms)
2026/05/06 14:37:54 OK   20241206124325_add_user_team_adder.sql (1.53ms)
2026/05/06 14:37:54 OK   20241213142106_create_snapshots.sql (2.36ms)
2026/05/06 14:37:54 OK   20250106142106_remove_team_is_default.sql (1.04ms)
2026/05/06 14:37:54 OK   20250206105106_add_snapshot_constraints.sql (2.56ms)
2026/05/06 14:37:54 OK   20250211160814_add_token_hashes.sql (5.46ms)
2026/05/06 14:37:54 OK   20250306105106_add_indexes.sql (4.25ms)
2026/05/06 14:37:54 OK   20250404151700_add_snapshots_sbx_started_at.sql (4.58ms)
2026/05/06 14:37:54 OK   20250409113306_add_envd_secured_to_snapshot.sql (952.74µs)
2026/05/06 14:37:54 OK   20250506112836_builds_status_index.sql (1.19ms)
2026/05/06 14:37:54 OK   20250507134356_add_max_specs_to_tier.sql (1.28ms)
2026/05/06 14:37:54 OK   20250513111201_tier_fix_max_memory.sql (1.06ms)
2026/05/06 14:37:54 OK   20250522105042_users_teams_add_created_at.sql (858.75µs)
2026/05/06 14:37:54 OK   20250528203546_ready_command.sql (632.72µs)
2026/05/06 14:37:54 OK   20250606204750_optimize_hashed_key_schema.sql (1.52ms)
2026/05/06 14:37:54 OK   20250606213446_deployment_cluster.sql (3.62ms)
2026/05/06 14:37:54 OK   20250624001047_deploy_cluster_policy.sql (617.47µs)
2026/05/06 14:37:54 OK   20250624001048_cluster_for_templates.sql (1.72ms)
2026/05/06 14:37:54 OK   20250624001049_cluster_for_builds.sql (670.41µs)
2026/05/06 14:37:54 OK   20250624232413_add_build_reason.sql (649.11µs)
2026/05/06 14:37:54 OK   20250708135400_snapshots_migrations.sql (1.18ms)
2026/05/06 14:37:54 OK   20250708135401_snapshot_pause_node_id.sql (621.37µs)
2026/05/06 14:37:54 OK   20250714132924_cluster_sandbox_domain.sql (574.35µs)
2026/05/06 14:37:54 OK   20250728085406_add_create_network_flag.sql (992.25µs)
2026/05/06 14:37:54 OK   20250802144312_update_firecracker_to_v1_12_1.sql (750.01µs)
2026/05/06 14:37:54 OK   20250815181502_change_build_reason_to_json.sql (4.02ms)
2026/05/06 14:37:54 OK   20250818114512_auto_pause.sql (924.29µs)
2026/05/06 14:37:54 OK   20250820102103_add_snapshots_indexes.sql (3.22ms)
2026/05/06 14:37:54 OK   20250824185633_build_node_not_nullable.sql (1.09ms)
2026/05/06 14:37:54 OK   20250824185634_snapshot_node_not_nullable.sql (848.71µs)
2026/05/06 14:37:54 OK   20250825100000_remove_default_keys.sql (676.08µs)
2026/05/06 14:37:54 OK   20250825102440_add_hash_indexes.sql (2.35ms)
2026/05/06 14:37:54 OK   20250825102800_hash_existing_keys.sql (3.72ms)
2026/05/06 14:37:54 OK   20250825102900_drop_mask_columns.sql (1.18ms)
2026/05/06 14:37:54 OK   20250901161352_add_concurrent_template_builds_to_tier.sql (1.29ms)
2026/05/06 14:37:54 OK   20250905134524_fix_env_builds_non_null_fields.sql (966.98µs)
2026/05/06 14:37:54 OK   20250910063940_make_raw_keys_nullable.sql (1.9ms)
2026/05/06 14:37:54 OK   20250910072612_access_tokens_id_non_nullable.sql (569.63µs)
2026/05/06 14:37:54 OK   20250910124212_remove_raw_keys.sql (1.7ms)
2026/05/06 14:37:54 OK   20250923094021_add_team_id_to_snapshots.sql (2.15ms)
2026/05/06 14:37:54 OK   20250923103546_add_snapshot_list_index.sql (2.13ms)
2026/05/06 14:37:54 OK   20250923103614_make_team_id_non_nullable.sql (967.13µs)
2026/05/06 14:37:54 OK   20251009170758_unique_snapshots.sql (1.15ms)
2026/05/06 14:37:54 OK   20251011200438_create_addons_table.sql (7.91ms)
2026/05/06 14:37:54 OK   20251018100653_add_build_version.sql (734.93µs)
2026/05/06 14:37:54 OK   20251026192416_addons_idempotency.sql (1.23ms)
2026/05/06 14:37:54 OK   20251030130958_add_env_index_to_snapshots.sql (1.34ms)
2026/05/06 14:37:54 OK   20251106172810_add_config_to_snapshots.sql (657.46µs)
2026/05/06 14:37:54 OK   20251121101953_build_node_id_nullable.sql (602.78µs)
2026/05/06 14:37:54 OK   20251127000000_add_machine_info_to_env_builds.sql (973.36µs)
2026/05/06 14:37:54 OK   20251216135834_index_snapshots_base_env_id.sql (1.13ms)
2026/05/06 14:37:54 OK   20251217000000_create_public_users_table.sql (4.69ms)
2026/05/06 14:37:54 OK   20251218160000_allow_m_n_builds_with_tags.sql (10.86ms)
2026/05/06 14:37:54 OK   20251218170000_optimize_build_assignment_indexes.sql (1.84ms)
2026/05/06 14:37:54 OK   20260121175429_add_team_slug.sql (11.51ms)
2026/05/06 14:37:54 OK   20260121175430_add_env_aliases_namespace.sql (1.94ms)
2026/05/06 14:37:54 OK   20260127120000_add_env_aliases_uuid_pkey.sql (6.63ms)
2026/05/06 14:37:54 OK   20260129105527_populate_env_aliases_namespace.sql (1.57ms)
2026/05/06 14:37:54 OK   20260204172712_remove_build_assignment_triggers.sql (3.83ms)
2026/05/06 14:37:54 OK   20260210120000_add_env_builds_created_at_index.sql (1.18ms)
2026/05/06 14:37:54 OK   20260210120001_add_env_and_build_source_columns.sql (2.48ms)
2026/05/06 14:37:54 OK   20260210120002_add_status_group_column.sql (4.8ms)
2026/05/06 14:37:54 OK   20260211120000_add_snapshot_templates.sql (3.5ms)
2026/05/06 14:37:54 OK   20260216120000_add_envs_team_id_source_index.sql (1.98ms)
2026/05/06 14:37:54 OK   20260218120000_add_team_id_to_env_builds.sql (6.75ms)
2026/05/06 14:37:54 OK   20260225120000_add_env_builds_team_status_group_index.sql (1.19ms)
2026/05/06 14:37:54 OK   20260228120000_snapshot_template_origin_node.sql (743.97µs)
    validate_test.go:96: 
        	Error Trace:	.../pkg/testutils/db.go:75
        	            				.../internal/auth/validate_test.go:96
        	Error:      	Received unexpected error:
        	            	run postgres: generic container: create container: Error response from daemon: Head "https://registry-1.docker..../postgres/manifests/16-alpine": Get "https://auth.docker.io/token?account=githubactions&scope=repository%3Alibrary%2Fpostgres%3Apull&service=registry.docker.io": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
        	Test:       	TestValidate/completed_build_status
        	Messages:   	Failed to start postgres container
--- FAIL: TestValidate/completed_build_status (15.07s)
View the full list of 10 ❄️ flaky test(s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/metrics::TestTeamMetrics

Flake rate in main: 70.42% (Passed 21 times, Failed 50 times)

Stack Traces | 1.46s run time
=== RUN   TestTeamMetrics
=== PAUSE TestTeamMetrics
=== CONT  TestTeamMetrics
    team_metrics_test.go:61: 
        	Error Trace:	.../api/metrics/team_metrics_test.go:61
        	Error:      	Should be true
        	Test:       	TestTeamMetrics
        	Messages:   	MaxConcurrentSandboxes should be >= 0
--- FAIL: TestTeamMetrics (1.46s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/sandboxes::TestUpdateNetworkConfig

Flake rate in main: 70.51% (Passed 23 times, Failed 55 times)

Stack Traces | 38.5s run time
=== RUN   TestUpdateNetworkConfig
=== PAUSE TestUpdateNetworkConfig
=== CONT  TestUpdateNetworkConfig
--- FAIL: TestUpdateNetworkConfig (38.54s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/sandboxes::TestUpdateNetworkConfig/pause_resume_preserves_allow_internet_access_false

Flake rate in main: 69.33% (Passed 23 times, Failed 52 times)

Stack Traces | 3.49s run time
=== RUN   TestUpdateNetworkConfig/pause_resume_preserves_allow_internet_access_false
    sandbox_network_update_test.go:372: Command [curl] output: event:{start:{pid:1347}}
    sandbox_network_update_test.go:372: Command [curl] output: event:{end:{exit_code:35  exited:true  status:"exit status 35"  error:"exit status 35"}}
Executing command curl in sandbox ixhr7224o5emfxrszyngc
    sandbox_network_update_test.go:372: Command [curl] output: event:{start:{pid:1348}}
    sandbox_network_update_test.go:372: Command [curl] output: event:{end:{exit_code:35  exited:true  status:"exit status 35"  error:"exit status 35"}}
Executing command curl in sandbox itgkkm1re1psidde1loym
    sandbox_network_update_test.go:391: Command [curl] output: event:{start:{pid:1349}}
    sandbox_network_update_test.go:391: Command [curl] output: event:{data:{stdout:"HTTP/2 302 \r\nx-content-type-options: nosniff\r\nlocation: https://dns.google/\r\ndate: Wed, 06 May 2026 14:47:05 GMT\r\ncontent-type: text/html; charset=UTF-8\r\nserver: HTTP server (unknown)\r\ncontent-length: 216\r\nx-xss-protection: 0\r\nx-frame-options: SAMEORIGIN\r\nalt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000\r\n\r\n"}}
    sandbox_network_update_test.go:391: Command [curl] output: event:{end:{exited:true  status:"exit status 0"}}
    sandbox_network_update_test.go:391: Command [curl] completed successfully in sandbox ixhr7224o5emfxrszyngc
    sandbox_network_update_test.go:391: 
        	Error Trace:	.../api/sandboxes/sandbox_network_out_test.go:74
        	            				.../api/sandboxes/sandbox_network_update_test.go:60
        	            				.../api/sandboxes/sandbox_network_update_test.go:391
        	Error:      	An error is expected but got nil.
        	Test:       	TestUpdateNetworkConfig/pause_resume_preserves_allow_internet_access_false
        	Messages:   	https://8.8.8.8 should be blocked
--- FAIL: TestUpdateNetworkConfig/pause_resume_preserves_allow_internet_access_false (3.49s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestBindLocalhost

Flake rate in main: 47.69% (Passed 34 times, Failed 31 times)

Stack Traces | 0s run time
=== RUN   TestBindLocalhost
=== PAUSE TestBindLocalhost
=== CONT  TestBindLocalhost
--- FAIL: TestBindLocalhost (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestBindLocalhost/bind_0_0_0_0

Flake rate in main: 54.76% (Passed 19 times, Failed 23 times)

Stack Traces | 8.81s run time
=== RUN   TestBindLocalhost/bind_0_0_0_0
=== PAUSE TestBindLocalhost/bind_0_0_0_0
=== CONT  TestBindLocalhost/bind_0_0_0_0
    localhost_bind_test.go:69: Command [python] output: event:{start:{pid:1251}}
Executing command python in sandbox i1kihl4vsd4at70ot8rk4
    localhost_bind_test.go:90: 
        	Error Trace:	.../tests/envd/localhost_bind_test.go:90
        	Error:      	Not equal: 
        	            	expected: 200
        	            	actual  : 502
        	Test:       	TestBindLocalhost/bind_0_0_0_0
        	Messages:   	Unexpected status code 502 for bind address 0.0.0.0
--- FAIL: TestBindLocalhost/bind_0_0_0_0 (8.81s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestBindLocalhost/bind_::1

Flake rate in main: 57.78% (Passed 19 times, Failed 26 times)

Stack Traces | 7.41s run time
=== RUN   TestBindLocalhost/bind_::1
=== PAUSE TestBindLocalhost/bind_::1
=== CONT  TestBindLocalhost/bind_::1
    localhost_bind_test.go:69: Command [python] output: event:{start:{pid:1251}}
Executing command python in sandbox izwpuz4igr54t87luqz87
    localhost_bind_test.go:90: 
        	Error Trace:	.../tests/envd/localhost_bind_test.go:90
        	Error:      	Not equal: 
        	            	expected: 200
        	            	actual  : 502
        	Test:       	TestBindLocalhost/bind_::1
        	Messages:   	Unexpected status code 502 for bind address ::1
--- FAIL: TestBindLocalhost/bind_::1 (7.41s)
github.com/e2b-dev/infra/tests/integration/internal/tests/envd::TestBindLocalhost/bind_localhost

Flake rate in main: 55.81% (Passed 19 times, Failed 24 times)

Stack Traces | 9.17s run time
=== RUN   TestBindLocalhost/bind_localhost
=== PAUSE TestBindLocalhost/bind_localhost
=== CONT  TestBindLocalhost/bind_localhost
Executing command python in sandbox iz72crsdy079prwkvuo5a
    localhost_bind_test.go:69: Command [python] output: event:{start:{pid:1251}}
    localhost_bind_test.go:90: 
        	Error Trace:	.../tests/envd/localhost_bind_test.go:90
        	Error:      	Not equal: 
        	            	expected: 200
        	            	actual  : 502
        	Test:       	TestBindLocalhost/bind_localhost
        	Messages:   	Unexpected status code 502 for bind address localhost
--- FAIL: TestBindLocalhost/bind_localhost (9.17s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity

Flake rate in main: 55.17% (Passed 26 times, Failed 32 times)

Stack Traces | 0s run time
=== RUN   TestSandboxMemoryIntegrity
=== PAUSE TestSandboxMemoryIntegrity
=== CONT  TestSandboxMemoryIntegrity
--- FAIL: TestSandboxMemoryIntegrity (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity/stress-ng_verify

Flake rate in main: 58.70% (Passed 19 times, Failed 27 times)

Stack Traces | 31.2s run time
=== RUN   TestSandboxMemoryIntegrity/stress-ng_verify
=== PAUSE TestSandboxMemoryIntegrity/stress-ng_verify
=== CONT  TestSandboxMemoryIntegrity/stress-ng_verify
Executing command bash in sandbox ivz8z743xjm10l5uhky8x (user: root)
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{start:{pid:1251}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Hit:1 http://deb.debian.org/debian bookworm InRelease\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Hit:2 http://deb.debian.org/debian bookworm-updates InRelease\nHit:3 http://deb.debian.org/debian-security bookworm-security InRelease\n"}}
Executing command bash in sandbox ibc7w7af5czl1odp732ri (user: root)
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Reading package lists..."}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Reading package lists..."}}
Executing command bash in sandbox ia9mu4dql1h1pu1lyqudi (user: root)
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Building dependency tree..."}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"\nReading state information..."}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"The following additional packages will be installed:\n  libdrm-common libdrm2 libegl-mesa0 libegl1 libgbm1 libglapi-mesa libgles2\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"  libglvnd0 libipsec-mb1 libjudydebian1 libsctp1 libwayland-client0\n  libwayland-server0 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-present0\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"  libxcb-randr0 libxcb-sync1 libxcb-xfixes0 libxshmfence1\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Suggested packages:\n  lksctp-tools\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"The following NEW packages will be installed:\n  libdrm-common libdrm2 libegl-mesa0 libegl1 libgbm1 libglapi-mesa libgles2\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"  libglvnd0 libipsec-mb1 libjudydebian1 libsctp1 libwayland-client0\n  libwayland-server0 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-present0\n  libxcb-randr0 libxcb-sync1 libxcb-xfixes0 libxshmfence1 stress-ng time\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"0 upgraded, 23 newly installed, 0 to remove and 146 not upgraded.\nNeed to get 4781 kB of archives.\nAfter this operation, 25.6 MB of additional disk space will be used.\nGet:1 http://deb.debian.org/debian bookworm/main amd64 libdrm-common all 2.4.114-1 [7112 B]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:2 http://deb.debian.org/debian bookworm/main amd64 libdrm2 amd64 2.4.114-1+b1 [37.5 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:3 http://deb.debian.org/debian bookworm/main amd64 libwayland-server0 amd64 1.21.0-1 [35.9 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:4 http://deb.debian.org/debian bookworm/main amd64 libgbm1 amd64 22.3.6-1+deb12u1 [38.0 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:5 http://deb.debian.org/debian bookworm/main amd64 libglapi-mesa amd64 22.3.6-1+deb12u1 [35.7 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:6 http://deb.debian.org/debian bookworm/main amd64 libwayland-client0 amd64 1.21.0-1 [28.3 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:7 http://deb.debian.org/debian bookworm/main amd64 libx11-xcb1 amd64 2:1.8.4-2+deb12u2 [192 kB]\nGet:8 http://deb.debian.org/debian bookworm/main amd64 libxcb-dri2-0 amd64 1.15-1 [107 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:9 http://deb.debian.org/debian bookworm/main amd64 libxcb-dri3-0 amd64 1.15-1 [107 kB]\nGet:10 http://deb.debian.org/debian bookworm/main amd64 libxcb-present0 amd64 1.15-1 [105 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:11 http://deb.debian.org/debian bookworm/main amd64 libxcb-randr0 amd64 1.15-1 [117 kB]\nGet:12 http://deb.debian.org/debian bookworm/main amd64 libxcb-sync1 amd64 1.15-1 [109 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:13 http://deb.debian.org/debian bookworm/main amd64 libxcb-xfixes0 amd64 1.15-1 [109 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:14 http://deb.debian.org/debian bookworm/main amd64 libxshmfence1 amd64 1.3-1 [8820 B]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:15 http://deb.debian.org/debian bookworm/main amd64 libegl-mesa0 amd64 22.3.6-1+deb12u1 [114 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:16 http://deb.debian.org/debian bookworm/main amd64 libglvnd0 amd64 1.6.0-1 [51.8 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:17 http://deb.debian.org/debian bookworm/main amd64 libgles2 amd64 1.6.0-1 [16.8 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:18 http://deb.debian.org/debian bookworm/main amd64 libipsec-mb1 amd64 1.3-2 [981 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:19 http://deb.debian.org/debian bookworm/main amd64 libjudydebian1 amd64 1.0.5-5+b2 [102 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:20 http://deb.debian.org/debian bookworm/main amd64 libsctp1 amd64 1.0.19+dfsg-2 [29.7 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:21 http://deb.debian.org/debian bookworm/main amd64 libegl1 amd64 1.6.0-1 [33.7 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:22 http://deb.debian.org/debian bookworm/main amd64 stress-ng amd64 0.15.06-2 [2363 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Get:23 http://deb.debian.org/debian bookworm/main amd64 time amd64 1.9-0.2 [50.8 kB]\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stderr:"debconf: delaying package configuration, since apt-utils is not installed\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Fetched 4781 kB in 6s (822 kB/s)\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libdrm-common.\r\n(Reading database ... \r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 70%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 75%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 80%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 85%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 90%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 95%\r"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"(Reading database ... 100%\r(Reading database ... 25971 files and directories currently installed.)\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../00-libdrm-common_2.4.114-1_all.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libdrm-common (2.4.114-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libdrm2:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../01-libdrm2_2.4.114-1+b1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libdrm2:amd64 (2.4.114-1+b1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libwayland-server0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../02-libwayland-server0_1.21.0-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libwayland-server0:amd64 (1.21.0-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libgbm1:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../03-libgbm1_22.3.6-1+deb12u1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libgbm1:amd64 (22.3.6-1+deb12u1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libglapi-mesa:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../04-libglapi-mesa_22.3.6-1+deb12u1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libglapi-mesa:amd64 (22.3.6-1+deb12u1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libwayland-client0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../05-libwayland-client0_1.21.0-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libwayland-client0:amd64 (1.21.0-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libx11-xcb1:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../06-libx11-xcb1_2%3a1.8.4-2+deb12u2_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libx11-xcb1:amd64 (2:1.8.4-2+deb12u2) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxcb-dri2-0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../07-libxcb-dri2-0_1.15-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxcb-dri2-0:amd64 (1.15-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxcb-dri3-0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../08-libxcb-dri3-0_1.15-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxcb-dri3-0:amd64 (1.15-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxcb-present0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../09-libxcb-present0_1.15-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxcb-present0:amd64 (1.15-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxcb-randr0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../10-libxcb-randr0_1.15-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxcb-randr0:amd64 (1.15-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxcb-sync1:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../11-libxcb-sync1_1.15-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxcb-sync1:amd64 (1.15-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxcb-xfixes0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../12-libxcb-xfixes0_1.15-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxcb-xfixes0:amd64 (1.15-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libxshmfence1:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../13-libxshmfence1_1.3-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libxshmfence1:amd64 (1.3-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libegl-mesa0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../14-libegl-mesa0_22.3.6-1+deb12u1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libegl-mesa0:amd64 (22.3.6-1+deb12u1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libglvnd0:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../15-libglvnd0_1.6.0-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libglvnd0:amd64 (1.6.0-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libgles2:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../16-libgles2_1.6.0-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libgles2:amd64 (1.6.0-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libipsec-mb1.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../17-libipsec-mb1_1.3-2_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libipsec-mb1 (1.3-2) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libjudydebian1.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../18-libjudydebian1_1.0.5-5+b2_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libjudydebian1 (1.0.5-5+b2) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libsctp1:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../19-libsctp1_1.0.19+dfsg-2_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libsctp1:amd64 (1.0.19+dfsg-2) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package libegl1:amd64.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../20-libegl1_1.6.0-1_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking libegl1:amd64 (1.6.0-1) ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package stress-ng.\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Preparing to unpack .../21-stress-ng_0.15.06-2_amd64.deb ...\r\n"}}
    sandbox_memory_integrity_test.go:141: Command [bash] output: event:{data:{stdout:"Unpacking stress-ng (0.15.06-2) ...\r\n"}}
    sandbox_memory_integrity_test.go:142: 
        	Error Trace:	.../tests/orchestrator/sandbox_memory_integrity_test.go:142
        	Error:      	Received unexpected error:
        	            	failed to execute command bash in sandbox ivz8z743xjm10l5uhky8x: invalid_argument: protocol error: incomplete envelope: unexpected EOF
        	Test:       	TestSandboxMemoryIntegrity/stress-ng_verify
--- FAIL: TestSandboxMemoryIntegrity/stress-ng_verify (31.17s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity/tmpfs_hash

Flake rate in main: 60.42% (Passed 19 times, Failed 29 times)

Stack Traces | 31.4s run time
=== RUN   TestSandboxMemoryIntegrity/tmpfs_hash
=== PAUSE TestSandboxMemoryIntegrity/tmpfs_hash
=== CONT  TestSandboxMemoryIntegrity/tmpfs_hash
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{start:{pid:1251}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Hit:1 http://deb.debian.org/debian bookworm InRelease\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Hit:2 http://deb.debian.org/debian bookworm-updates InRelease\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Reading package lists..."}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Reading package lists..."}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Building dependency tree..."}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"\nReading state information..."}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"The following NEW packages will be installed:\n  time\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"0 upgraded, 1 newly installed, 0 to remove and 146 not upgraded.\nNeed to get 50.8 kB of archives.\nAfter this operation, 132 kB of additional disk space will be used.\nGet:1 http://deb.debian.org/debian bookworm/main amd64 time amd64 1.9-0.2 [50.8 kB]\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stderr:"debconf: delaying package configuration, since apt-utils is not installed\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Fetched 50.8 kB in 0s (188 kB/s)\n"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"Selecting previously unselected package time.\r\n(Reading database ... \r"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"(Reading database ... 70%\r"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"(Reading database ... 75%\r"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"(Reading database ... 80%\r"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"(Reading database ... 85%\r"}}
    sandbox_memory_integrity_test.go:33: Command [bash] output: event:{data:{stdout:"(Reading database ... 90%\r"}}
    sandbox_memory_integrity_test.go:34: 
        	Error Trace:	.../tests/orchestrator/sandbox_memory_integrity_test.go:34
        	Error:      	Received unexpected error:
        	            	failed to execute command bash in sandbox iqc1rxvax3e4gasi2xpaq: invalid_argument: protocol error: incomplete envelope: unexpected EOF
        	Test:       	TestSandboxMemoryIntegrity/tmpfs_hash
--- FAIL: TestSandboxMemoryIntegrity/tmpfs_hash (31.40s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the isLocalRequestHost function to treat all valid IP addresses as local, enabling header-based routing for IP-based hosts. Corresponding test cases for private and public IPv4 addresses have been added to verify this behavior. I have no feedback to provide.

Copy link
Copy Markdown
Contributor

@matthewlouisbrockman matthewlouisbrockman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh.

@tomassrnka tomassrnka merged commit f50b5f2 into main May 6, 2026
93 of 94 checks passed
@tomassrnka tomassrnka deleted the fix/proxy-header-routing-ip-hosts branch May 6, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants