-
Notifications
You must be signed in to change notification settings - Fork 773
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
Address security vulnerabilities #2912
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks already pretty good, thanks for tackling! 🤩
(1-2 CI runs failing, just to mention)
"peer-id": "^0.14.3", | ||
"@multiformats/multiaddr": "^12.1.3", | ||
"@libp2p/interface-peer-id": "2.0.2", | ||
"@libp2p/peer-id-factory": "2.0.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @acolytec3 can confirm, but we removed libp2p completely from the core build, so I would think these two dependencies shouldn't show up here at all? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on how we're using peer-id
. That library got radically changed a while back so you might need that factory for even our limited usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly found in client/libp2pBrowserBuild
import { sscanf } from 'scanf' | ||
|
||
import { keccak256, toNewUint8Array } from '../util.js' | ||
|
||
import type { PeerInfo } from '../types.js' | ||
|
||
const Convert = require('multiaddr/src/convert') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, another require gone, great! 😃
@@ -61,7 +61,6 @@ | |||
}, | |||
"devDependencies": { | |||
"@ethereumjs/genesis": "0.1.0-rc.1", | |||
"0x": "^4.9.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am personally ok with dropping the 0x
dependency, this was added for convenience I guess when we were very much into "flame-graphing" 😂, but I guess it's totally ok respectively likely better if such a tools are just installed in a global scope by everyone who uses them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it wasn't in use anywhere that i could find 🤷
and it was responsible for like 9 vulnerabilities 😆
So some potential bad news on the front of trying to upgrade the |
So just to follow up, I'd be a fan of backing out the |
Ok, I'll rewind that change and make an issue about it for future us. |
oh, actually it did, 🙄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think we might be able to get rid of the peerId stuff entirely but that can be a further PR as needed.
Addressing 12 vulnerabilities re issue: #2903
Require
peer-id
dependencyUpdatemultiaddr
dependency to@multiformats/multiaddr
0x
dependencyALL REMAINING VULNERABILITIES
caused by:
multiaddr
v10.0.01 is deprecatedto be replaced by
@multiformats/multiaddr