Giter Club home page Giter Club logo

replication-package's Introduction

Characterizing Security-related Commits of JavaScript Engines

This tutorial is a guide to replicate the results from the article.

Projects

Four JavaScript engines were chosen for the assesment, they are all GitHub open-source projects: v8, ChakraCore, JavaScriptCore and Hermes. To start the process is necessary to download the projects.

git clone https://github.com/v8/v8

git clone https://github.com/chakra-core/ChakraCore

git clone https://github.com/WebKit/WebKit

git clone https://github.com/facebook/hermes

Commits

We collected the commits hashes from all packages utilizing the git comnmand-line utility inside each project folder.

git log --pretty=format:%H > project_hashes.txt

Since JavaScriptCore is inside the WebKit package, we collected only commits related to the JavaScriptCore folder.

git log --pretty=format:%H -- Source/JavaScriptCore > JavaScriptCore_hashes.txt

Tools

It was utilized two tools for extracting the metrics. PyDriller library and Understand. To install the PyDriller: pip3 install pydriller

To download and install Understand, it is required to register at https://www.scitools.com/.

Methodology

RQ1

We utilized the following script for extracting the messages from each project: pygithub_getmessages.py.

Then, we utilized scikit-learn library to identify security-related commits by their messages: classifier.py. We randomly selected other commits for the evaluation, same amount of security-related commits for each engine.

Then we extracted software metrics with PyDriller using the script: py_tests.py and Understand using the bash script: und_extraction.sh. We utilized the processing.py Python script to calculate the statistics test and effect size from each metric.

RQ2

We verified what files are being modified by security-related commits and others using the data provided by PyDriller and Understand. We counted the files that resulted on the top files modified. We analyzed the file and related to the module manually by searching for keywords, observing the folder path and analyzing the functions and classes.

RQ3

We randomly selected 5% from the security-related commits and classified the type of vulnerability. We increased the JavaScriptCore and Hermes number to 50, to have enough data for the classification. The type of vulnerability identification was done by seaching for keywords on the title and messages, inspecting external references (as CVEs) and finally interpreted the messages for classification.

replication-package's People

Contributors

bmphx2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.