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

chore(suite): update mission dependencies #14194

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

Lemonexe
Copy link
Contributor

@Lemonexe Lemonexe commented Sep 6, 2024

Description

Update most Mission-related dependencies:

  • electron-builder
  • simple-git
    • moved to usability dependencies, as it pertains Suite Guide
  • electron-updater
  • varuint-bitcoin

These were not updated:

  • electron 31
  • tiny-secp256k1 WIP in #12261
  • electron-store requires refactoring our electron main process to ES
    • that is possible since electron 28, which we have since #13795, but is out of scope

Besides CI checks ✔️ , I have tested: local suite:dev, suite:dev:desktop, linux build ✔️

ℹ️ For reference, last bump mission deps PR was #13938

Copy link

socket-security bot commented Sep 6, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@electron/rebuild@3.6.0, npm/builder-util@25.0.3

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

@Lemonexe Lemonexe force-pushed the chore/bump-mission-dependencies branch from b283a54 to ec9d643 Compare September 9, 2024 11:00
const result = varuint.decode(buffer, offset);
const { numberValue, bytes } = varuint.decode(buffer, offset);

if (numberValue === null) throw new Error(OUT_OF_RANGE_ERROR);
Copy link
Contributor Author

@Lemonexe Lemonexe Sep 9, 2024

Choose a reason for hiding this comment

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

They also added bigint support, so the lib fn no longer throws error when out of range, but instead returns null number (and non-null bigint number).
In this PR I wanted to keep the same functionality, not refactor our utxo-lib to support bigints (I don't even know if it's needed), so the error is thrown.

@Lemonexe Lemonexe force-pushed the chore/bump-mission-dependencies branch from ec9d643 to 57221d8 Compare September 9, 2024 12:01
@Lemonexe
Copy link
Contributor Author

Lemonexe commented Sep 9, 2024

Concerning socket-security:

  • read-binary-file-arch@1.0.6, a new a transitive dep of electron-builder, code seems legit
  • @electron/rebuild@3.6.0 is a new transitive dep directly from @electron, so I'd trust that?
  • builder-util@25.0.3 is an update of existing dep from electron-builder

@Lemonexe
Copy link
Contributor Author

Lemonexe commented Sep 9, 2024

@SocketSecurity ignore npm/read-binary-file-arch@1.0.6 npm/@electron/rebuild@3.6.0 npm/builder-util@25.0.3

Discussed with @komret , see comment above with explanation

@Lemonexe Lemonexe force-pushed the chore/bump-mission-dependencies branch from 57221d8 to 0353b1a Compare September 9, 2024 12:48
@Lemonexe Lemonexe marked this pull request as ready for review September 9, 2024 12:50
shell.nix Outdated
@@ -8,7 +8,7 @@ with import

let
# unstable packages
electron = electron_30; # use the same version as defined in packages/suite-desktop/package.json
electron = electron; # use the same version as defined in packages/suite-desktop/package.json. Note that the 31 version is named just "electron"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not entirely sure if we want to use it, if it doesn't have specific version... Could it break in future?

Copy link
Contributor

Choose a reason for hiding this comment

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

i think it breaks desktop builds on nixos, but 31.4 should be there already

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, there is electron-chromedriver_31 listed, but not electron_31. They did add it, but only named as electron. At first I thought it's no problem, but you're right, it will break desktop builds when they bump to 32 at nixos repository.

So I'm gonna drop the electron bump from this PR and finish that later. I'll write an email to the maintainers to ask about it 🙂

Copy link
Contributor

@szymonlesisz szymonlesisz left a comment

Choose a reason for hiding this comment

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

update of varuint-bitcoin looks ok 👍

@Lemonexe Lemonexe force-pushed the chore/bump-mission-dependencies branch 2 times, most recently from e90d90d to b5aaad0 Compare September 10, 2024 13:23
@Lemonexe Lemonexe force-pushed the chore/bump-mission-dependencies branch from b5aaad0 to 139c6c3 Compare September 11, 2024 07:04
@Lemonexe Lemonexe merged commit e8e2e59 into develop Sep 11, 2024
86 checks passed
@Lemonexe Lemonexe deleted the chore/bump-mission-dependencies branch September 11, 2024 07:34
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.

3 participants