fix: resolve security vulnerabilities and add unit tests for all tools#260
Merged
gaurav-singh-9227 merged 1 commit intobrowserstack:mainfrom Apr 3, 2026
Conversation
… unit tests for all tools - Upgrade all direct dependencies to latest stable versions (axios 1.14.0, browserstack-local 1.5.12, zod 4.3.6, webdriverio 9.27.0, etc.) - Resolve all 12 npm audit vulnerabilities (0 remaining) - Fix missing isError flag in error responses for rca-agent, automate, selfheal, appautomate tools - Add 10 new unit test files covering all previously untested tool modules (accessibility, automate, bstack-sdk, build-insights, list-test-files, percy-sdk, rca-agent, review-agent, run-percy-scan, selfheal) - Total test coverage: 123 tests across 16 files (up from 77 tests across 6 files) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gaurav-singh-9227
approved these changes
Apr 3, 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.
Summary
isError: trueflag in error responses across 4 tool modules (rca-agent, automate, selfheal, appautomate)Dependency Upgrades
@modelcontextprotocol/sdkaxios__proto__(CVSS 7.5)browserstack-localcsv-parsedotenvpinowebdriveriozodTransitive fixes: basic-ftp (CVSS 9.1), fast-xml-parser (critical), undici, lodash, minimatch, picomatch, rollup, flatted, ajv, brace-expansion
Bug Fixes
isError: trueto error responses inrca-agent.ts,automate.ts,selfheal.ts,appautomate.ts— previously these returned error text without the MCP protocol error flagNew Unit Tests (10 files, 46 new tests)
accessibility.test.tsautomate.test.tsbstack-sdk.test.tsbuildInsights.test.tslistTestFiles.test.tspercySdk.test.tsrcaAgent.test.tsreviewAgent.test.tsrunPercyScan.test.tsselfheal.test.tsTotal: 123 tests across 16 files (up from 77 across 6)
Test Plan
npm auditreports 0 vulnerabilities