Learn R Programming

rosv (version 0.5.1)

osv_query_1: Query OSV API for vulnerabilities based upon an individual package

Description

Query the OSV API for vulnerabilities that include the individual package of interest. The request is automatically constructed from the provided elements and the returned values are parsed into a data.frame.

Usage

osv_query_1(
  name = NULL,
  version = NULL,
  ecosystem = NULL,
  commit = NULL,
  purl = NULL,
  parse = TRUE,
  cache = TRUE,
  ...
)

.osv_query_1( name = NULL, version = NULL, ecosystem = NULL, commit = NULL, purl = NULL, parse = TRUE, cache = TRUE, ... )

.osv_query_1_cache( name = NULL, version = NULL, ecosystem = NULL, commit = NULL, purl = NULL, parse = TRUE, cache = TRUE, ... )

Value

An R6 object containing API query contents.

Arguments

name

Name of package.

version

Version of package.

ecosystem

Ecosystem package lives within (must be set if using name).

commit

Commit hash to query against (do not use when version set).

purl

URL for package (do not use if name or ecosystem set).

parse

Boolean value to set if the content field should be parsed from JSON list format.

cache

Boolean value to determine if should use a cached version of the function and API results.

...

Additional parameters passed to nested functions.

Functions

  • .osv_query_1(): Internal function to run osv_query_1 without caching.

  • .osv_query_1_cache(): Internal function to run a memoise and cached version of osv_query_1.

See Also

Examples

Run this code
if (FALSE) { # interactive()
osv_query_1(commit = '6879efc2c1596d11a6a6ad296f80063b558d5e0f')
}

Run the code above in your browser using DataLab