Skip to content

DEV3-4806 Fix security vulnerabilities in dependencies#1658

Open
arturfromtabnine wants to merge 2 commits intomasterfrom
DEV3-4806-fix-security-vulnerabilities
Open

DEV3-4806 Fix security vulnerabilities in dependencies#1658
arturfromtabnine wants to merge 2 commits intomasterfrom
DEV3-4806-fix-security-vulnerabilities

Conversation

@arturfromtabnine
Copy link
Copy Markdown

@arturfromtabnine arturfromtabnine commented Mar 23, 2026

Summary

This PR addresses 19 security vulnerabilities identified by Snyk in project dependencies by upgrading direct dependencies and adding yarn resolutions for transitive dependencies.

Snyk scan result after this PR: ✅ No vulnerable paths found

Changes

Direct Dependency Upgrades

Package Before After Upgrade Type Vulnerabilities Fixed
axios ^0.21.0 ^1.12.0 Major Prototype Pollution (High), CSRF (High), SSRF (Medium x2), ReDoS (Medium), Resource Allocation (Medium)
systeminformation ^5.6.10 ^5.31.0 Minor Command Injection (Critical), Command Injection (High x2), Arbitrary Code Injection (Medium)
diff ^5.0.0 ^5.2.2 Patch ReDoS (Medium)
tmp ^0.2.1 ^0.2.4 Patch Symlink Attack (Medium)
underscore ^1.13.6 ^1.13.8 Patch Uncontrolled Recursion (High)

Transitive Dependency Resolutions (via yarn resolutions)

Package Before After Vulnerabilities Fixed
brace-expansion 1.1.11 1.1.12 ReDoS (Low)
minimatch 3.1.2 3.1.3 ReDoS (High), Inefficient Algorithmic Complexity (High)
follow-redirects 1.15.3 1.15.9 Improper Handling of Extra Parameters (High), Information Exposure (Medium)

New Files Added

File Purpose
.yarnrc.yml Yarn Berry (v4.x) configuration file. Contains nodeLinker: node-modules setting which tells Yarn 4 to use the traditional node_modules installation strategy (instead of Plug'n'Play) for compatibility with the existing project setup. This file was auto-generated when running yarn install with Yarn 4.x.
.gitignore update Added .yarn/install-state.gz to gitignore. This is a Yarn Berry cache file that stores the install state for faster subsequent installs - it should not be committed as it's machine-specific and regenerated automatically.

Test Plan

1. Build Verification

  • Run yarn build - verify no compilation errors
  • Run yarn lint - verify no new lint errors
  • Run yarn test - verify all unit tests pass

2. Code Review API Testing (src/codeReview/api.ts)

  • Verify supportedExtensions() returns extensions list correctly
  • Verify querySuggestions() POST request works with proper payload/response
  • Test timeout behavior (30s) on slow responses
  • Test error handling on network failures

3. Chat WebView Dev Mode (src/tabnineChatWidget/ChatViewProvider.ts)

  • In dev mode, verify localhost:3000 HTML fetching works
  • Verify error message appears when localhost:3000 is unavailable

4. Axios 1.x Specific Testing (Major Upgrade)

  • Verify response.data access works as expected
  • Verify error objects have correct shape (error.response, error.message)
  • Test HTTP error handling (4xx/5xx responses)

5. E2E Smoke Test

  • Install extension in VS Code
  • Verify Tabnine chat functionality works
  • Verify code review features work (if applicable)

References


🤖 Generated with Claude Code

arturfromtabnine and others added 2 commits March 23, 2026 11:02
Upgrade direct dependencies and add yarn resolutions to fix 19 security
vulnerabilities identified by Snyk.

Direct dependency upgrades:
- axios: ^0.21.0 → ^1.12.0 (major)
- diff: ^5.0.0 → ^5.2.2 (patch)
- systeminformation: ^5.6.10 → ^5.31.0 (minor)
- tmp: ^0.2.1 → ^0.2.4 (patch)
- underscore: ^1.13.6 → ^1.13.8 (patch)

Transitive dependency resolutions:
- brace-expansion: 1.1.11 → 1.1.12
- minimatch: 3.1.2 → 3.1.3
- follow-redirects: 1.15.3 → 1.15.9

Also adds .yarnrc.yml for Yarn 4.x compatibility and updates .gitignore
to exclude Yarn Berry cache files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a reusable skill for fixing security vulnerabilities in transitive
dependencies using yarn resolutions, focusing on patch/minor upgrades
to avoid breaking changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant