Skip to contents

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,
  ...
)

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.

Value

An R6 object containing API query contents.

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

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