Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Security upgrade mongoose from 5.11.10 to 5.12.3 #1538

Merged
merged 3 commits into from
Apr 6, 2021

Conversation

snyk-bot
Copy link
Contributor

@snyk-bot snyk-bot commented Apr 1, 2021

Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.

Fixes #1532

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • package.json
    • package-lock.json

Vulnerabilities that will be fixed

With an upgrade:
Severity Priority Score (*) Issue Breaking Change Exploit Maturity
high severity 768/1000
Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 7.5
Prototype Pollution
SNYK-JS-MQUERY-1089718
No Proof of Concept

(*) Note that the real score may have changed since the PR was raised.

Commit messages
Package name: mongoose The new version differs by 250 commits.
  • f8d2721 chore: release 5.12.3
  • 58cad73 fix(connection): use queueing instead of event emitter for `createCollection()` and other helpers to avoid event emitter warning
  • 5382408 fix(index.d.ts): add `transform` to PopulateOptions interface
  • dca1d70 Merge branch 'master' of github.com:Automattic/mongoose
  • 2648088 fix(index.d.ts): add DocumentQuery type for backwards compatibility
  • 966770f Merge pull request #10063 from Automattic/gh-10044
  • 9e4a083 style: fix lint
  • f3cd3a8 chore: use variable instead of function
  • f24953c fix(query): add `writeConcern()` method to avoid writeConcern deprecation warning
  • 7d2e9c9 chore: upgrade mquery -> 3.2.5 re: Security Fix for Prototype Pollution - huntr.dev mongoosejs/mquery#121
  • d1a9a1e made requested changes
  • cf1b666 Merge pull request #10078 from pezzu/master
  • 2aef528 Merge pull request #10062 from Automattic/gh-10025
  • 452c77c Fixes #10072
  • c9bfb30 Update model.indexes.test.js
  • 6f0133a removed comments
  • 9e98cd8 Merge pull request #10055 from emrebass/patch-1
  • 1c20044 Merge pull request #10054 from coro101/add-discriminator-type
  • 4e74ea7 TIL that includes() is also not supported in all browsers
  • f231d7b should work and is designed to handle multiple text fields
  • c4897f9 TIL Object.values in not supported on all browsers
  • 391ecec collation not added to text indexes
  • 7a93c16 linter fix
  • 6deb668 fix: connection ids are now scoped

See the full diff

Check the changes in this PR to ensure they won't cause issues with your project.


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report

🛠 Adjust project settings

📚 Read more about Snyk's upgrade and patch logic

@LoneRifle LoneRifle requested review from karrui and mantariksh April 6, 2021 02:29
@LoneRifle LoneRifle force-pushed the snyk-fix-7575fc7d4cf936e7b599718c2a623e28 branch from 918a39f to 8d84d09 Compare April 6, 2021 02:49
- recast FormSchema as FormDocumentSchema so that we can
  register methods specific to the handling of IFormDocument
- declare Schema.Types.DocumentArrayWithLooseDiscriminator
  so that we can more easily register our sub-schema

TODO - submit a patch to mongoose to loosen the type def for
`DocumentArray.discriminator()`
@LoneRifle LoneRifle force-pushed the snyk-fix-7575fc7d4cf936e7b599718c2a623e28 branch from 8d84d09 to aa7729e Compare April 6, 2021 02:59
Copy link
Contributor

@mantariksh mantariksh left a comment

Choose a reason for hiding this comment

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

lgtm, thank you for picking this up and adding the explanations!

@tshuli tshuli merged commit 6d276bf into develop Apr 6, 2021
@tshuli tshuli deleted the snyk-fix-7575fc7d4cf936e7b599718c2a623e28 branch April 6, 2021 03:20
tshuli pushed a commit that referenced this pull request Apr 6, 2021
* fix: package.json & package-lock.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MQUERY-1089718

* refactor(mongoose): rework type defs

* refactor(models): rework form.server.model for mongoose

- recast FormSchema as FormDocumentSchema so that we can
  register methods specific to the handling of IFormDocument
- declare Schema.Types.DocumentArrayWithLooseDiscriminator
  so that we can more easily register our sub-schema

TODO - submit a patch to mongoose to loosen the type def for
`DocumentArray.discriminator()`

Co-authored-by: LoneRifle <[email protected]>
@tshuli tshuli mentioned this pull request Apr 6, 2021
@karrui karrui mentioned this pull request Apr 13, 2021
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.

Upgrade mongoose to >= 5.12.2
4 participants