Remediate audit findings, replace vulnerable Firecrawl SDK, and harden release validation#1030
Remediate audit findings, replace vulnerable Firecrawl SDK, and harden release validation#1030jatmn wants to merge 6 commits intoGitlawb:mainfrom
Conversation
Add a post-publish npm verification step to the release workflow so GitHub releases fail if the npm latest tag does not resolve to the expected version within the retry window. Update dependency pins to remediate the audit findings by moving axios to 1.16.0, upgrading the Anthropic SDK to 0.94.0, and bumping the Bedrock and Vertex wrapper packages so Bun installs dedupe onto the patched SDK. Replace the @mendable/firecrawl-js dependency with a small in-repo fetch-based Firecrawl client used by WebFetchTool and the Firecrawl web-search provider. Preserve self-hosted support, add transient 502 retry/backoff behavior, and cover the new client with focused tests. Validation: - bun test src/tools/firecrawl/client.test.ts src/tools/WebSearchTool/providers/firecrawl.test.ts - bun run build - bun run smoke - packed-install npm audit --omit dev --json returned 0 vulnerabilities
Fix shared-module test leaks that were breaking providerProfile in the full serialized Bun suite. - preserve full module surfaces when mocking env/provider modules - remove unnecessary env/envUtils mocks from user/install surface tests - use a fresh providerProfile module import for the Codex OAuth cleanup regression - relax the Windows-only permission assertion in providerProfile tests Validation: - bun install --frozen-lockfile - bun test --max-concurrency=1 - bun run smoke - bun run build - npm pack
techbrewboss
left a comment
There was a problem hiding this comment.
I found one release-validation blocker while testing this PR.
Fix the remaining cross-file Bun mock leak reported in review by expanding the persisted execa mock in src/utils/user.test.ts to include execaSync. This keeps later imports that touch secure-storage and exec helpers from failing or hanging when bun test runs files serially after user.test.ts. Validation: - bun test src/utils/user.test.ts src/utils/effort.codex.test.ts - bun test --max-concurrency=1 - bun run build - bun run smoke - npm pack
|
Rereviewed latest head Current repros: bun test src/utils/user.test.ts src/utils/effort.codex.test.ts
bun test src/utils/user.test.ts src/utils/openclaudeInstallSurfaces.test.tsCurrent failures include: So the fix needs to address the underlying process-global partial mock leakage, not just add |
Convert the auth, config, cwd, and execa mocks in src/utils/user.test.ts into pass-through mocks with targeted overrides. This fixes the remaining Bun process-global mock leakage where later suites could fail or hang after user.test.ts because leaked partial mocks were missing exports such as auth/config helpers or execaSync. Validation: - bun test src/utils/user.test.ts src/utils/effort.codex.test.ts - bun test src/utils/user.test.ts src/utils/openclaudeInstallSurfaces.test.ts - bun test --max-concurrency=1
should be fixed now |
|
Rereviewed latest head Good news: the cross-file mock issue is fixed now. These repros all pass for me: bun test src/utils/user.test.ts src/utils/effort.codex.test.ts
bun test src/utils/user.test.ts src/utils/openclaudeInstallSurfaces.test.ts
bun test --max-concurrency=1 src/utils/user.test.ts src/utils/effort.codex.test.ts src/utils/openclaudeInstallSurfaces.test.ts src/utils/providerProfile.test.tsI also verified: bun test src/tools/firecrawl/client.test.ts src/tools/WebSearchTool/providers/firecrawl.test.ts
bun test src/tools/WebFetchTool
bun run smokeOne remaining issue, though:
|
Add a top-level override for ip-address and refresh bun.lock so the MCP SDK -> express-rate-limit path resolves to ip-address@10.2.0 instead of 10.1.0. This keeps the branch's audit-remediation scope aligned with the remaining transitive advisory path without changing the direct MCP SDK pin. Validation: - bun pm why ip-address - bun audit
cant fully resolve that one, updated to more recent version but a dependent in the chain we dont control is still out of date. So audit isnt fully green.. think we should come back in a week or so and re-run this audit for possible fixes then as well. |
Vasanthdev2004
left a comment
There was a problem hiding this comment.
Scope: Targeted review of current merge readiness only.
Verdict: Needs changes
This PR is currently DIRTY against main, so it cannot merge as-is and the final diff may change during conflict resolution. Please rebase/merge latest main and resolve the conflicts, then ping for a full review of the dependency, Firecrawl replacement, release workflow, and test-isolation changes.
Notes from the current state:
- The stated scope is important and worth doing: dependency audit remediation, replacing the vulnerable Firecrawl SDK path, and release verification hardening.
- Current GitHub checks are green, but they are from the pre-conflict head.
- Kevin has approved, but I do not want to overclaim a full approval until the conflict-resolved head is available.
Happy to re-review once the branch is clean.
updated. |
Summary
This PR addresses the dependency and release issues fixed on
deps-updateThe main goal was to resolve the
npm auditfindings reported against@gitlawb/openclaude, remove the vulnerable Firecrawl SDK path, and make the release path more reliable after the npmlatestmismatch reported in issue#1027.What prompted this PR
Running
npm auditagainst the installed package reported:@anthropic-ai/sdkvulnerabilities affecting versions0.79.0 - 0.91.0axiosvulnerabilities affecting versions1.0.0 - 1.15.1@mendable/firecrawl-jsThis branch addresses those findings in the package graph OpenClaude ships to consumers, and also hardens the release flow so a GitHub release does not succeed if npm has not actually updated
latestto the expected version yet.What changed
@anthropic-ai/sdkfrom0.81.0to0.94.0axiosfrom1.15.0to1.16.0@anthropic-ai/bedrock-sdkfrom0.26.4to0.29.1@anthropic-ai/vertex-sdkfrom0.14.4to0.16.0bun.lockso Bun-based installs dedupe the Bedrock/Foundry/Vertex wrappers onto the patched Anthropic SDK path.@mendable/firecrawl-jsentirely frompackage.json.src/tools/WebFetchTool/WebFetchTool.tssrc/tools/WebSearchTool/providers/firecrawl.tsAbortSignalsupport for request cancellation502retry/backoff handling.github/workflows/release.ymlso the release job fails if npm does not resolve both the package version anddist-tags.latestto the expected release version within the retry window.env/envUtilsmocks from tests that did not need themproviderProfilemodule importproviderProfiletestsUser impact
@gitlawb/openclaudeno longer inherit the vulnerable Firecrawl SDK dependency path from this package.latesttag.Validation
bun install --frozen-lockfilebun test --max-concurrency=1bun run smokebun run buildnpm packBranch scope
This PR description covers only the branch-local work on
deps-update: