Repository navigation
fix(security): clear zod and fast-uri bun audit findings - #2709
Merged
nborges-aws merged 1 commit intoOct 26, 2026
Merged
Conversation
`bun run audit` fails the verify workflow: - GHSA-mrhx-c7xc-m3w5 (high): zod <4.6.6. The root copy resolved to 4.5.4, and @aws/agent-inspector pulls zod@3.25.76 through @ag-ui/core@^0.0.52. zod 3 has no patched release. - GHSA-w74x-v6f9-j3xg, GHSA-xhq7-xmqj-769h, GHSA-wjr9-j795-jxcr, GHSA-333x-w4r6-6crp (moderate/low): fast-uri 3.1.8 and 4.1.5. Update the lockfile to zod 4.6.7, fast-uri 3.1.9 and 4.2.3, all within existing ranges. Add a scoped @ag-ui/core override to zod ^4.6.6; that copy is never loaded at runtime because agent-inspector ships only a prebuilt browser bundle. bun audit no longer reports GHSA-vfj7-8cjw-p6xm (braces), so drop the --ignore and its tech-debt deadline test.
5 tasks done
Contributor
Package TarballHow to installgh release download pr-2709-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.0.0.tgz |
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
I verified the substance of this change rather than just the diff shape:
- braces
GHSA-vfj7-8cjw-p6xmis withdrawn (withdrawn_at: 2026-10-23), so removing the--ignoreand thesrc/techDebt.test.tsdeadline is correct — braces stays at 3.0.3 and audit won't flag it. - zod
GHSA-mrhx-c7xc-m3w5is< 4.6.6with patch4.6.6, which also covers zod 3.x with no zod-3 fix, so the scoped@ag-ui/core → zod ^4.6.6override is the only non-ignore way to clear it. Rootzod@4.6.7still satisfies the declared^4.4.3. - fast-uri 3.1.9 / 4.2.3 are the first patched versions for every active fast-uri advisory, and no other fast-uri entries remain in the lockfile.
- Lockfile looks genuinely regenerated: registry
dist.integrityforzod@4.6.7,fast-uri@3.1.9andfast-uri@4.2.3match the hashes in the diff byte-for-byte, and the@ag-ui/core/zod@3.25.76entry is gone with the override recorded in the lock'soverridesblock. - The major-version override is safe.
@ag-ui/core@0.0.52declareszod ^3.22.4, so this override intentionally violates its range — but I unpacked@aws/agent-inspector@0.6.2from the registry and it ships onlydist-assets/(prebuiltindex.js/index.css/index.html) with nomain,module, orexports.src/core/dev/inspectorAssets.tsandscripts/build.tsonly ever read those files, so@ag-ui/coreis never imported and the forced zod 4 can't affect runtime behavior.
No changes required. Two non-blocking follow-ups for whenever someone touches this area:
overridesonly apply to the root project, so users installing the published package still resolve@aws/agent-inspector → @ag-ui/core → zod@3.25.76and will see the advisory in their ownnpm audit. Since the inspector is consumed purely as build-time staged assets (thenode_modules/.../dist-assetspath ininspectorAssets.tsis only the run-from-source fallback), moving@aws/agent-inspectortodevDependencieswould drop that whole subtree — including the fiveeslint-plugin-*runtime deps it declares — from end-user installs.- The override is a workaround for an upstream dep that will presumably go away when agent-inspector updates
@ag-ui/core; atechDebtTestdeadline (the helper insrc/testing/techDebt.tsis now unused) would make sure it gets revisited rather than lingering indefinitely.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2709 +/- ##
============================================
- Coverage 96.62% 96.54% -0.08%
============================================
Files 706 706
Lines 58447 58561 +114
============================================
+ Hits 56472 56540 +68
- Misses 1975 2021 +46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nborges-aws
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the failing
bun run auditstep in the verify workflow (https://github.com/aws/agentcore-cli/actions/runs/40371695677/job/121743823554).^4.4.3). Added a scoped@ag-ui/core→zod ^4.6.6override for thezod@3.25.76that@aws/agent-inspectorpulls in, since zod 3 has no patched release. That copy is never loaded at runtime: agent-inspector ships only a prebuilt browser bundle.bun auditno longer reports it, so I dropped the--ignoreand thesrc/techDebt.test.tsdeadline (which would have started failing on 2026-10-27).The lockfile diff is limited to the affected entries plus the override (13 lines), and
bun install --frozen-lockfileaccepts it.Companion PR for
main: #2708Type of Change
Testing
bun run audit(no ignores): no vulnerabilities foundbun install --frozen-lockfilebun run typecheck,bun run lint:checkbun test: 4709 pass, 0 fail