Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/jimyj/go-queue
go-queue is task queue for concurrency(go-queue 是一个通用的并发通道,可以自定义同时并发数和自定义并发任务)
go get github.com/JimYJ/go-queue
import:
import "github.com/JimYJ/go-queue"
init and use:
func main() {
queue.Debug() // show log
queue.InitQueue(2, true, true) // frist param means max concurrent.
// if second param is true,means main goroutine will wait that all queue done.
// if third param is true, means every error or timeout will retry 3 times.
queue.SetConcurrentInterval(1 * time.Millisecond) // set interval time for each concurrent, default 0
for i := 0; i < 10; i++ {
job := new(queue.Job)
job.ID = int64(i)
job.FuncQueue = youfunc
job.Payload = []interface{}{100, 50}
queue.Push(job)
}
queue.Done()
log.Println(queue.FailList)
}
func youfunc(value ...interface{}) error { //you func must meet type Func func(value ...interface{})error
//dosomething
return errors.New("error info")
}
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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.