osv_download | R Documentation |
Use vulnerability IDs and/or an ecosystem name to download vulnerability files from OSV GCS buckets.
osv_download(
vuln_ids = NULL,
ecosystem,
parse = TRUE,
cache = TRUE,
download_only = FALSE
)
.osv_download(vuln_ids = NULL, ecosystem, parse = TRUE, download_only = FALSE)
.osv_download_cache(
vuln_ids = NULL,
ecosystem,
parse = TRUE,
download_only = FALSE
)
vuln_ids |
Vector of vulnerability IDs (optional). |
ecosystem |
Ecosystem package lives within (must be 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. |
download_only |
Boolean value to determine if only the JSON files should be downloaded to disk. |
Although the end-result will be similar to the other API functions, this one specifically downloads .zip or
.json files from the OSV GCS buckets. As a result, it has two main benefits. First, it can download the entire set
of vulnerabilities listed for an ecosystem. Second, it has options to save the vulnerability files to disk. The
files are saved to the R session's temp space, as defined by the environment variable ROSV_CACHE_GLOBAL
.
Any ecosystems listed here can be downloaded. Only one ecosystem can be provided at a time.
An R6 object containing API query contents.
.osv_download()
: Internal function to run osv_download
without caching.
.osv_download_cache()
: Internal function to run a memoise and cached version of osv_download
.
vulns <- osv_download("RSEC-2023-8", "CRAN")
get_content(vulns)
# Clean up
try(clear_osv_cache())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.