
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
github.com/njayp/heaps
The goal is to build upon container/heap
for easier usage. Specifically:
To accomplish this, this library implements a generic array that satisfies the heap
interface. This array is then wrapped with container/heap
functionality.
go get github.com/njayp/heaps
Create a heap of custom structs
// define custom struct
type item struct {
value int
}
// a function for comparing structs
less := func(a, b item) bool {
return a.value < b.value
}
// init heap with data
heap := heaps.NewHeap(less,
item{value: 1},
item{value: 2},
)
// use heap
min := heap.Pop() // item{value: 1}
Or use a preset heap
// init heap with data
heap := heaps.NewMaxHeap(0, 1, 2)
// use heap
max := heap.Pop() // 2
Using a generic array allows us to add Peek
functionality, as the root of the heap will always be at index zero.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.