knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

safeinstall

Travis build status Codecov test coverage

The goal of safeinstall is to run some basic security checks before installing an R package from an online repository (like GitHub). This package is basically a wrapper of defender so that some security checks are done before running remotes::install_github.

Installation

remotes::install_github("Pakillo/safeinstall")

Usage

library(safeinstall)

safe_install_github is like remotes::install_github but will run some checks before installing the package. If nothing wrong is detected, the package is installed.

safe_install_github("Pakillo/safeinstall")

In contrast, if potentially unsafe code is detected (e.g. system calls), the package will not install and an error will be returned.

safe_install_github("ropenscilabs/testevil")

Checking any git repository

To just scan a package (without installing), run check_package on the git repository:

check_package("https://github.com/Pakillo/safeinstall.git")

Will return TRUE if no problem is found, or FALSE (plus info on potential problems) otherwise:

check_package("https://github.com/ropenscilabs/testevil.git")

This works with any git repository (not only GitHub), e.g. on Gitlab:

check_package("https://gitlab.com/jimhester/covr.git")


Pakillo/safeinstall documentation built on Oct. 30, 2019, 9:37 p.m.