Skip to content

[Snyk] Security upgrade typeorm from 0.2.25 to 0.3.31#102

Open
cdobru wants to merge 1 commit into
mainfrom
snyk-fix-83f11030e8afc94b0e21c82f7e8bcbfa
Open

[Snyk] Security upgrade typeorm from 0.2.25 to 0.3.31#102
cdobru wants to merge 1 commit into
mainfrom
snyk-fix-83f11030e8afc94b0e21c82f7e8bcbfa

Conversation

@cdobru

@cdobru cdobru commented Jul 23, 2026

Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json
  • package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Arbitrary Code Injection
SNYK-JS-TYPEORM-18170276
  758  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

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
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Arbitrary Code Injection

@cdobru

cdobru commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

Merge Risk: High

The upgrade from TypeORM v0.2.x to v0.3.x is a major version jump with significant breaking changes that require substantial code refactoring. The changes span from API renaming and deprecations to configuration and environment updates.

Key Breaking Changes:

  • DataSource Replaces Connection: The primary way to configure and establish a database connection has changed. createConnection() is deprecated in favor of instantiating a new DataSource object.
  • Repository and Find Method Changes: getRepository() is deprecated. You should now use dataSource.getRepository(). The findOne(id) and findOne() (with no arguments) method signatures have been removed. You must now use findOne({ where: { id } }).
  • Configuration Files: Support for ormconfig.json is deprecated. Configuration should be managed through a DataSource instance, often exported from a data-source.ts file.
  • Node.js Requirement: The compilation target was updated, requiring Node.js v14 or higher.
  • CLI and Migrations: The CLI commands for migrations have been simplified but require pointing to the new DataSource file using a -d flag.

Source: TypeORM CHANGELOG, Migration discussions

Recommendation: This is a high-effort migration. Developers must update connection logic to use DataSource, refactor all repository access and find method calls, and update their CLI scripts for migrations. Due to the extensive nature of these changes, this upgrade should be handled in a separate, dedicated effort before merging.

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@cdobru

cdobru commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

Snyk checks have failed. 13 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (13)
Open Source Security 0 5 8 0 13 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cdobru

cdobru commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

Snyk checks have failed. 13 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (13)
Open Source Security 0 5 8 0 13 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

2 participants