RosvDownload | R Documentation |
An R6 class to provide a lower-level interface to download from the OSV database GCS buckets.
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.
An R6 object to operate with data downloaded from the OSV GCS buckets.
rosv::RosvQuery1
-> RosvDownload
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.
new()
Set the core request details for subsequent use when called in run()
method.
RosvDownload$new(vuln_ids = NULL, ecosystem)
vuln_ids
Character vector of vulnerability IDs.
ecosystem
Ecosystem 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()
print()
Print basic details of query object to screen.
RosvDownload$print(...)
...
Reserved for possible future use.
clone()
The objects of this class are cloneable with this method.
RosvDownload$clone(deep = FALSE)
deep
Whether to make a deep clone.
https://google.github.io/osv.dev/data/#data-dumps
query <- RosvDownload$new(ecosystem = 'CRAN')
query
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.