r firewall demo - michaelmworthington/codesamples GitHub Wiki

Introduction

This page walks through the steps to set up NXRM and a Docker container to test R Firewall using https://cran.r-project.org/

R support in NXRM3 was added in 3.20.

See the official docs at  https://help.sonatype.com/repomanager3/formats/r-repositories

Table of Contents

Prerequisites

  • IQ Server installed and running
  • NXRM 3 installed and running and configured with the IQ Server
  • Docker for Mac installed and running

Step 1. Create a new Proxy Repository in NXRM

Use https://cran.r-project.org/ as the Remote URL. Accept default values for the remainder of the settings.

Step 2. Enable Firewall for the New Proxy Repo

Step 3. Run the Docker Image in Interactive Mode

docker run -it --rm r-base

Step 5. Use R to Install a package

install.packages(c("devtools", "roxygen2", "testthat", "knitr"), repos="http://host.docker.internal:8083/nexus/repository/r-group/")

Step 6. Browse the Proxy Repo

Step 7. Go to the Firewall Report

Repo List

IQ Server Report

Step 8. Test Quarantine

readxl 1.0.0 has CVE-2017-12110 with CVSS 7.8, so you'll need to have Quarantine enabled in the capability you created in step 2 and Proxy=Fail in your Security-High policy in IQ Server

install.packages(c("readxl"), repos="http://host.docker.internal:8083/nexus/repository/r-group/")

Repo List

IQ Server Report

Step 9. Notes

The NXRM Tree View shows the Quarantined component:

You can reproduce the 403 - Quarantined error by clicking on the "Path" link: http://host.docker.internal:8083/nexus/repository/r-group/src/contrib/Archive/readxl/readxl_1.0.0.tar.gz

You can view the component information panel (CIP) right in NXRM

Not Supported

⚠️ **GitHub.com Fallback** ⚠️