Skip to content

chore(utxo-lib): uprgade tiny-secp256k1#12261

Closed
peter-sanderson wants to merge 1 commit intodevelopfrom
dependency-tiny-secp256k1
Closed

chore(utxo-lib): uprgade tiny-secp256k1#12261
peter-sanderson wants to merge 1 commit intodevelopfrom
dependency-tiny-secp256k1

Conversation

@peter-sanderson
Copy link
Copy Markdown
Contributor

Description

Related Issue

Resolve #7612

Screenshots:

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 3, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Filesystem access npm/is-wsl@1.1.0
  • orphan: npm/is-wsl@1.1.0
Floating dependency npm/@types/fs-extra@9.0.13
  • orphan: npm/@types/fs-extra@9.0.13
Floating dependency npm/@types/yargs@15.0.19
  • orphan: npm/@types/yargs@15.0.19
Floating dependency npm/@types/hast@3.0.4
  • orphan: npm/@types/hast@3.0.4
Floating dependency npm/@types/react@18.3.1
  • orphan: npm/@types/react@18.3.1

View full report↗︎

Next steps

What is filesystem access?

Accesses the file system, and could potentially read sensitive data.

If a package must read the file system, clarify what it will read and ensure it reads only what it claims to. If appropriate, packages can leave file system access to consumers and operate on data passed to it instead.

What are floating dependencies?

Package has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.

Packages should specify properly semver ranges to avoid version conflicts.

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

  • @SocketSecurity ignore npm/is-wsl@1.1.0
  • @SocketSecurity ignore npm/@types/fs-extra@9.0.13
  • @SocketSecurity ignore npm/@types/yargs@15.0.19
  • @SocketSecurity ignore npm/@types/hast@3.0.4
  • @SocketSecurity ignore npm/@types/react@18.3.1

@peter-sanderson peter-sanderson force-pushed the dependency-tiny-secp256k1 branch from 3a144af to 0abe083 Compare May 3, 2024 13:40
@peter-sanderson peter-sanderson force-pushed the dependency-tiny-secp256k1 branch from 0abe083 to c045dcc Compare May 3, 2024 14:58
@komret
Copy link
Copy Markdown
Contributor

komret commented Aug 22, 2024

Keep going! 💪

Copy link
Copy Markdown
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.

as we introduce new external file (wasm) this change should be carefully tested in multiple enviroments (for example by signing testnet transaction)

on desktop:
suite-web, suite-desktop, connect-popup, connect-webextension, connect-explorer

on mobile:
suite-mobile app, suite-web in browser, connect-popup in browser

: []),
],
// For tiny-secp256k1
experiments: { asyncWebAssembly: true },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it required by tiny-secp256k1 or optional? if required then this should be added to all the projects which are using utxo-lib (connect, connect-iframe, connect-popup, connect-explorer)

i know that we build some other wasm files (cardano?), will this have effect on them as well?


get privateKey(): Buffer | undefined {
return this.__D;
return uin8ArrayToBuffer(this.__D) ?? undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this needed? this.__D is defined as Buffer and should be a Buffer.

this comment applies for all the usage of uin8ArrayToBuffer in this file

? Buffer
: T extends null
? null
: undefined;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

note te me - to be discussed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependencies: tiny-secp256k1

5 participants