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/pchchv/goip
Go package for handling IP addresses and subnets. IPv4 and IPv6.
Working with IP addresses and networks, CIDR, address and subnet operations, iterations, content checks, IP to CIDR block lookup, longest prefix match, creating subnets, spanning, merging, ranges and address tries, with polymorphic code
starting with address or subnet strings
import "github.com/pchchv/goip"
ipv6AddrStr := goip.NewIPAddressString("a:b:c:d::a:b/64")
if ipAddr, err := ipv6AddrStr.ToAddress(); err != nil {
// error validation
} else {
// use the address
}
...or checking for nil:
str := goip.NewIPAddressString("a:b:c:d:e-f:f:1.2-3.3.4/64")
addr := str.GetAddress()
if addr != nil {
// use address
}
starting with host name:
hostStr := "[::1]"
host := goip.NewHostName(hostStr)
if err := host.Validate(); err != nil {
panic(err)
}
// use host
if host.IsAddress() {
fmt.Println("address: " + host.AsAddress().String())
} else {
fmt.Println("host name: " + host.String())
}
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.