JSON-annotated protobuf definitions for NVD feeds

PROTONVD: Protobuf definitions for NVD

Features:

  • Encapsulates all fields in the NIST NVD Vulnerability JSON feeds.
  • JSON annotations in proto definitions for JSON marshalling/unmarshalling.
  • A bash script to assist in downloading JSON feeds.

The protobuf definition has been precompiled for easy import and usage.

Parsing JSON

import "github.com/fkautz/protonvd"
import "google.golang.org/protobuf/encoding/protojson"

msg := &protonvd.NvdMessage{}
err := protojson.Unmarshal([]byte(str), msg)

buf, err := protojson.Marshal(msg)

Emitting JSON

import "github.com/fkautz/protonvd"
import "google.golang.org/protobuf/encoding/protojson"

msg := &protonvd.NvdMessage{
	// ...
}

jsonBytes, err := protojson.Marshal(msg)

Notes

There is one minor departure from the spec.

//:root/CVE_data_numberOfCVEs is an integer rather than a string. Emitted JSON for this field is an int32 instead of a string.

{
    "CVE_data_numberOfCVEs": 1,
}

instead of

{
    "CVE_data_numberOfCVEs": "1",
}
Owner
Frederick F. Kautz IV
Frederick F. Kautz IV
Similar Resources

Experiments with pulsar go client and protobuf

How to use proto schema with pulsar go client library Define a .proto file Generate Code using below command: protoc -I=. -I=$GOPATH/src -I=$GOPATH/sr

Nov 15, 2021

Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages

Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages

Using Wireshark to decrypt TLS gRPC Client-Server protobuf messages Sample client server in golang that demonstrates how to decode protobuf messages f

Sep 8, 2022

Temporal Activity Protobuf Generator Proof of Concept

Temporal Activity Protobuf Generator Proof of Concept This is a protoc plugin for generating easy to use code for calling and implementing activities.

Oct 5, 2022

A Golang protobuf plugin used to generate the necessary interfaces to interact with the database

protoc-gen-go-db-enum This protobuf compiler plugin generates the Valuer and Scanner interfaces for enums defined in the proto files. It is highly bas

Sep 9, 2022

generate protobuf for asynq payload.

protoc-gen-go-asynq generate protobuf for asynq payload. usage 1. install protoc-gen-go-asynq # first install protobuf, then install go get -d google.

Dec 22, 2021

my fork from google.golang.org/protobuf

Go support for Protocol Buffers This project hosts the Go implementation for protocol buffers, which is a language-neutral, platform-neutral, extensib

Dec 22, 2021

Control your Flipper Zero over Protobuf RPC protocol.

go-flipper Control your Flipper Zero over Protobuf RPC protocol. This library is designed to be transport agnostic, though I've tested it with RPC ove

Dec 17, 2022

Orion - a small lightweight framework written around grpc/protobuf with the aim to shorten time to build microservices at Carousell.

Orion Orion is a small lightweight framework written around grpc/protobuf with the aim to shorten time to build microservices at Carousell. It is deri

Nov 16, 2022

go-jsonc provides a way to work with commented json by converting it to plain json.

JSON with comments for GO Decodes a "commented json" to "json". Provided, the input must be a valid jsonc document. Supports io.Reader With this, we c

Apr 6, 2022
Related tags
A simple RPC framework with protobuf service definitions

Twirp is a framework for service-to-service communication emphasizing simplicity and minimalism. It generates routing and serialization from API defin

Jan 7, 2023
protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over HTTP REST endpoints using human-readable text formats

protoCURL protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over HTTP REST endpoints using human-readable text forma

Jan 6, 2023
protobuf ではなく JSON でやり取りするファイルを出力する protoc プラグイン

protoc-gen-jsonif proto ファイルから、JSON フォーマットでやりとりする型定義ファイルを出力する protoc プラグインです。 proto ファイルで言語を越えて型定義が出来るのはとても良い しかし protobuf ライブラリを入れるのが面倒 今のプロジェクトには既に

Feb 28, 2022
A Go library for fetching, parsing, and updating RSS feeds.

rss RSS is a small library for simplifying the parsing of RSS and Atom feeds. The package could do with more testing, but it conforms to the RSS 1.0,

Dec 14, 2022
Simple, yet powerful Adcell go client to import data feeds into you projects.
 Simple, yet powerful Adcell go client to import data feeds into you projects.

adcell-go Simple, yet powerful Adcell go client to import data feeds into you projects. Explore the docs » View Demo · Report Bug · Request Feature Ta

Oct 31, 2021
GSRPC compatible type definitions of events from the ChainBridge substrate pallet

chainbridge-substrate-events GSRPC compatible type definitions of events from the ChainBridge substrate pallet. ChainSafe Security Policy Reporting a

Nov 13, 2021
Gotypegraph - Generate definitions and references graph

gotypegraph Generate definitions and references graph. Usage ❯ gotypegraph -h Us

Feb 15, 2022
Protobuf files manager

Prot - protobuf files manager. It application can help your manage protobuf files and generate code based on him. !!! Before use Prot you must install

Jun 22, 2022
A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2

vtprotobuf, the Vitess Protocol Buffers compiler This repository provides the protoc-gen-go-vtproto plug-in for protoc, which is used by Vitess to gen

Jan 1, 2023
WIP protobuf support for Gleam ✨

gleam_pb WIP protobuf support for Gleam ✨ Progress Gleam Type generation custom functions that better handle default values stop including unnecessary

Feb 26, 2022