Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented Dec 18, 2025

No description provided.

@Anemy Anemy requested a review from a team as a code owner December 18, 2025 02:47
Copilot AI review requested due to automatic review settings December 18, 2025 02:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the shared ESLint configuration dependency and addresses the lint issues it introduced. The changes primarily focus on preventing prototype pollution vulnerabilities by ensuring object literals don't inherit from Object.prototype, and updating a test assertion to use a more appropriate query method.

  • Bumped @mongodb-js/eslint-config-devtools from version 0.9.12 to 0.11.2
  • Fixed prototype pollution issues by using Object.create(null) or __proto__: null for object literals used as dictionaries
  • Updated test assertion to use queryByLabelText instead of wrapping getByLabelText in an expect-not-throw pattern

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updated ESLint config dependency to version 0.11.2
src/test/suite/views/webview-app/resources-panel.test.tsx Changed test assertion to use queryByLabelText for checking element non-existence
src/test/suite/telemetry/telemetryService.test.ts Added __proto__: null to mappedTypes object literal to prevent prototype pollution
src/mcp/mcpController.ts Added __proto__: null to headers object literal to prevent prototype pollution
src/explorer/connectionTreeItem.ts Changed object literal initialization to Object.create(null) for cache objects
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

databases.sort((a: string, b: string) => a.localeCompare(b));

const newChildrenCache: Record<string, DatabaseTreeItem> = {};
const newChildrenCache: Record<string, DatabaseTreeItem> =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is from pulling in a new rule https://github.com/mongodb-js/devtools-shared/blob/main/configs/eslint-plugin-devtools/rules/no-plain-object-records.js

We added in mongodb-js/devtools-shared#604
The rule might not be suggesting quite the right fix here though, it's breaking the ts check in other places when it's applied. Looking into it a bit more.

@Anemy Anemy added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Dec 18, 2025
@Anemy Anemy requested a review from tculig December 18, 2025 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants