Skip to content

feat: migrate gVisor smoke tests to strict security mode (no sudo, network-isolation)#6195

Closed
lpcox wants to merge 1 commit into
mainfrom
gvisor-strict-mode-compat
Closed

feat: migrate gVisor smoke tests to strict security mode (no sudo, network-isolation)#6195
lpcox wants to merge 1 commit into
mainfrom
gvisor-strict-mode-compat

Conversation

@lpcox

@lpcox lpcox commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates all 4 gVisor smoke test workflows from the legacy iptables-based configuration to the network-isolation topology mode, validating gVisor compatibility with the proposed --security-mode strict bundle (#6193).

Changes per workflow

Before (legacy) After (strict)
sudo -E awf awf (no sudo)
--enable-host-access --allow-host-ports 80,443,8080 --network-isolation --topology-attach awmg-mcpg --topology-attach awmg-cli-proxy
Host iptables egress enforcement Docker network topology (internal: true)

What stays the same

  • API proxy: already enabled: true in awf-config.json — credential isolation unchanged
  • gVisor runtime: still uses runsc OCI runtime
  • Allowed domains: unchanged
  • Agent command: unchanged

Why this should work

gVisor's DNS incompatibility with Docker's embedded DNS (127.0.0.11) is already handled:

  • runtimeNeedsStaticDns() returns true for gVisor
  • cli-workflow.ts injects /etc/hosts entries for topology peers and compose-internal services via patchComposeWithTopologyHosts()
  • This was added as part of feat: gVisor runtime support #6093 (gVisor runtime support)

Affected workflows

  • smoke-gvisor.lock.yml
  • smoke-gvisor-claude.lock.yml
  • smoke-gvisor-codex.lock.yml
  • smoke-gvisor-build-test.lock.yml

Testing

This PR itself is the test — if the gVisor smoke tests pass in CI with these changes, gVisor is confirmed compatible with strict mode.

Relates to #6193

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦎 Smoke gVisor reports failed. gVisor compatibility issue detected.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.92% 98.95% 📈 +0.03%
Statements 98.88% 98.91% 📈 +0.03%
Functions 99.34% 99.34% ➡️ +0.00%
Branches 95.11% 95.11% ➡️ +0.00%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

Switch all 4 gVisor smoke test workflows from the legacy iptables-based
configuration (sudo + --enable-host-access) to the network-isolation
topology mode (no sudo, no iptables, Docker network enforcement):

AWF invocation:
- Remove sudo
- Replace --enable-host-access --allow-host-ports 80,443,8080
  with --network-isolation --topology-attach awmg-mcpg

MCP Gateway launch:
- Switch from --network host to --network bridge with published port
- Set MCP_GATEWAY_DOMAIN to 'awmg-mcpg' (container name on awf-net)
- Use --add-host host.docker.internal:host-gateway (bridge standard)

These changes match the pattern already used by
network-isolation-test.lock.yml. The gVisor static DNS workaround
(runtimeNeedsStaticDns → patchComposeWithTopologyHosts) handles
hostname resolution for topology peers on gVisor's isolated netstack.

Validates gVisor compatibility with the proposed --security-mode strict
bundle from #6193.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lpcox
lpcox force-pushed the gvisor-strict-mode-compat branch from 294679b to e934d1e Compare July 13, 2026 18:00
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🦎 Smoke gVisor completed. gVisor smoke test passed. ✅

@github-actions

Copy link
Copy Markdown
Contributor

🦎 gVisor runtime: unconfirmed (runc detected — non-blocking)
✅ MCP connectivity: confirmed
✅ GitHub.com connectivity: reachable
✅ File write/read: passed
✅ Network isolation: example.com blocked

Overall: PASS

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • awmgmcpg
  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"
    - "example.com"

See Network Configuration for more information.

🦎 gVisor smoke test by Smoke gVisor
Add label test-gvisor to run again

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.

1 participant