Package 'vulnr'

Title: Scan R Packages for Vulnerabilities
Description: Scan R package dependencies for known security vulnerabilities using the OSV database, with support for renv.lock, installed libraries, and user-supplied package versions.
Authors: Jakob Gepp [cre, aut, cph]
Maintainer: Jakob Gepp <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-11-07 17:47:29 UTC
Source: https://github.com/cran/vulnr

Help Index


Check R dependencies for known vulnerabilities

Description

Scans explicitly supplied package data, an 'renv.lock' file, and installed libraries, then queries the OSV database for known vulnerabilities.

Usage

check(
  data = NULL,
  renv_file = NULL,
  lib = NULL,
  dcf = NULL,
  error_level = "LOW",
  group = TRUE,
  return_cves = FALSE,
  dependencies = FALSE
)

Arguments

data

Optional data frame with 'Package' and 'Version' columns or a vector with package names.

renv_file

Path to an 'renv.lock' file, or 'NULL' to skip it.

lib

Character vector of library paths, or 'NULL' to skip installed libraries.

dcf

Path to a DESCRIPTION file, or 'NULL' to skip it.

error_level

Minimum severity that causes an error. One of 'CRITICAL', 'HIGH', 'MEDIUM', or 'LOW'.

group

Logical; if 'TRUE', group findings by package in the report.

return_cves

Logical; if 'TRUE', return the CVE data table instead of reporting findings with a warning or error.

dependencies

Logical; if 'TRUE', include recursive strong package dependencies in the scan.

Value

Invisibly returns 'NULL' by default. If 'return_cves' is 'TRUE', returns the CVE data table.

Examples

# check specific packages
check(data = "data.table")

## Not run: 
# check a renv.lock file
check(renv_file = "renv.lock")

## End(Not run)