Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/ibinarytree/proto
Package in Go for parsing Google Protocol Buffers [.proto files version 2 + 3] (https://developers.google.com/protocol-buffers/docs/reference/proto3-spec)
go get -u -v github.com/emicklei/proto
package main
import (
"fmt"
"os"
"github.com/emicklei/proto"
)
func main() {
reader, _ := os.Open("test.proto")
defer reader.Close()
parser := proto.NewParser(reader)
definition, _ := parser.Parse()
proto.Walk(definition,
proto.WithService(handleService),
proto.WithMessage(handleMessage))
}
func handleService(s *proto.Service) {
fmt.Println(s.Name)
}
func handleMessage(m *proto.Message) {
fmt.Println(m.Name)
}
Current parser implementation is not completely validating .proto
definitions.
In many but not all cases, the parser will report syntax errors when reading unexpected charaters or tokens.
Use some linting tools (e.g. https://github.com/uber/prototool) or protoc
for full validation.
See proto-contrib for other contributions on top of this package such as protofmt, proto2xsd and proto2gql.
protobuf2map is a small package for inspecting serialized protobuf messages using its .proto
definition.
© 2017, ernestmicklei.com. MIT License. Contributions welcome.
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.