Project

cvelist

0.0
No release in over 3 years
Low commit activity in last 3 years
A Ruby library for parsing the CVE JSON in the cvelist git repository.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

 Project Readme

cvelist

CI Code Climate

Description

A Ruby library for parsing the CVE JSON in the cvelist git repository.

Features

Examples

require 'cvelist'

Cloning the cvelist repository:

repo = CVEList::Repository.clone('path/to/cvelist')

Using an existing cvelist repository:

repo = CVEList::Repository.new('path/to/cvelist')

Updating an existing cvelist repository:

repo.pull!

Get the total number of CVEs in the repository:

repo.size

Access an individual CVE in the repository:

repo['CVE-2020-0001']

Enumerating over every CVE in the repository:

repo.each do |cve|
  puts cve.id
end

Enumerating over every CVE in a certain year:

repo.year(2020).each do |cve|
  puts cve.id
end

Requirements

Install

$ gem install cvelist

Gemfile

gem 'cvelist', '~> 0.1'

Benchmark

Warming up the disk cache with a first run. This may take a while ...
Parsing all 192879 CVE .json files ...

Total:	 18.285097   1.651155  19.936252 ( 20.144566)
Avg:	  0.000095   0.000009   0.000103 (  0.000104)

Copyright

Copyright (c) 2020-2021 Hal Brodigan

See {file:LICENSE.txt} for details.