Skip to content

A Ruby library providing common classes for CVE data and loading it from JSON.

License

Notifications You must be signed in to change notification settings

postmodern/cve_schema.rb

Repository files navigation

cve_schema

CI Code Climate

Description

{CVESchema} provides common classes for CVE data and loading it from JSON.

Features

  • Supports CVE JSON Schema v4.0.
  • Uses Plain-Old-Ruby-Objects (PORO) for speed!
  • No runtime dependencies.

Examples

require 'cve_schema'
include CVESchema

json = JSON.parse(File.read('path/to/CVE-YYYY-XXXX.json'))
cve = CVE.load(json)

Requirements

Install

$ gem install cve_schema

Gemfile

gem 'cve_schema', '~> 0.1'

Benchmark

Loading all 192879 JSON files into memory. This may take a while ...
Mapping all 192879 to CVESchema::CVE objects ...

Total:	 12.310090   0.275629  12.585719 ( 12.664896)
Avg:	  0.000064   0.000001   0.000065 (  0.000066)

Copyright

Copyright (c) 2020-2021 Hal Brodigan

See {file:LICENSE.txt} for details.

About

A Ruby library providing common classes for CVE data and loading it from JSON.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages