
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
gitlab.com/mjwhitta/safety
Advanced tools
This Go module provides some thread-safe utilities.
Open a terminal and run the following:
$ go get --ldflags="-s -w" --trimpath -u gitlab.com/mjwhitta/safety
package main
import (
hl "gitlab.com/mjwhitta/hilighter"
"gitlab.com/mjwhitta/safety"
)
func main() {
var m *safety.Map = safety.NewMap()
var s *safety.Set = safety.NewSet()
var sl *safety.Slice = safety.NewSlice()
// Maps
m.Put("a", "asdf")
m.Put("b", "blah")
m.Put("s", "stop")
m.Put("t", "test")
m.Range(
func(k, v interface{}) bool {
switch v.(string) {
case "stop":
return true
}
hl.Printf("%s = %s\n", k.(string), v.(string))
return false
},
)
hl.Println(m.Keys())
// Sets
s.Add("asdf")
s.Add("blah")
s.Add("stop")
s.Add("test")
s.Range(
func(entry interface{}) bool {
switch entry.(string) {
case "stop":
return true
}
hl.Printf("Set includes: %s\n", entry.(string))
return false
},
)
hl.Println(s.Get())
// Slices
sl.Append("asdf")
sl.Append("blah")
sl.Append("stop")
sl.Append("test")
sl.Range(
func(i int, v interface{}) bool {
switch v.(string) {
case "stop":
return true
}
hl.Printf("Slice %d: %s\n", i, v.(string))
return false
},
)
hl.Println(sl.Get(0))
}
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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.