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/fenderdigital/logrus-redis-hook
Useful for centralized logging, using a RELK stack (Redis, Elasticsearch, Logstash and Kibana). When the hook is installed, all log messages are sent to a Redis server, in Logstash message V0 or V1 format, ready to be parsed/processed by Logstash.
$ go get github.com/rogierlommers/logrus-redis-hook
package main
import (
log "github.com/sirupsen/logrus"
"github.com/rogierlommers/logrus-redis-hook"
)
func init() {
hook, err := logredis.NewHook("localhost", 6379, "my_redis_key", "my_app_name")
if err == nil {
log.AddHook(hook)
}
}
func main() {
// when hook is injected succesfully, logs will be send to redis server
log.Info("just some logging...")
}
type LogstashMessageV0 struct {
Type string `json:"@type,omitempty"`
Timestamp string `json:"@timestamp"`
Sourcehost string `json:"@source_host"`
Message string `json:"@message"`
Fields struct {
Application string `json:"application"`
File string `json:"file"`
Level string `json:"level"`
} `json:"@fields"`
}
type LogstashMessageV1 struct {
Type string `json:"@type,omitempty"`
Timestamp string `json:"@timestamp"`
Sourcehost string `json:"host"`
Message string `json:"message"`
Application string `json:"application"`
File string `json:"file"`
Level string `json:"level"`
}
Please see the docker-compose
directory for information about how to test. There is a readme inside.
MIT
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.