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/cdillond/cms
I created this to play around with channels in Go. It should not be considered production ready. This package is intended to be as general and adaptable as possible, so it provides very little in the way of specific features.
// implement the Message interface
type ExampleMessage struct {
Id string
Content string
Time time.Time
}
func (e ExampleMessage) UpdateAt() time.Time {
return e.Time
}
func (e ExampleMessage) ContentId() string {
return e.Id
}
// realistically, the Publish() method will contain more complicated logic
func (e ExampleMessage) Publish() error {
fmt.Println(e.Content)
return nil
}
// implement the ErrorHandler interface
type ExampleErrorHandler struct{}
func (e ExampleErrorHandler) HandleError(err error, msg msgq.Message) {
fmt.Println(err.Error(), msg)
}
func main() {
MsgQ := msgq.New()
listenChan, done := MsgQ.Run()
//TODO more complex example
source := []ExampleMessage{{"1","content", time.Now().Add(time.Second)}, {"2", "content 2", time.Now()}}
for _, msg := range source {
listenChan <- msg
}
// wait for messages to be published
time.Sleep(3*time.Second)
// shut down
close(listenChan)
<- done
}
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.