Skip to content

[Snyk] Security upgrade typeorm from 0.2.45 to 0.3.21 - #561

Open
Robthreefold wants to merge 1 commit into
mainfrom
snyk-fix-795737d19f08d7968440d784fcf7831d
Open

Robthreefold wants to merge 1 commit into
mainfrom
snyk-fix-795737d19f08d7968440d784fcf7831d

Conversation

@Robthreefold

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
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-HIGHLIGHTJS-22744612
  738  

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:

🦉 Regular Expression Denial of Service (ReDoS)

@Robthreefold

Copy link
Copy Markdown
Owner Author

Merge Risk: High

The upgrade of typeorm from version 0.2.45 to 0.3.21 is a major update with significant breaking changes that require mandatory code modifications. This is a high-risk upgrade that will require careful migration.

Key Breaking Changes:

  • DataSource Replaces Connection: The primary method for establishing a database connection has changed. createConnection() and getConnectionManager() are deprecated and have been replaced by the DataSource class. Your application's database initialization logic must be refactored to use new DataSource().initialize().

  • Deprecation of ormconfig.json: Configuration is no longer loaded from ormconfig.json. Instead, you should define your connection options in a DataSource instance, typically in a data-source.ts file.

  • Find API Modifications: Several find methods have been deprecated or changed:

    • The findOne(id) signature has been removed. You must now use findOne({ where: { id } }).
    • getRepository() is deprecated.
    • New helper methods like findOneBy() and findBy() have been introduced for simpler queries.
  • CLI Command Updates: Scripts for running migrations and other CLI operations must be updated. Commands now typically require a -d flag to specify the path to your DataSource configuration file.

  • Dangerous Query Prevention: To prevent accidental data loss, calling update({}) or delete({}) with an empty criteria object will now throw an error instead of affecting all rows in the table.

  • Join Table Naming Strategy: The default naming for many-to-many join tables has changed, which may cause the migration generator to not find existing tables. You may need to explicitly name your join tables using @JoinTable({ name: "your_legacy_table_name" }) to ensure a smooth migration.

Recommendation:
This upgrade cannot be completed without significant developer intervention. A dedicated effort is required to refactor connection management, update all repository find calls, adjust CLI scripts, and test migration paths. Review the official changelogs and migration guides thoroughly before proceeding.

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 issues
✅ Licenses 0 0 0 0 0 issues

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 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.

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 issues
✅ Licenses 0 0 0 0 0 issues

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 issues
✅ Licenses 0 0 0 0 0 issues

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 issues
✅ Licenses 0 0 0 0 0 issues

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 issues
✅ Licenses 0 0 0 0 0 issues

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

⛔ Snyk checks have failed. 1 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (1)
⛔ Open Source Security 0 0 1 0 1 issues
✅ Licenses 0 0 0 0 0 issues

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

@Robthreefold

Robthreefold commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

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

This branch was successfully deployed

1 active deployment
outsystems — 0f9c2f3a Deployed Nov 24, 2026 by Robthreefold via security #206
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