An R6 class to provide a lower-level interface to download from the OSV database GCS buckets.
An R6 object to operate with data downloaded from the OSV GCS buckets.
rosv::RosvQuery1 -> RosvDownload
osv_cache_dirLocation of cached vulnerability JSON files.
contentContent from downloading the vulnerabilities.
time_stampTime stamp associated with run.
date_stamp_hashHashed date from time stamp.
ecosystemThe ecosystem used upon creation.
vuln_idsThe vulnerability IDs, if provided.
requestThe URLs to request downloaded files.
Inherited methods
new()Set the core request details for subsequent use when called in run() method.
RosvDownload$new(vuln_ids = NULL, ecosystem)vuln_idsCharacter vector of vulnerability IDs.
ecosystemEcosystem package lives within (must be set).
download()Download vulnerabilities from provided ecosystem to disk, the location
is recorded under the osv_cache_dir field. Will overwrite any existing files
in the cache.
RosvDownload$download()
run()Load vulnerabilities to the R session. The entire contents of
each vulnerability file will be loaded. Subsequent use of the parse() method
will shrink the memory footprint as not all contents will be carried across.
RosvDownload$run()
...Reserved for possible future use.
clone()The objects of this class are cloneable with this method.
RosvDownload$clone(deep = FALSE)deepWhether to make a deep clone.
If no vulnerability IDs are provided, the entire set is downloaded from the ecosystem's all.zip file.
JSON files are downloaded to the R session's temporary folder as dictated by the environment
variable ROSV_CACHE_GLOBAL. Due to its similarity in parsing process, it simply inherits
the method from the parent class RosvQuery1.
Any ecosystems listed here can be downloaded.
query <- RosvDownload$new(ecosystem = 'CRAN')
query
Run the code above in your browser using DataLab