Skip to content

feat: add --security-mode strict|compat with strict as default#6197

Merged
lpcox merged 11 commits into
mainfrom
feat/security-mode-strict
Jul 13, 2026
Merged

feat: add --security-mode strict|compat with strict as default#6197
lpcox merged 11 commits into
mainfrom
feat/security-mode-strict

Conversation

@lpcox

@lpcox lpcox commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds --security-mode strict|compat with strict as the default. This bundles AWF's hardened security posture into a single flag instead of requiring operators to know about --network-isolation --enable-api-proxy --topology-attach.

Closes #6193

What strict mode enforces

Setting Strict (default) Compat (opt-in)
Egress enforcement Docker network topology (internal: true) Host iptables
Credential handling API proxy injection Agent holds keys
Sudo required No Yes
--enable-host-access Rejected (warning) Available
--enable-dind Rejected (warning) Available
--dns-over-https Rejected (warning) Available

Override behavior

Incompatible options are overridden with warnings, not hard errors. AWF continues running in strict mode with the option disabled:

⚠️  --enable-host-access was ignored (incompatible with --security-mode strict, the default).
   Pass --security-mode compat to enable host access.

Files changed

File What
src/types/security-options.ts Add securityMode field
src/cli-options.ts Add --security-mode CLI option (default: strict)
src/config-file.ts Add security.securityMode to config file type
src/config-mapper.ts Wire config file → CLI options
src/commands/build-config.ts Wire CLI options → WrapperConfig
src/awf-config-schema.json + docs/ Add to JSON schema
src/commands/validators/security-mode.ts Core logic: apply strict defaults, override incompatible options
src/commands/validators/config-assembly.ts Wire applySecurityMode() into pipeline
src/commands/validators/infrastructure-validator.ts Remove "experimental" label, update error messages
src/commands/validators/security-mode.test.ts 10 new tests
src/commands/validators/config-assembly*.test* Add securityMode: 'compat' to existing test fixtures

Test results

  • 10 new tests for strict/compat mode
  • All 3,742 existing tests pass
  • TypeScript compiles clean

Introduce a --security-mode flag that bundles AWF's security posture into
two modes: strict (default) and compat (legacy opt-in).

Strict mode (default) enforces:
- Network isolation (Docker internal network, Squid dual-homed)
- API proxy (credential injection, agent never holds keys)
- Rejects --enable-host-access, --enable-dind, --dns-over-https

When incompatible options are passed in strict mode, they are overridden
with a warning that tells operators to use --security-mode compat:

  warning: --enable-host-access was ignored (incompatible with
           --security-mode strict, the default).
           Pass --security-mode compat to enable host access.

Compat mode preserves the legacy iptables-based configuration for
operators who need host-access, DinD, or direct credential passing.

Changes:
- Add securityMode to SecurityOptions type, CLI options, config file,
  JSON schema, and config mapper
- Add applySecurityMode() in security-mode.ts: enforces strict defaults
  and overrides incompatible options with warnings
- Wire into config-assembly pipeline after buildConfig(), before validators
- Remove 'experimental' label from network-isolation (now the default)
- Update error messages ('not yet supported' → 'not supported')
- Add 10 unit tests for strict/compat mode behavior
- Update existing test fixtures to use securityMode: 'compat' so they
  preserve their original behavior

Closes #6193

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 19:18
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation build failed for this PR. View logs.

Built from commit 3b11fbe

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.92% 98.96% 📈 +0.04%
Statements 98.88% 98.92% 📈 +0.04%
Functions 99.34% 99.34% ➡️ +0.00%
Branches 95.11% 95.15% 📈 +0.04%
📁 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%)
✨ New Files (1 files)
  • src/commands/validators/security-mode.ts: 100.0% lines

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces default strict security mode, bundling topology isolation and API-proxy credential handling while retaining opt-in compatibility mode.

Changes:

  • Adds CLI, config, type, and schema support for security modes.
  • Implements strict-mode overrides and warnings.
  • Updates validator wiring and tests.
Show a summary per file
File Description
src/types/security-options.ts Defines the security-mode type.
src/config-mapper.ts Maps file configuration to CLI options.
src/config-file.ts Adds file-config typing.
src/commands/validators/security-mode.ts Implements mode enforcement.
src/commands/validators/security-mode.test.ts Tests strict and compatibility behavior.
src/commands/validators/infrastructure-validator.ts Updates topology validation messages.
src/commands/validators/config-assembly.ts Adds security enforcement to validation.
src/commands/validators/config-assembly.test-utils.ts Preserves compatibility-mode fixtures.
src/commands/validators/config-assembly-flags.test.ts Updates topology validation tests.
src/commands/build-config.ts Builds the security-mode setting.
src/cli-options.ts Adds the new CLI flag.
src/awf-config-schema.json Extends the runtime schema.
docs/awf-config.schema.json Extends the published schema.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 13/13 changed files
  • Comments generated: 5
  • Review effort level: Medium

