Skip to content

Internalize dead secureWipeFile export in SSL key storage#6428

Merged
lpcox merged 2 commits into
mainfrom
copilot/remove-dead-export-securewipefile
Jul 20, 2026
Merged

Internalize dead secureWipeFile export in SSL key storage#6428
lpcox merged 2 commits into
mainfrom
copilot/remove-dead-export-securewipefile

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

src/ssl-key-storage.ts exposed secureWipeFile as part of the module API even though it had no external consumers. This trims that dead surface area from a security-sensitive module while preserving direct unit coverage of the wipe logic.

  • API surface

    • Removed the public export for secureWipeFile
    • Kept the function module-private since it is only used by cleanupSslKeyMaterial
  • Test access pattern

    • Exposed secureWipeFile through the existing internal testHelpers pattern used elsewhere in the repo
    • Updated src/ssl-key-storage.test.ts to import the helper from testHelpers instead of the module API
  • Effect

    • Reduces unused public surface in SSL key handling code
    • Keeps the current branch coverage and targeted unit tests intact
function secureWipeFile(filePath: string): void {
  // internal implementation
}

/** @internal Exposed for unit tests. */
export const testHelpers = { secureWipeFile };

Copilot AI changed the title [WIP] Remove dead export for secureWipeFile in ssl-key-storage.ts Internalize dead secureWipeFile export in SSL key storage Jul 20, 2026
Copilot AI requested a review from lpcox July 20, 2026 13:49
Copilot finished work on behalf of lpcox July 20, 2026 13:49
@lpcox
lpcox marked this pull request as ready for review July 20, 2026 14:59
Copilot AI review requested due to automatic review settings July 20, 2026 14:59

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

Internalizes the unused secureWipeFile export while preserving focused unit coverage.

Changes:

  • Makes secureWipeFile module-private.
  • Exposes it through the established internal testHelpers pattern.
  • Updates tests to use testHelpers.
Show a summary per file
File Description
src/ssl-key-storage.ts Removes the direct export and adds internal test access.
src/ssl-key-storage.test.ts Updates the helper import without changing coverage.

Review details

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini reports failed. Facets need polishing...

Smoke Test Results\n\n1. GitHub MCP Testing: ❌ (Access denied by secrecy/integrity policy)\n2. GitHub.com Connectivity: ❌ (Connection failed)\n3. File Writing Testing: ❌ (Permission denied/Confirmation required)\n4. Bash Tool Testing: ❌\n\nOverall status: FAIL

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

PR #6428 appears to satisfy CONTRIBUTING.md: code change is localized, tests were updated, PR description is clear and references #6420, and file placement is appropriate.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 98.45% 98.49% 📈 +0.04%
Statements 98.29% 98.32% 📈 +0.03%
Functions 99.16% 99.16% ➡️ +0.00%
Branches 94.30% 94.30% ➡️ +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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test: Copilot network isolation egress — @lpcox

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (api.github.com): HTTP 200
✅ Blocked domain (example.com): connection denied (403 via proxy)

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.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Copilot PAT Auth

Test Result
GitHub MCP connectivity
GitHub.com HTTP
File write/read

Overall: PASS | Auth mode: PAT (COPILOT_GITHUB_TOKEN) | Author: @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

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API Status ✅ PASS
GH Check ✅ PASS
File Status ✅ PASS

Overall Result: 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 Smoke Claude for #6428 · 35.8 AIC · ⊞ 3.3K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Services Connectivity

Check Result
Redis PING ❌ Network unreachable
PostgreSQL pg_isready ❌ Network unreachable
PostgreSQL SELECT 1 ❌ Network unreachable

Overall: FAIL

The AWF agent container is isolated to 172.30.0.0/24 with no route to the host (10.1.0.86) or host.docker.internal. Service containers are unreachable from inside the AWF sandbox by design.

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 github-actions Bot mentioned this pull request Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

OTEL Smoke Test Results

Scenario Result Notes
1 · Module loading otel.js loads and exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled
2 · Test suite 59 tests passed, 0 failures (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, GITHUB_AW_OTEL_TRACE_ID, GITHUB_AW_OTEL_PARENT_SPAN_ID, and OTEL_* vars to the api-proxy container
4 · Token-tracker integration onUsage callback exists in token-tracker-http.js (line 343) as the OTEL hook point
5 · OTEL diagnostics Graceful degradation confirmed — falls back to local NDJSON (/var/log/api-proxy/otel.jsonl) when no OTLP endpoint configured; no errors

All 5 scenarios 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.

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results

Test Status
GitHub MCP Connectivity ❌ (MCP unavailable in sub-agent)
GitHub.com HTTP ❌ (pre-step outputs not interpolated)
File Write/Read ❌ (pre-step outputs not interpolated)

Overall: FAIL${{ steps.smoke-data.outputs.* }} variables were not expanded before agent execution.

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.

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode

✅ GitHub MCP connectivity
✅ File system access
✅ BYOK inference path (api-proxy → api.githubcopilot.com)

Status: PASS | Running in direct BYOK mode via api-proxy sidecar

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 report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

PRs reviewed: #6425, #6414\nChecks: ✅ GitHub PR list, ✅ GitHub title, ✅ smoke file, ✅ build\nOverall: 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

Smoke Test Summary:
${{ steps.smoke-data.outputs.SMOKE_PR_DATA }}

✅ GitHub MCP testing
✅ GitHub.com connectivity
✅ File write/read
✅ BYOK inference

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)

PASS

@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 Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
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.13
Node.js v24.18.0 v24.18.0
Go go1.22.12 go1.22.12

All runtime versions match between host and chroot environment.

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

🔬 Smoke Test: Docker Sbx Validation

Test Result
GitHub MCP connectivity ⚠️ PRs filtered by secrecy policy
GitHub.com HTTP ⚠️ Pre-step output not substituted
File write/read ⚠️ Pre-step output not substituted

Overall: ⚠️ INCONCLUSIVE — workflow template variables (${{ steps.smoke-data.outputs.* }}) were not expanded before agent execution; pre-computed results unavailable.

/cc @lpcox

📰 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 all passed ✅ PASS
Node.js execa all passed ✅ PASS
Node.js p-limit all 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 #6428 · 36.9 AIC · ⊞ 7.1K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)

  • MCP connectivity: ✅
  • GitHub.com connectivity: ✅
  • File I/O: ✅
  • BYOK inference: ✅

Overall: PASS
@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
lpcox merged commit c49aa5c into main Jul 20, 2026
141 of 146 checks passed
@lpcox
lpcox deleted the copilot/remove-dead-export-securewipefile branch July 20, 2026 16:37
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.

[Export Audit] Dead export: secureWipeFile in ssl-key-storage.ts

3 participants