MyNixOS website logo
Description

Client to Access and Operate on the 'Open Source Vulnerability' API.

Connect, query, and operate on information available from the 'Open Source Vulnerability' database <https://osv.dev/>. Although 'CRAN' has vulnerabilities listed, these are few compared to projects such as 'PyPI'. With tighter integration between 'R' and 'Python', having an 'R' specific package to access details about vulnerabilities from various sources is a worthwhile enterprise.

rosv rosv website

CRANstatus CRANchecks R-CMD-check Codecov testcoverage Dependencies

Overview

The {rosv} package is an API client to the Open Source Vulnerability (OSV) database. Both high and low level functions are available to query the database for vulnerabilities in package repositories across various open source ecosystems such as CRAN, Bioconductor, PyPI, and many more. Queries made against the OSV database are useful to check for package vulnerabilities (including by specific versions) enumerated in package management files such as requirements.txt (Python) and renv.lock (R). Checking valid query construction, API response pagination, and parsing content are all handled by {rosv}.

Various helper functions assist in the administration of Posit Package Manager or similar services. Packages can be routinely examined for new vulnerabilities which aide in the creation and updating of curated repositories as well as assigning block lists.

More details about the OSV project and associated API can be found here: https://google.github.io/osv.dev/.

Installation

install.packages('rosv')
library(rosv)

For the latest development version, you can install {rosv} from GitHub:

remotes::install_github('al-obrien/rosv')

Basic usage

The fastest and simplest way to get started with {rosv} is to use the osv_query() function.

  1. Provide a package name and related ecosystem to fetch any identified vulnerabilities.

    osv_query('dask', ecosystem = 'PyPI')
    
  2. Query multiple packages at the same time and across ecosystems.

    osv_query(c('dask', 'readxl', 'dplyr'),
              ecosystem = c('PyPI', 'CRAN', 'CRAN'))
    
  3. Return results only for packages provided and not others that may be part of the same vulnerability.

    osv_query('apache-airflow', ecosystem = 'PyPI', all_affected = FALSE)
    
  4. Download all vulnerabilities listed for an ecosystem.

    osv_query(ecosystem = 'CRAN', all_affected = FALSE)
    

Development notes

{rosv} leverages {httr2} and {httptest2} for its core API client functionality and uses R6 classes for its low-level interface to the OSV API. There are also plans to have more types of returned details and parsing of content.

Metadata

Version

0.5.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows