Skip to content

fix(security): update vulnerable deps in agent and api-proxy images#6505

Merged
lpcox merged 3 commits into
mainfrom
copilot/update-vulnerable-dependencies
Jul 22, 2026
Merged

fix(security): update vulnerable deps in agent and api-proxy images#6505
lpcox merged 3 commits into
mainfrom
copilot/update-vulnerable-dependencies

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Enterprise artifact scans flag the v0.27.38 images for vulnerable/outdated packages: Ubuntu's gh 2.4.0 (Go 1.18), npm 10.9.8 bundled with Node 22 (carrying vulnerable tar, brace-expansion, sigstore, picomatch), and Alpine curl 8.20.x.

containers/agent/Dockerfile

  • GitHub CLI: Drop Ubuntu's gh from PKGS; add the official GitHub CLI apt repo and install gh=2.96.0
  • Node.js: Pin to nodejs=22.23.1-1nodesource1 (was unversioned apt-get install -y nodejs)
  • npm 11.18.0: Download tarball from registry, verify SHA-256 (73f6155…), purge both npm 10.x trees (/usr/lib/node_modules/npm, /usr/local/lib/node_modules/npm) and stale /usr/bin/{npm,npx}, then extract manually — avoids executing node under QEMU arm64 where it segfaults
  • Hold pinned versions: apt-mark hold gh nodejs before the later apt-get upgrade so the exact versions survive the security-patch upgrade step

containers/api-proxy/Dockerfile

  • Base image: node:22-alpinenode:22.23.1-alpine3.24
  • curl: apk add --no-cache "curl>=8.21.0-r0" (fixes CVE in Alpine curl 8.20.x)
  • npm: npm install --global npm@11.18.0 with build-time assertions on both node --version and npm --version

.github/workflows/release.yml

  • Add pull: true to the API proxy docker/build-push-action step so release builds always pull a fresh base image while retaining the GHA layer cache

Copilot AI changed the title [WIP] Update vulnerable dependencies in agent and api-proxy images fix(security): update vulnerable deps in agent and api-proxy images Jul 22, 2026
@lpcox
lpcox marked this pull request as ready for review July 22, 2026 19:08
Copilot AI review requested due to automatic review settings July 22, 2026 19:08
Copilot finished work on behalf of lpcox July 22, 2026 19:08
Copilot AI requested a review from lpcox July 22, 2026 19:08

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

Updates container dependencies to remediate security scan findings while preserving multi-architecture releases.

Changes:

  • Pins secure GitHub CLI, Node.js, npm, and curl versions.
  • Removes vulnerable npm 10.x installations from the agent image.
  • Refreshes API proxy base images during release builds.
Show a summary per file
File Description
containers/agent/Dockerfile Installs and holds patched toolchain versions.
containers/api-proxy/Dockerfile Pins patched Node, npm, and curl versions.
.github/workflows/release.yml Pulls fresh API proxy base images during releases.

Review details

Tip

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

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

@github-actions

github-actions Bot commented Jul 22, 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 22, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

Contribution check complete: the PR has a clear description, references a related issue, keeps changes in the expected files, and does not introduce new user-facing functionality that would require added tests or docs under CONTRIBUTING.md.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

Smoke tests complete. Results reported via PR comment. Overall status: FAIL

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Security Guard failed. Please review the logs for details.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jul 22, 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 22, 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 22, 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 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 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 22, 2026

Copy link
Copy Markdown
Contributor

Security Guard failed. Please review the logs for details.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 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 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude passed

@github-actions

github-actions Bot commented Jul 22, 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 22, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

Smoke test PASS: MCP connectivity ✅, GitHub.com connectivity ✅, File I/O ✅, BYOK inference ✅. Running in direct BYOK mode via api-proxy → Azure OpenAI (Foundry)

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini completed. All facets verified. 💎

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Contribution Check completed successfully!

No comment needed: the PR description is clear, references #6504, and the changes are organized under the expected directories. No applicable CONTRIBUTING.md issues were found that warrant a review comment.

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode — PASS

  • ✅ MCP connectivity verified (GitHub API reachable)
  • ✅ GitHub.com HTTP 200 (network egress working)
  • ✅ File write/read test passed (smoke-test-copilot-byok.txt)
  • ✅ BYOK inference active (api-proxy → api.githubcopilot.com)

Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY via api-proxy sidecar)

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

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smoke Test: Copilot PAT Auth — Results

