How to Visualize Scan results

In this simple tutorial example, we import results from a basic scan preformed on the samples directory distributed by default with Scancode, and visualize the outputs through Scancode Workbench.

Warning

This tutorial uses the 2.2.1 version of Scancode Toolkit, and Scancode Workbench 2.4.1 (last Scancode Workbench release supporting 2.2.1 version of Scancode Toolkit). If you are using a newer version of Scancode Toolkit, check respective versions of this documentation.

Warning

This tutorial is for Linux based systems presently. Additional Help for Windows/MacOS will be added.

Setting up a Virtual Environment

Scancode Workbench 2.4.1 is not compatible with python 3.x so we will create a virtual environment using the Virtualenv tool with a python 2.7 interpreter.

The following commands set up and activate the Virtual Environment venv-scan2.2.1:

virtualenv -p /usr/bin/python2.7 venv-scan2.2.1
source venv-scan2.2.1/bin/activate

Setting up Scancode Workbench

According to the Install Building Requirements, we have to install Node.js 6.x or later. Refer to Node.js install instructions here.

You can also run the following commands:

sudo apt-get install -y nodejs
sudo npm install npm@5.2.0 -g

After Node.js and npm is installed and get the Scancode Workbench 2.4.1 tarball from the Workbench Release Page. Extract the package and then launch Scancode Workbench:

./AboutCode-Manager

This opens the Workbench.

Note

Scancode Workbench used to be named Aboutcode Manager before 2.6.1

Note

You can also build Scancode Toolkit and Scancode Workbench from source. Clone the repository, don’t forget to checkout to the specific release using git checkout <release>, and follow the build instructions.

Importing Data into Scancode Workbench

  1. Click on the File -> Import JSON File or Press Ctrl + I.
  2. Select the file from the pop-up window.
  3. Select a Name and Location (where you want it later) for the .sqlite output file.

Note

You can also import a .sqlite file you’ve saved in the past to load scan results. As it is much faster, once you’ve imported the JSON file and a corresponding SQLite file has been created, you shouldn’t repeat this. Instead import the SQLite file next time you want to visualize the same scan result.

Visualization

Views

Refer Scancode Workbench Views for more information on Visualization.

The dashboard has a general overview.

../../_images/workbench_dashboard.png

There are 3 principal views (They appear by the same order in the GIFs):

  • Chart Summary View,
  • Table View,
  • Components Summary View.
../../_images/views_sample.gif

Filters

You can also click any file/directory on the file list located at the right, to filter the results such that it only contains results from that File/Directory.

../../_images/filter_sample.gif

Componets

Refer Creating Conclusions for more information on Components.

In the table view,

  1. Apply filters by selecting Files/Directories
  2. Right Click on the Left Panel
  3. Select Edit Component
  4. A pop-up opens with fields, make necessary edits and Save.
  5. Go to the Component Summary View to see the Component.
../../_images/components_sample.gif