Test WebSVF frontend on Cloud - SVF-tools/WebSVF GitHub Wiki

Once you have setup a code-server environment on cloud using the Wiki Page, Deploy CodeServer on AWS you can begin installing WebSVF and setup the correct environment to test the WebSVF functionality using a demo project.

Install WebSVF-backend

sudo npm i -g @websvf/create-analysis

Setup the correct environment for compiling the demo project (Install LLVM, Clang & WLLVM)

sudo create-analysis --setup-env

Install WebSVF on Cloud

sudo create-analysis --cloud-install

Refresh the webpage to see the extensions.

Setup the demo Project

Install dependencies:

sudo apt install libglib2.0-dev libncurses5 libtool

Download the demo project archive:

wget https://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz

Extract the demo project archive:

tar xf pkg-config-0.26.tar.gz

Set the current working directory to the extracted demo project folder:

cd pkg-config-0.26

Export the environment path variables required for compiling the demo project:

export LLVM_COMPILER=clang
export LLVM_COMPILER_PATH=/home/ubuntu/llvm-clang/10/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin

Compile and Make the demo project:

CC=wllvm ./configure
make

Extract the .bc file from the demo project executable created from making the project in the above step:

extract-bc pkg-config -o pkg-config.bc

Generate the BugAnalysisReport.json file

The BugAnalysisReport.json file is required to run the WebSVF-frontend-extension which looks like this in your code editor: BugAnalysisReport.json

After you have setup the demo project using the aforementioned steps you can generate this file by running this command in the project directory (/pkg-config-0.26)

create-analysis

Now you have setup everything required to run and test the WebSVF-frontend using the WebSVF-frontend-extension. Please go ahead and click the BugAnalysisReport.json button and launch the WebSVF-frontend inside your online code editor.