Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
github.com/speckj8/soft-heap
Soft Heap Implementation in Go
A soft heap is a priority queue data structure that allows for the create, meld (combine two soft heaps) and delete operations to be performed in constant amortized time while the insert operation operates in O(log{1/e}) time, with the caveat that at most e*n elements in the queue have their key (the priority) corrupted (i.e., their value changed from the original).
// A soft heap with integer keys and string values.
// The priority of a value is the inverse of the key.
heap := softheap.New[string]()
heap.Insert(10, "Rome")
heap.Insert(2, "Paris")
heap.Insert(5, "London")
k, v := heap.ExtractMin()
fmt.Printf("%d, %s\n", k, v) // 2, Paris
k, v = heap.ExtractMin()
fmt.Printf("%d, %s\n", k, v) // 5, London
k, v = heap.ExtractMin()
fmt.Printf("%d, %s\n", k, v) // 10, Rome
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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.