knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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
.
remotes::install_github("Pakillo/safeinstall")
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")
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.