Comment on lines +51 to +56
if (config.enableHostAccess) {
logger.warn(
'⚠️ --enable-host-access was ignored (incompatible with --security-mode strict, the default).\n' +
' Pass --security-mode compat to enable host access.',
);
config.enableHostAccess = false;
Comment on lines +28 to +31
if (!config.networkIsolation) {
if (config.networkIsolation === false) {
// Explicitly set to false via CLI or config — warn and override
logger.warn(
Comment on lines +27 to +36
// Force network-isolation on
if (!config.networkIsolation) {
if (config.networkIsolation === false) {
// Explicitly set to false via CLI or config — warn and override
logger.warn(
'⚠️ network.isolation: false was ignored (incompatible with --security-mode strict, the default).\n' +
' Pass --security-mode compat to disable network isolation.',
);
}
config.networkIsolation = true;
Comment thread src/cli-options.ts Outdated
Comment on lines +278 to +282
'--security-mode <mode>',
'Security enforcement mode (default: strict).\n' +
' strict: network-isolation + api-proxy, no sudo/iptables.\n' +
' compat: legacy iptables mode, requires sudo.',
'strict'
Comment thread src/cli-options.ts Outdated
false
)
.option(
'--security-mode <mode>',
@lpcox

lpcox commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot address review feedback

The legacy sudo/iptables integration test path needs compat mode now
that strict is the default. Without this, strict mode forces
network-isolation on, which is incompatible with the sudo/iptables
flow and causes exit code -1.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

lpcox and others added 2 commits July 13, 2026 12:33
Switch all 4 chroot test suites (procfs, edge-cases, languages,
package-managers) from runWithSudo() (legacy iptables/sudo) to run()
(strict mode: network-isolation, no sudo).

Changes:
- batch-runner.ts: use runner.run() instead of runner.runWithSudo()
- chroot-edge-cases.test.ts: 10 calls migrated
- chroot-package-managers.test.ts: 11 calls migrated
- chroot-languages.test.ts: 3 calls migrated
- chroot-procfs.test.ts: already batch-only, no changes needed
- awf-runner.ts: update runWithSudo() docstring to mark as legacy
- test-chroot.yml: remove stale sudo-related comments

The non-chroot integration tests still use runWithSudo() with
--security-mode compat and will be migrated separately.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Add Commander .choices(['strict','compat']) to --security-mode so typos like
  --security-mode comapt fail with a clear error instead of silently falling
  through to strict-mode logic (#cli-options.ts)

- Register --no-network-isolation and --no-enable-api-proxy CLI options so
  Commander accepts them; drop the hardcoded false defaults so the value is
  undefined when neither flag is passed.  undefined signals "not set by user",
  false signals "explicitly disabled" — downstream strict-mode warnings now only
  fire for genuine user overrides (#cli-options.ts, build-config.ts)

- Skip Docker network-isolation enforcement in strict mode for microVM runtimes
  (containerRuntime where runtimeUsesComposeAgent returns false, e.g. sbx);
  those VMs enforce isolation at the hypervisor layer via DOCKER_SANDBOXES_PROXY
  (#security-mode.ts)

- Clear allowHostServicePorts in strict mode alongside enableHostAccess;
  applyHostServicePortsConfig() runs later in the pipeline and would auto-
  re-enable host access if the port list is left intact (#security-mode.ts)

- Update security-mode.test.ts: split networkIsolation/enableApiProxy tests into
  undefined-default (silent enable) and explicit-false (warn+enable) cases; add
  allowHostServicePorts clearing tests; add microVM runtime tests

Copilot AI commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@copilot address review feedback

Addressed all five review points in commit af1ddf0's follow-up (see latest commit):

cli-options.ts:278 — negative CLI forms + choices validation

  • Replaced .option('--security-mode ...') with .addOption(new Option(...).choices(['strict', 'compat']).default('strict')) — typos like --security-mode comapt now fail with a clear Commander error.
  • Registered --no-network-isolation and --no-enable-api-proxy as explicit CLI options so Commander accepts them instead of rejecting them as unknown flags. Dropped the hardcoded false defaults on --network-isolation and --enable-api-proxy so their option value is undefined when neither form is passed.

security-mode.ts:28-31false doesn't indicate an explicit override

  • With undefined as the new default, config.networkIsolation === false (and same for enableApiProxy) is now only true when the user explicitly passed --no-network-isolation / --no-enable-api-proxy or set the value to false in the config file. Normal default invocations no longer emit spurious "was ignored" warnings.

security-mode.ts:27-36 — sbx/microVM runtime path

  • Imported runtimeUsesComposeAgent and wrapped the networkIsolation enforcement block with if (!isMicroVmRuntime). For sbx (and any other microVM runtime), strict mode skips Docker network topology enforcement; API-proxy enforcement is still applied since sbx routes through the host-side Squid.

security-mode.ts:51-56allowHostServicePorts bypasses strict mode

  • Added two clearing paths: one when enableHostAccess is overridden (clears any co-present allowHostServicePorts before applyHostServicePortsConfig() can re-enable host access), and one for allowHostServicePorts set without enableHostAccess (which would auto-enable host access downstream on its own). Both paths emit a warning.

All 3,748 tests pass.

Copilot finished work on behalf of lpcox July 13, 2026 19:39
lpcox and others added 4 commits July 13, 2026 13:02
When strict mode disables --enable-host-access, the dependent
--allow-host-ports and --allow-host-service-ports flags must also
be cleared. Otherwise the downstream validator sees host ports
without host access enabled and calls process.exit(1).

This was triggered by allowDomains: ['localhost'] which auto-enables
host access and host ports — strict mode overrode enableHostAccess
but left the port list, causing:
  ❌ --allow-host-ports requires --enable-host-access to be set

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Migrate all compatible integration tests from runWithSudo() to run(),
which uses the new default strict security mode (network-isolation).

24 files migrated (216 runWithSudo → run calls):
- api-proxy (4 files): proxy routing tests
- domain/dns (4 files): domain filtering, DNS config
- utility (16 files): env vars, exit codes, volumes, git, etc.

5 files remain on compat mode (runWithSudo) by design:
- network-security.test.ts: iptables behavior verification
- ipv6.test.ts: ip6tables rules
- localhost-access.test.ts: allowHostPorts testing
- host-tcp-services.test.ts: allowHostServicePorts testing
- credential-hiding.test.ts: /dev/null mount testing

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8dcc99fc-3d0e-40c5-8b75-bc43d9bf5dee
Strict security mode uses network-isolation (Docker internal network)
instead of host iptables, so sudo is no longer needed to run AWF.

Updated 10 lock files:
- smoke-gvisor (4 files), smoke-chroot (1 file)
- secret-digger (3 files)
- schema-sync, model-api-mapping-updater

Setup steps (apt-get install, sysctl, chmod) retain sudo as expected.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8dcc99fc-3d0e-40c5-8b75-bc43d9bf5dee
Strict security mode uses network-isolation with MCP gateway for API
traffic, so --enable-host-access and --allow-host-ports are no longer
needed. These flags would be silently overridden at runtime anyway.

smoke-services.lock.yml intentionally kept on compat mode (needs host
service port access for Redis/PostgreSQL GitHub Actions services).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8dcc99fc-3d0e-40c5-8b75-bc43d9bf5dee
Reverts 218bb61 and 534a612. The lock file changes (removing sudo
and --enable-host-access) require the strict-mode AWF to be released
first. The installed AWF on runners (v0.82.8) still defaults to
iptables mode, which needs sudo.

These changes will be applied in a follow-up PR after the next release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8dcc99fc-3d0e-40c5-8b75-bc43d9bf5dee
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Smoke Test: Copilot PAT Auth

Test Result
GitHub MCP connectivity
GitHub.com HTTP ⚠️ pre-step data unresolved
File write/read ⚠️ pre-step data unresolved

Overall: PARTIAL — MCP ✅ but ${{ steps.smoke-data.outputs.* }} template variables were not resolved.

Auth mode: PAT (COPILOT_GITHUB_TOKEN) | @lpcox

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🔑 PAT report filed by Smoke Copilot PAT
Add label ready-for-aw to run again

@github-actions github-actions Bot mentioned this pull request Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: API Proxy OpenTelemetry Tracing

Scenario Result Detail
1. Module Loading otel.js loads successfully; exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled
2. Test Suite 59 tests passed across 2 suites (otel.test.js, otel-fanout.test.js)
3. Env Var Forwarding src/services/api-proxy-env-config.ts forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, GITHUB_AW_OTEL_TRACE_ID, GITHUB_AW_OTEL_PARENT_SPAN_ID
4. Token Tracker Integration onUsage callback exists in token-tracker-http.js (line 343); invoked after normalized usage extraction
5. OTEL Diagnostics i️ No live container run; FileSpanExporter fallback confirmed working via unit tests when no endpoint configured

All scenarios passed. OTEL tracing integration is fully operational.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Services Connectivity

  • Redis PING: ❌ (host.docker.internal does not resolve; host IP unreachable)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (connection failed)

Overall: FAIL

The AWF sandbox has no route to the host network — host.docker.internal is not defined and the runner IP (10.1.0.198) is unreachable from 172.30.0.20. Service containers are not accessible from inside the AWF network.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Merged PRs reviewed: Deduplicate baseline agent-volume test config fixture; Refactor network setup tests to use a shared DNS/proxy mock fixture\nChecks: merged PR review ✅, GitHub query ✅, GitHub PR list ✅, browser title ✅, file write ✅, discussion lookup ✅, build ✅\nOverall status: PASS

Warning

Firewall blocked 2 domains

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

  • awmgmcpg
  • registry.npmjs.org

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

network:
  allowed:
    - defaults
    - "awmgmcpg"
    - "registry.npmjs.org"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.13 Python 3.12.3 ❌ NO
Node.js v24.18.0 v22.23.1 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Not all runtimes matched — ALL_TESTS_PASSED=false.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

@lpcox Smoke test results for Copilot BYOK (Direct, Azure OpenAI Foundry, Entra):

  • GitHub MCP list PRs: ✅
  • GitHub.com connectivity: ✅
  • File write/read test: ✅
  • BYOK inference end-to-end: ✅

Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra

Overall: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Gemini Engine Validation

Overall status: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • localhost

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

network:
  allowed:
    - defaults
    - "localhost"

See Network Configuration for more information.

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results — Docker Sbx

Test Result
GitHub MCP connectivity ✅ PASS
GitHub.com HTTP connectivity ⚠️ N/A (pre-step output unavailable)
File write/read ⚠️ N/A (pre-step output unavailable)

PR: feat: add --security-mode strict|compat with strict as default
Author: @lpcox | Assignees:

Overall: PARTIAL — MCP confirmed working; pre-computed step outputs (smoke-data) were not expanded (template variables unresolved in agent context).

📰 BREAKING: Report filed by Smoke Docker Sbx
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color 1/1 passed ✅ PASS
Go env 1/1 passed ✅ PASS
Go uuid 1/1 passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx passed ✅ PASS
Node.js execa passed ✅ PASS
Node.js p-limit passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Build Test Suite for #6197 · 75.4 AIC · ⊞ 6.9K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

PR Titles:
${{ steps.smoke-data.outputs.SMOKE_PR_DATA }}

✅ GitHub MCP connectivity
✅ GitHub.com connectivity
✅ Sandbox file I/O
✅ Direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)

Overall: PASS

cc @lpcox

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

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

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

lpcox and others added 2 commits July 13, 2026 15:33
Replace nslookup with dig for DNS resolution tests. In network-
isolation mode, Docker's embedded DNS (127.0.0.11) works with dig
but nslookup has known issues with SERVFAIL responses. The dig
command provides reliable DNS testing across all security modes.

Also migrates DNS exfiltration tests to use dig @<server> which
properly tests that external DNS IPs are unreachable from the
internal network.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8dcc99fc-3d0e-40c5-8b75-bc43d9bf5dee
Rewrite one-shot-tokens and token-unset tests to verify that real
auth tokens are NEVER exposed to the agent container. No real token
(GITHUB_TOKEN, COPILOT_GITHUB_TOKEN, OPENAI_API_KEY, ANTHROPIC_API_KEY)
should ever be visible in the agent environment — the API proxy sidecar
holds all credentials and injects them only on upstream requests.

Tests now assert:
- Real token values never appear in stdout
- Real token values never appear in /proc/1/environ
- printenv never returns real token values

Also bumps volume-mounts timeout from 30s to 60s to accommodate
3-container startup in network-isolation mode.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8dcc99fc-3d0e-40c5-8b75-bc43d9bf5dee
@lpcox
lpcox merged commit 01b20c0 into main Jul 13, 2026
24 checks passed
@lpcox
lpcox deleted the feat/security-mode-strict branch July 13, 2026 23:25
github-actions Bot added a commit that referenced this pull request Jul 14, 2026
…pec CLI mapping

Add missing Section 5 CLI mapping entries for two security fields introduced
in PRs #6197 and #6209:
- security.legacySecurity → --legacy-security
- security.securityMode → --security-mode (deprecated)

Both fields exist in src/awf-config-schema.json, src/types/security-options.ts,
src/config-file.ts, and src/config-mapper.ts but were not listed in the
docs/awf-config-spec.md Section 5 CLI Mapping table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Introduce --security-mode strict to bundle the modern no-sudo, no-iptables security posture as the default

3 participants