Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
github.com/petrostrak/building-microservices-with-go/currency
The currency service is a gRPC service which provides up to date exchange rates and currency conversion capabilities.
To build the gRPC client and server interfaces, first install protoc:
sudo apt install protobuf-compiler
sudo apt install golang-goprotobuf-dev
Then install the Go gRPC plugin:
go get google.golang.org/grpc
Then run the build command:
protoc -I protos/ protos/currency.proto --go_out=plugins=grpc:protos/currency
To test the system install grpccurl
which is a command line tool which can interact with gRPC API's
https://github.com/fullstorydev/grpcurl
go install github.com/fullstorydev/grpcurl/cmd/grpcurl
grpcurl --plaintext localhost:9092 list
Currency
grpc.reflection.v1alpha.ServerReflection
grpcurl --plaintext localhost:9092 list Currency
Currency.GetRate
grpcurl --plaintext localhost:9092 describe Currency.GetRate
Currency.GetRate is a method:
rpc GetRate ( .RateRequest ) returns ( .RateResponse );
grpcurl --plaintext localhost:9092 describe .RateRequest
RateRequest is a message:
message RateRequest {
string Base = 1 [json_name = "base"];
string Destination = 2 [json_name = "destination"];
}
grpcurl --plaintext -d '{"base": "GBP", "destination": "USD"}' localhost:9092 Currency/GetRate
{
"rate": 0.5
}
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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.