{"id":31104759,"url":"https://github.com/realerikrani/nvdr","last_synced_at":"2025-10-11T07:12:09.387Z","repository":{"id":263248869,"uuid":"109489823","full_name":"realerikrani/nvdr","owner":"realerikrani","description":"An R package for building forecasting models using data from National Vulnerability Database (NVD).","archived":false,"fork":false,"pushed_at":"2018-05-13T20:57:23.000Z","size":348,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-17T03:48:14.164Z","etag":null,"topics":["cve","cvss","cwe","forecasting","historical-data","nvd","time-series-analysis","time-series-forecast","vulnerability"],"latest_commit_sha":null,"homepage":"https://realerikrani.github.io/nvdr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realerikrani.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-04T11:36:14.000Z","updated_at":"2025-03-22T10:17:00.000Z","dependencies_parsed_at":"2024-11-17T09:49:27.756Z","dependency_job_id":"3d47bb6d-4943-45b7-8d20-4d5b47a3e393","html_url":"https://github.com/realerikrani/nvdr","commit_stats":null,"previous_names":["realerikrani/nvdr"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/realerikrani/nvdr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realerikrani%2Fnvdr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realerikrani%2Fnvdr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realerikrani%2Fnvdr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realerikrani%2Fnvdr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realerikrani","download_url":"https://codeload.github.com/realerikrani/nvdr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realerikrani%2Fnvdr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006585,"owners_count":26084129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cve","cvss","cwe","forecasting","historical-data","nvd","time-series-analysis","time-series-forecast","vulnerability"],"created_at":"2025-09-17T03:42:14.606Z","updated_at":"2025-10-11T07:12:09.371Z","avatar_url":"https://github.com/realerikrani.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!--\n---\noutput:\n   html_document:\n     self_contained: no\n---\n--\u003e\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n# nvdr\n[![license](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)\n[![Travis-CI Build Status](https://travis-ci.org/realerikrani/nvdr.svg?branch=master)](https://travis-ci.org/realerikrani/nvdr)\n\nIt is assumed that R is [downloaded and installed](https://www.r-project.org/) on a UNIX platform, Windows or MacOS. In the case of Ubuntu or other Linux systems, sometimes other programs such as libcurl4-openssl-dev and libxml2-dev need to be installed as well (then the error messages mention missing \"curl\" or \"xml2-config\").\nEventually, the installation instructions can be followed from the R console.\n\n## Installation\n\nInstall *nvdr* from GitHub.\n```{r gh-installation, eval = FALSE}\ninstall.packages(\"remotes\")\nremotes::install_github(\"realerikrani/nvdr\")\n```\n\n## Documentation and User Guide\n\nhttps://realerikrani.github.io/nvdr/\n\n## Examples\n\n```{r intro, eval = FALSE}\nlibrary(nvdr)\n## Create a new CWE object.\nc \u003c- CWE$new()\n## Set the data from CVE-2011 to CVE-2016 that come along with the package ...\nc$setBaseData()\n## ... or set data from selected XML Version 2.0 files downloaded from https://nvd.nist.gov/vuln/data-feeds#CVE_FEED .\nc$setBaseData(c(\"nvdcve-2.0-2013.xml\",\"nvdcve-2.0-2015.xml\"))\n## Get the year and month that mark the beginning of the interested time period.\nc$getStartYear()\nc$getStartMonth(as_number = T)\n## Get the year and month that mark the end of the interested time period. See how to change the end and start at the end of the README.\nc$getEndYear()\nc$getEndMonth(as_number = T)\n## Set monthly average CVSS time series for interesting CWEs ...\nc$setTimeSeriesData(c$getInterestingMonthlyData())\n## ... or set monthly average CVSS time series for specific CWEs.\nc$setTimeSeriesData(c$getMonthlyData(c(\"CWE-119\",\"CWE-78\")))\n## Create new forecasting object.\ncf \u003c- CVSSForecaster$new()\n## Use the created CWE object with its time period and time series data.\ncf$setCWEs(c)\n## Create models and forecasts (creates the forecast models for the selected CWEs' time series and measures the accuracy).\ncf$setBenchmark()\ncf$setETS()\ncf$setARIMA()\n## Get forecast plots for specific type of models.\ncf$getPlots(cf$getARIMA())\ncf$getPlots(cf$getETS())\n## Get all created ARIMA models\ncf$getARIMA()\n## Get ARIMA model by CWE that is among the selected CWEs.\ncf$getARIMA(\"CWE-119\")\n## Merge a potentially good ARIMA model's training and test data into new training data to  forecast the unknown future of 9 months.\ncf$getARIMA(\"CWE-119\")$useModel(9)\n## Save the unknown future results and plot them with ggplot2\nu \u003c- cf$getARIMA(\"CWE-119\")$useModel(9)\nggplot2::autoplot(u)\n## Get ARIMA forecast accuracy measures.\ncf$getAssessments(cf$getARIMA())\n## Get assessments of the most accurate models that have been created so far for each CWE\ncf$getBestAssessments()\n## Get all forecast accuracy measures so far\ncf$getAllAssessments()\n## Save a list of current models with best forecast accuracy.\ncf$setBestModelList()\n## Plot the best models list\ncf$getPlots(cf$getBestModelList())\n## Merge the best models' (for each CWE based on the best forecast accuracy) training and test data into new training data for forecasts of the unknown future of 9 months.\nlist_of_unseen_future_forecasts \u003c- cf$useBest(9)\n## Plot the used best models' new forecasts\ncf$plotUseBest(list_of_unseen_future_forecasts, row_no = 5, col_no = 2)\n## Assuming that some time has gone past and a new CWE object `c2`\n## has been created containing time series test data, one can find out the forecast accuracy and add the obtained actual values to plots\ncf$assessUseBest(list_of_unseen_future_forecasts, c2$getTimeSeriesData())\ncf$plotUseBest(list_of_unseen_future_forecasts, row_no = 5, col_no = 2, actual = c2$getTimeSeriesData())\n```\n\nLook at the included binary data.\n```{r lookdata, eval = FALSE}\nhead(nvd)\n```\n\n## License\nThis package is licensed under GPL-3.\n\n## Acknowledgments\nThe forecasts of *nvdr* rely on the methods provided by R package *forecast*.\n```\n@Manual{,\n  title = {{forecast}: Forecasting functions for time series and linear models},\n  author = {Rob Hyndman and Christoph Bergmeir and Gabriel Caceres and Mitchell O'Hara-Wild and Slava Razbash and Earo Wang},\n  year = {2017},\n  note = {R package version 8.3},\n  url = {http://pkg.robjhyndman.com/forecast},\n}\n```\nFurthermore, residuals are checked in *nvdr* by using the ideas from https://github.com/robjhyndman/forecast/blob/c87f33/R/checkresiduals.R. The\nexact way of lag calculations from that file are used in *nvdr*.\n\n## Notes\nThe package includes preprocessed data obtained from XML Version 2.0 data from https://nvd.nist.gov/vuln/data-feeds#CVE_FEED as of 7 October 2017 covering vulnerability entries from CVE-2011 to CVE-2016. Users have the possibility to extract data on their own without creating any objects as well with the package's function ``get_nvd_entries``(for example,  ``get_nvd_entries(c(\"nvdcve-2.0-2013.xml\",\"nvdcve-2.0-2015.xml\"))``).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealerikrani%2Fnvdr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealerikrani%2Fnvdr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealerikrani%2Fnvdr/lists"}