Test Status
GitHub MCP connectivity ✅ Pass
GitHub.com HTTP connectivity ⚠️ N/A (pre-step template not expanded)
File write/read ⚠️ N/A (pre-step template not expanded)

Overall: PARTIAL — MCP confirmed working; pre-computed step outputs were not injected (template vars unexpanded).

Auth mode: PAT (COPILOT_GITHUB_TOKEN)

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

@github-actions

Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Copilot Network Isolation

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com): allowed=200
  • ✅ Blocked domain (example.com): blocked with CONNECT 403

Overall: PASS

@lpcox both egress checks passed.

Warning

Firewall blocked 1 domain

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

  • example.com

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

network:
  allowed:
    - defaults
    - "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

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

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

Overall result: PASS

Generated by Smoke Claude for #6505 · 54.3 AIC · ⊞ 3.2K ·
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🔬 Smoke Test Results

Test Status
GitHub MCP Connectivity ✅ Connected (secrecy policy filtered result — expected)
GitHub.com HTTP ⚠️ Pre-step template vars unresolved (${{ }} not substituted)
File Write/Read ⚠️ Pre-step template vars unresolved

Overall: PARTIAL — MCP connectivity confirmed; pre-step outputs were not injected (template variables unresolved in prompt).

cc @lpcox

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results

Overall status: FAIL

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: API Proxy OpenTelemetry Tracing

Scenario Result Notes
1. Module Loading ✅ Pass otel.js loads successfully; exports: startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled + private helpers
2. Test Suite ✅ Pass 59 tests passed, 0 failed across 2 suites (otel.test.js, otel-fanout.test.js)
3. Env Var Forwarding ✅ Pass api-proxy-service.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, OTEL_SERVICE_NAME to the api-proxy container
4. Token Tracker Integration ✅ Pass onUsage callback exists in token-tracker-http.js (line 285) and is invoked after usage extraction (line 343)
5. OTEL Diagnostics ✅ Pass (graceful degradation) When no endpoint configured, spans are written to /var/log/api-proxy/otel.jsonl (local fallback)

Summary: All 5 scenarios pass. The OTEL integration is fully functional — module loads, 59 tests pass, env vars are forwarded, onUsage hook is wired, and graceful degradation to file export works when no OTLP endpoint is configured.

📡 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 — Services Connectivity

Check Result
Redis PING ❌ Name resolution failed for host.docker.internal
PostgreSQL pg_isready ❌ No response
PostgreSQL SELECT 1 ❌ Name resolution failed

Overall: FAILhost.docker.internal is not resolvable in this environment. The AWF sandbox cannot reach the GitHub Actions service containers.

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

@github-actions

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

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

Result: FAILED — Node.js version mismatch (host: v24.18.0, chroot: v22.23.1).

Tested by Smoke Chroot
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

Note: Java Maven required --Dmaven.repo.local=/tmp/... workaround as the default ~/.m2 directory was owned by root in this runner environment.

Generated by Build Test Suite for #6505 · 46.2 AIC · ⊞ 8.2K ·
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 ✅ Connected (secrecy policy filtered PR data)
GitHub.com HTTP ⚠️ Template vars not expanded (${{ steps.smoke-data.outputs.SMOKE_HTTP_CODE }})
File write/read ⚠️ Template vars not expanded (${{ steps.smoke-data.outputs.SMOKE_FILE_PATH }})

Overall Status: ⚠️ PARTIAL — MCP connectivity confirmed; pre-step outputs were not interpolated into the prompt (workflow template issue).

Note: The ${{ steps.smoke-data.outputs.* }} variables were not substituted before agent invocation.

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

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test results:

  • GitHub read checks: ❌ unavailable in this container
  • Playwright GitHub title check: ✅
  • Temp file write/read: ✅
  • Build (npm ci && npm run build): ✅
    Overall: FAIL

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

@lpcox
lpcox merged commit 2bd6850 into main Jul 22, 2026
137 of 141 checks passed
@lpcox
lpcox deleted the copilot/update-vulnerable-dependencies branch July 22, 2026 21:07
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.

[Security] Update vulnerable dependencies in agent and api-proxy images

3 participants