Skip to content

patch: NoSQL vulnerability introduced by GraphQL resolvers#56

Merged
petruki merged 1 commit intomasterfrom
staging
Apr 12, 2026
Merged

patch: NoSQL vulnerability introduced by GraphQL resolvers#56
petruki merged 1 commit intomasterfrom
staging

Conversation

@petruki
Copy link
Copy Markdown
Member

@petruki petruki commented Apr 12, 2026

This pull request improves type safety and consistency in the resolver functions and GraphQL type definitions for configuration-related queries. The main changes ensure that IDs and enum values are properly converted to the expected types before being used in MongoDB queries, reducing the risk of runtime errors and improving code reliability.

Type handling and consistency improvements:

  • All _id arguments are now explicitly converted to strings and then to Types.ObjectId before being used in queries, ensuring correct MongoDB ID handling. [1] [2] [3] [4] [5] [6]
  • strategy, operation, key, and name arguments are now converted to strings and validated against their respective enum types (StrategiesType, OperationsType) where applicable, ensuring only valid values are used in queries. [1] [2] [3] [4] [5] [6]

Codebase maintenance:

  • Added missing imports for Types, OperationsType, and StrategiesType in src/aggregator/resolvers.js to support the new type handling logic.

@petruki petruki added this to the v1.1.0 milestone Apr 12, 2026
@petruki petruki self-assigned this Apr 12, 2026
@petruki petruki added patch Updating dependencies security Vulnerability detected labels Apr 12, 2026
@sonarqubecloud
Copy link
Copy Markdown

@petruki petruki merged commit ba59d0b into master Apr 12, 2026
5 checks passed
@petruki petruki deleted the staging branch April 12, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Updating dependencies security Vulnerability detected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant