Project

euvd

0.0
The project is in a healthy, maintained state
A Ruby client library for the EUVD (European Union Vulnerability Database) API. Provides a convenient interface to search and retrieve vulnerability information, CVEs, CPEs, CWEs, CAPECs, and advisories.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 1.0, < 3
~> 0.9
 Project Readme

EUVD - Ruby library wrapper

GitHub forks GitHub stars GitHub license

GitHub Workflow Status GitHub commit activity

A Ruby wrapper library for the European Union Vulnerability Database (EUVD) API. Uses the Sawyer HTTP agent framework.

All endpoints are GET-only and require no authentication.

Installation

gem install euvd

Check the installation page on the documentation to discover more methods.

Packaging status Gem Version GitHub tag (latest SemVer)

Documentation

Homepage / Documentation: https://noraj.github.io/euvd/

Usage

require 'euvd'

client = EUVD::Client.new

Vulnerabilities

Returns Sawyer::Resource objects (or Array of them). Access JSON fields as methods:

results = client.vulnerabilities.latest
# => Array<Sawyer::Resource>
#    results.first.id, results.first.description, results.first.baseScore, ...

search = client.vulnerabilities.search(text: 'log4j', size: 10, page: 0)
# => Sawyer::Resource with .items (Array) and .total (Integer)
#    search.items.first.id, search.total

client.vulnerabilities.exploited
client.vulnerabilities.critical

Search filters: text, fromScore (0-10), toScore, fromEpss (0-100), toEpss, fromDate (YYYY-MM-DD), toDate, fromUpdatedDate, toUpdatedDate, product, vendor, assigner, exploited (true/false), page (starts at 0), size (default 10, max 100).

Records

Returns Sawyer::Resource objects:

record = client.records.find('EUVD-2025-20101')
# => Sawyer::Resource
#    record.id, record.description, record.baseScore, record.assigner, ...

# Also works with CVE or GHSA IDs
client.records.find('CVE-2025-47228')
client.records.find('GHSA-pfxq-29cx-gm9c')

advisory = client.records.advisory('oxas-adv-2024-0002')
# => Sawyer::Resource

Downloads

client.downloads.cve_euvd_mapping  # returns CSV String
client.downloads.kev_dump          # returns raw JSON String

Meta

client.meta.assigners  # returns Array of assigner names
client.meta.banner     # returns Sawyer::Resource (enabled, message)

Observations

client.observations.honeypot_by_cve('CVE-2021-44228')
client.observations.honeypot_batch(%w[CVE-2021-44228 CVE-2021-45046])
client.observations.kev_by_cve('CVE-2021-44228')
client.observations.kev_batch('CVE-2021-44228')

Error Handling

begin
  record = client.records.find('EUVD-XXXX-XXXXX')
rescue EUVD::NotFoundError
  puts 'Not found'
rescue EUVD::RateLimitError
  puts 'Rate limited'
rescue EUVD::ServerError
  puts 'Server error'
rescue EUVD::BadResponseError
  puts 'Server returned non-JSON (likely down)'
rescue EUVD::Error => e
  puts "Error: #{e.message}"
end

Configuration

EUVD::Client.new(
  base_url: 'https://euvdservices.enisa.europa.eu/api'  # default
)

License

The gem is available as open source under the terms of the MIT License.

Author

Made by Alexandre ZANNI (@noraj).