Skip to content

fix(deps): clear MCP runtime audit advisories - #8175

Merged
ericksoa merged 5 commits into
mainfrom
fix/mcp-tool-runtime-audit-8167
Aug 4, 2026
Merged

fix(deps): clear MCP runtime audit advisories#8175
ericksoa merged 5 commits into
mainfrom
fix/mcp-tool-runtime-audit-8167

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Add deterministic regression coverage for cancelling an HTTPS registry request after its configured proxy has completed the CONNECT handshake.

The independent MCP runtime audit fix is already merged on main through #8180. This branch now integrates that exact base and intentionally carries no dependency, lockfile, review-record, or production-code delta.

Changes

  • Retain main's plain HTTP forward-proxy coverage.
  • Add a loopback HTTPS CONNECT fixture that sends 200 Connection Established before aborting the request signal.
  • Assert the public fetch boundary returns AbortError, the tunnel targets registry.invalid:443, and the accepted socket is cleaned up in finally.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: The effective diff adds only test coverage and changes no production or user-visible contract.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Independent exact-head nine-category security review passed with no findings at ade9f9cfc588124d0ffac8ced6e594cc0b40aba7.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: Reviewed the complete effective diff from base 1ee723a3c to head ade9f9cfc. It adds only a 32-line HTTPS proxy CONNECT cancellation regression test. No production or user-visible behavior changed. The test title follows the writing guide. Findings: none. git diff --check passed, and the focused Vitest file passed 6/6.
  • Agent: Codex Desktop

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed
  • Targeted behavior tests pass for the current change set — the complete registry transport file passed 6/6, ten consecutive focused reruns passed, source-shape and test-size gates passed, and CLI build plus TypeScript checks passed
  • Applicable broad gate passed — exact-head CI is authoritative and is still running
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Security Review

No findings at exact head ade9f9cfc588124d0ffac8ced6e594cc0b40aba7.

The effective diff is one test file with 32 additions. The fixture is loopback-only, completes the CONNECT handshake before cancellation, asserts the abort-specific public error, and deterministically destroys the socket and closes the dispatcher in finally. No dependencies, production configuration, authentication, TLS trust, credentials, or runtime controls change. All nine review categories pass.


Signed-off-by: Aaron Erickson aerickson@nvidia.com

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds an HTTPS registry fetch cancellation test. It aborts the request after proxy tunnel establishment, checks for AbortError, verifies the tunnel target, and cleans up the tunnel and fetch session.

Changes

Proxy abort testing

Layer / File(s) Summary
HTTPS proxy abort test
src/lib/onboard/managed-image-registry-fetch.test.ts
The test aborts the fetch after 200 Connection Established, expects AbortError, verifies registry.invalid:443, and destroys the tunnel during cleanup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: dependencies, area: security

Suggested reviewers: apurvvkumaria, jyaunches

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary dependency changes that remove MCP runtime audit advisories.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mcp-tool-runtime-audit-8167

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit ade9f9c in the fix/mcp-tool-runtime... branch remains at 96%, unchanged from commit 49ffca0 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit ade9f9c in the fix/mcp-tool-runtime... branch remains at 81%, unchanged from commit 1ee723a in the main branch.

Show a code coverage summary of the most impacted files.
File main 1ee723a fix/mcp-tool-runtime... ade9f9c +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/messagi...nnels/policy.ts 100% 100% 0%
src/lib/sandbox...rce-identity.ts 88% 88% 0%
src/lib/state/config-io.ts 93% 93% 0%
src/lib/state/g...way-registry.ts 94% 94% 0%
src/lib/state/m...-acquisition.ts 75% 75% 0%
src/lib/inferen...ompatibility.ts 94% 95% +1%
src/lib/platform.ts 84% 89% +5%
src/lib/onboard...shboard-port.ts 90% 96% +6%

Updated August 04, 2026 02:54 UTC

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.
2 additional E2E selections from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • tunnel-lifecycle: The completed second-opinion lane identified E2E coverage that the primary lane omitted.
  • network-policy: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

1 semantic terminology decision

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — proxy tunnel at src/lib/onboard/managed-image-registry-fetch.test.ts:77: Retain “proxy tunnel”; it distinguishes the HTTPS CONNECT behavior under test.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Synchronize cancellation with client tunnel use

  • Location: src/lib/onboard/managed-image-registry-fetch.test.ts:87
  • Category: correctness
  • Problem: The proxy aborts after its local CONNECT response write completes, but it does not wait for Undici to read that response or send tunneled TLS bytes. The test can therefore pass when cancellation takes the pre-tunnel path.
  • Impact: A regression that aborts before tunnel establishment can still satisfy this test, so the stated post-tunnel cancellation behavior is not proved.
  • Recommendation: Wait for client bytes on the CONNECT socket, such as the TLS ClientHello, before aborting the request; retain the AbortError and CONNECT-authority assertions.
  • Verification: Inspect the test's CONNECT handler and confirm it observes socket data from the client after writing 200 before calling abort().
  • Test coverage: Extend this test so the proxy waits for tunneled client data after CONNECT success, then aborts and asserts AbortError and registry.invalid:443.
  • Evidence: src/lib/onboard/managed-image-registry-fetch.test.ts:77 labels the behavior as cancellation after the proxy tunnel is established. src/lib/onboard/managed-image-registry-fetch.test.ts:87-89 aborts from the proxy socket.write callback without observing client data after the 200 CONNECT response.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 -->
## Summary

The managed registry proxy test now exercises the production-like HTTPS
proxy route used by the registry client. Undici 8.10.0 sends an HTTP
target as a plain proxy request, so the previous synthetic HTTP target
could never reach the test's CONNECT handler and timed out in coverage
shard 8.

## Changes

- Use an HTTPS registry target so the loopback proxy observes a CONNECT
tunnel.
- Abort the test request once that stable behavior boundary is observed.
- Assert both the `AbortError` rejection and `registry.invalid:443`
authority.
- Destroy the accepted test socket during deterministic `finally`
cleanup.
- Leave production registry-fetch behavior unchanged.

## Stacked landing

This test-only PR is temporarily based on #8175 so CI evaluates the MCP
audit fix and this Undici test correction together without creating a
circular red dependency. Its public diff remains one test file. Once
this PR is approved and green, it should merge into #8175; #8175 can
then be revalidated and merged to `main` when its refreshed exact head
is approved and green.

Auto-merge is intentionally disabled.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: This changes one
deterministic test route and does not change a public API, CLI,
configuration, default, error, or supported product behavior.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: The nine-category
exact-head review passed at `405bdd6c09e60205003cb032b5a1f7f088c9799d`;
the signed synchronization commit is empty and preserves reviewed tree
`c3ad47e26a5387ce62fe95116730cc2777456719`. This is a loopback-only test
change with no production, dependency, credential, or external-network
behavior.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: At exact head `405bdd6c09e60205003cb032b5a1f7f088c9799d`,
the PR still changes only the loopback HTTPS CONNECT fixture. The signed
synchronization commit is empty and has the same tree as reviewed parent
`21ed6d13a`. No production or user-visible behavior changed; no
explanatory comments or test titles changed; the writing review found no
findings. `git diff --check` passed and the focused Vitest file passed
5/5. A docs build is not applicable.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 405bdd6 -->
<!-- docs-review-agents-blob-sha:
3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — exact-head focused Vitest passed 5/5;
the prior exact behavior correction passed coverage shard 8 in 8m47s.
- [x] Exact-head CLI TypeScript check and `git diff --check` passed.
- [ ] Applicable broad gate passed — exact-head stacked CI is
authoritative and pending.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Julie Yaunches <jmyaunch@gmail.com>

---------

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Co-authored-by: Julie Yaunches <jyaunches@nvidia.com>
Co-authored-by: Aaron Erickson <aerickson@nvidia.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/onboard/managed-image-registry-fetch.test.ts`:
- Line 47: Update the server-side connect handler in the managed image registry
fetch test so it writes the 200 Connection Established response before calling
abortController.abort(). Keep the existing assertion at the fetchImpl public
boundary.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c1f821a7-f681-4311-94f5-d0908e79ad54

📥 Commits

Reviewing files that changed from the base of the PR and between 522de45 and 6cdebc8.

📒 Files selected for processing (1)
  • src/lib/onboard/managed-image-registry-fetch.test.ts

Comment thread src/lib/onboard/managed-image-registry-fetch.test.ts Outdated
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
ericksoa pushed a commit that referenced this pull request Aug 4, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Refreshes the reviewed MCP tool-discovery runtime lock so exact-source
image builds no longer fail on the `fast-uri`, Hono, and `ip-address`
advisories reported against NemoClaw `v0.0.100`. The strict `npm audit
--omit=dev --audit-level=low` gate remains unchanged.

## Related Issue

Fixes #8177

## Changes

- Pin `@hono/node-server@2.0.12`, `fast-uri@3.1.5`, `hono@4.12.34`, and
`ip-address@10.3.1` through the runtime's existing override mechanism
and regenerate the immutable lock.
- Record the reviewed package integrities, upstream ranges, runtime
exposure, and exact verification evidence.
- Bind the reviewed manifest, lock metadata, review record, and
fail-closed audit command in the image contract regression.
- Update the managed-image proxy test for Undici 8.10's forward-proxy
request behavior so the CLI shard terminates deterministically.

PR #8172 overlaps this dependency graph but also changes audit policy
and remains blocked on separate sequencing. PR #8175 independently
applies the same three version pins and lock metadata; this PR
additionally binds the exact reviewed graph and fail-closed installer
command in the deterministic regression required by #8177. No material
work was transferred between the branches.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: No public API, CLI,
configuration, workflow, default, or supported behavior changes. The
internal dependency review was updated with the exact graph and audit
evidence.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: Exact-head
nine-category security review found no findings. The change advances
exact MIT-licensed registry pins, retains integrity binding, adds
regressions, and preserves the fail-closed audit boundary.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: All six changed files were reviewed on exact head
`330b13d1cc79e61bcfa0eee1f96963143deac55b`.
`tools/mcp-tool-discovery-runtime/dependency-review.md` aligns with the
exact manifest, lock integrities, installer audit boundary, and bundle
scope. The reviewer independently confirmed the
`@hono/node-server@2.0.12` registry identity, unsigned tag and release
commit, three-commit source range, and SLSA attestation binding to
commit `a813b6cdaa15baac3ead84e9e6ed5b72b2353c96`. The final proxy
fixture matches Undici 8.10's forward-proxy behavior, changes no
production behavior, and needs no user-facing `docs/` update. The
reviewed tree `2504a6b78e4447af9734dd34b6ebe81da047d207` matches the
validated maintainer tree, and `git diff --check` passed.
- Agent: Codex Desktop, independent documentation-writer subagent
<!-- docs-review-head-sha: 330b13d -->
<!-- docs-review-agents-blob-sha:
3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable
- Result: Not applicable
- Supporting evidence: Not applicable

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — focused Vitest passed 9/9 on exact
head, including the proxy contract 5/5; exact standalone
`install-reviewed-runtime.sh` completed with 98 package signatures, 12
provenance attestations, runtime tests, type-check, bundle verification,
and 0 audit vulnerabilities.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not applicable to the
isolated lock refresh and proxy test correction. `npm run
checks:repository`, `npm run build:cli`, `npm run typecheck:cli`, Biome,
and normal pre-commit and commit-message hooks passed. Required CI
remains authoritative.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

## Security Review

No findings on exact head `330b13d1cc79e61bcfa0eee1f96963143deac55b`.

| Category | Verdict | Evidence |
|---|---|---|
| Secrets and Credentials | PASS | No credentials, secret-bearing
values, or credential paths changed. |
| Input Validation and Data Sanitization | PASS | Exact manifest,
version, archive URL, integrity, review record, and installer command
assertions reject dependency-graph drift. |
| Authentication and Authorization | PASS | No authentication or
authorization behavior changed. |
| Dependencies and Third-Party Libraries | PASS | Exact MIT-licensed
pins move the reviewed production graph outside the reported advisory
ranges; the standalone audit reports 0 vulnerabilities. |
| Error Handling and Logging | PASS | No production logging or error
surface changed. |
| Cryptography and Data Protection | PASS | SHA-512 package integrity
remains locked; 98 registry signatures and 12 attestations verified. |
| Configuration and Security Headers | PASS | The image's fail-closed
low-severity audit remains unchanged; ports, permissions, users, and
headers are unaffected. |
| Security Testing | PASS | The deterministic image contract binds the
reviewed graph and audit command; the proxy regression covers the Undici
8.10 behavior that failed CI. |
| System Security | PASS | The change removes vulnerable runtime
versions without weakening image or sandbox controls. |

---
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Security**
* Updated security-reviewed runtime components and pinned versions to
address known advisory concerns.
* Strengthened dependency integrity, provenance, and installation
auditing requirements.
* Added automated checks covering dependency versions, integrity
verification, manifests, lockfiles, and audit procedures.
* **Documentation**
* Updated security review records with refreshed validation evidence and
audit results.
* Confirmed the production bundle remains unchanged and free of reported
vulnerabilities.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa
ericksoa merged commit 5f87afa into main Aug 4, 2026
98 of 100 checks passed
@ericksoa
ericksoa deleted the fix/mcp-tool-runtime-audit-8167 branch August 4, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants