An R6 class to provide a lower-level interface to download from the OSV database GCS buckets.
Details
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.
Super class
rosv::RosvQuery1
-> RosvDownload
Public fields
osv_cache_dir
Location of cached vulnerability JSON files.
content
Content from downloading the vulnerabilities.
time_stamp
Time stamp associated with run.
date_stamp_hash
Hashed date from time stamp.
ecosystem
The ecosystem used upon creation.
vuln_ids
The vulnerability IDs, if provided.
request
The URLs to request downloaded files.
Methods
Inherited methods
Method new()
Set the core request details for subsequent use when called in run()
method.
Usage
RosvDownload$new(vuln_ids = NULL, ecosystem)
Method 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.
Method 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.
Method print()
Print basic details of query object to screen.