Palatiin / cloneguard

Thesis: Monitoring and Reporting Tool for Cloned Vulnerabilities across Open-Source Projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CloneGuard

Monitoring and Reporting Tool for Cloned Vulnerabilities across Open-Source Projects

CloneGuard is a tool for detecting cloned vulnerabilities in open-source projects. To monitor or detect cloned vulnerabilities in a project, it is required to register it in the internal database of the tool first. Then, CloneGuard offers two modes for analysis of the project:

Targeted Detection

Runs a detection of a specific vulnerability in forked projects.

Discovery Scan

Scans the recent updates in watched parent projects for suspicious commits.

The recipients can be configured in variable NOTIFY_LIST in file cloneguard/settings.py


Installation

Prerequisites

Initialize environment variables in .env file:

  • GITHUB_API_ACCESS_TOKEN - GitHub personal access token (see GitHub Docs)
  • SMTP_LOGIN - SMTP login for sending email notifications
  • SMTP_PASSWORD - SMTP password for sending email notifications

CloneGuard consists of multiple services. To run them, you need to install Docker and Docker Compose.

Build

  • docker-compose build - build all services

Usage

Initialize the database

  • docker-compose run db - start DB
  • docker-compose exec db sh - connect to the container
  • pg_restore -U admin -W -d postgres -F t db_data/dump.tar - run in the container, initialize DB with data from experimentation (use pass: postgres)

or

  • docker-compose run worker ./cli db-init - initialize DB schema - fresh instance

Start up

  • docker-compose up - start all services
  • docker-compose exec worker ./cli --help - access CLI

Services

  • web - web interface, available at http://localhost:3000
  • api - API for web interface, available at http://localhost:8000
  • worker - worker for processing tasks
  • db - internal database
  • redis - internal message broker

External dependencies

Simian

Simian (Similarity Analyzer) is a tool for detecting code duplicates. CloneGuard uses it to find vulnerable code clones in forked projects. Simian is written in Java and requires Java 8 or higher to run (installed in the docker image).

Download here.

About

Thesis: Monitoring and Reporting Tool for Cloned Vulnerabilities across Open-Source Projects

License:MIT License


Languages

Language:Python 81.2%Language:JavaScript 16.5%Language:HTML 1.0%Language:Dockerfile 0.7%Language:CSS 0.6%Language:Shell 0.0%