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/asyncapi/parser-go
The AsyncAPI Parser validates AsyncAPI documents according to dedicated schemas. The supported schemas are:
Documents provided for the AsyncAPI Parser can be in the .yaml
or .json
formats. If a document is invalid, the parser provides a message listing all errors. If a document is valid, the parser provides dereferenced output. During the dereference process the AsyncAPI parser substitutes a reference with a full definition. The dereferenced output is always in the .json
format.
:warning: This package doesn't support AsyncAPI 1.x anymore. We recommend to upgrade to the latest AsyncAPI version using the AsyncAPI converter. If you need to convert documents on the fly, you may use the Node.js or Go converters.
To install the AsyncAPI Parser package, run:
go get github.com/asyncapi/parser-go/...
TIP: You can also get binaries from the latest GitHub release.
You can use the AsyncAPI Parser in two ways:
Before you use the AsyncAPI Parser in the terminal, build the application. Run:
git clone https://github.com/asyncapi/parser.git
cd ./parser
go build -o=asyncapi-parser ./cmd/api-parser/main.go
To use the AsyncAPI Parser run the following command:
asyncapi-parser <document_path>
where document_path
is a mandatory argument that is either a URL or a file path to an AsyncAPI document.
You can also use the AsyncAPI Parser without building the application, using Golang. Run:
bash go run ./cmd/api-parser/main.go <document_path>
where document_path
is a mandatory argument that is either a URL or a file path to an AsyncAPI document.
Examples
See the following examples of the AsyncAPI Parser usage in the terminal:
Validation of the gitter-streaming.yaml
valid file:
asyncapi-parser https://raw.githubusercontent.com/asyncapi/asyncapi/master/examples/2.0.0/gitter-streaming.yml
Validation of the oneof.yml
invalid file:
go run ./cmd/api-parser/main.go https://raw.githubusercontent.com/asyncapi/asyncapi/master/examples/1.1.0/oneof.yml
Output:
(root): id is required
(root): channels is required
(root): Additional property topics is not allowed
asyncapi: asyncapi must be one of the following: "2.0.0"
If you have a feature request, add it as an issue or propose changes in a pull request (PR).
If you create a feature request, use the dedicated Feature request issue template. When you create a PR, follow the contributing rules described in the CONTRIBUTING.md
document.
avro
schema support$id
property supportFAQs
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.