Please use this identifier to cite or link to this item:
https://hdl.handle.net/10216/106076| Author(s): | António Cardoso Soares |
| Title: | Asund: Solução de classificação estática em Node.js para aplicações JavaScript |
| Issue Date: | 2017-07-11 |
| Abstract: | JavaScript is nowadays one of the most popular programming languages in the world. Due to its increasing use in different contexts, many problems have arisen that have been addressed recently. JavaScript code analysis has been regarded for some time as a challenge in several areas due to the language's dynamic nature, and being an interpreted language, applications using JavaScript may be exposed to all kinds of security problems. To tackle some of these problems, solutions have been developed using techniques such as runtime analysis or static analysis. Coming up with a solution that can not only identify the libraries, but also the contexts of an application by analysing the source code alone may have several uses in areas such as marketing, sales, building a set of data to support automatic learning machines as well as the configuration or previous selection of applications that fit the context or that play well with certain libraries. Therefore, in this dissertation, a modular application was developed that is capable of detecting or inferring the usage of libraries and the context of a certain application, from the static analysis of its source code. The solution was divided into three modules, each of them responsible for different tasks but all necessary for the final goal. The main tasks were retrieving JavaScript open-source libraries hosted in public repositories such as GitHub, collection of indicators to detect the context and the exported API. This data will be used on the detection and inference of libraries used, as well as the context of files or JavaScript applications submitted for evaluation. The solution was validated by analysing its precision and sensitivity through the submission of previously classified projects, and when possible, by comparing the identified libraries through the metadata and imports with the ones that were inferred by external API calls. |
| Description: | JavaScript é uma das linguagens de programação mais populares no mundo. Devido à proliferação da sua aplicação a diferentes contextos têm surgido diversos problemas que têm sido abordados recentemente. A análise de código JavaScript é há muito tempo conhecida como um desafio em várias áreas devido à sua natureza dinâmica e sendo uma linguagem interpretada, as aplicações podem ficar expostas a diferentes problemas de segurança. Para resolver alguns dos problemas foram desenvolvidas soluções usando a análise em tempo de execução ou aplicando diferentes técnicas de análise estática. A criação de uma solução que consiga identificar as bibliotecas, assim como os diferentes contextos analisando apenas o código-fonte poderá ter várias aplicações em marketing, vendas, na criação de um conjunto de dados que dê suporte a máquinas de aprendizagem automática e configuração ou seleção prévia de aplicações adaptadas ao contexto ou à presença de determinadas bibliotecas. Assim, nesta dissertação, foi desenvolvida uma aplicação modular capaz de a partir da análise estática de código-fonte detetar ou inferir o uso de bibliotecas e o contexto para qual foi desenvolvido. A solução foi dividida em três módulos, cada um responsável por ações distintas mas necessários ao objetivo final. As ações principais passam por recolher bibliotecas JavaScript presentes em repositórios open-source como o GitHub, fazer a recolha de indicadores para detetar o contexto e a API exportada. Esses dados serão usados na deteção ou inferência de bibliotecas usadas, assim como o contexto de ficheiros ou aplicações JavaScript submetidas para avaliação. A solução foi validada analisando a precisão e a sensibilidade do sistema através da submissão de projetos previamente classificados e quando possível, comparando as bibliotecas identificadas através de metadata e imports com os inferidos pelas chamadas a API externas. |
| Subject: | Engenharia electrotécnica, electrónica e informática Electrical engineering, Electronic engineering, Information engineering |
| Scientific areas: | Ciências da engenharia e tecnologias::Engenharia electrotécnica, electrónica e informática Engineering and technology::Electrical engineering, Electronic engineering, Information engineering |
| DOI: | 10.34626/6mac-3895 |
| URI: | https://hdl.handle.net/10216/106076 |
| Document Type: | Dissertação |
| Rights: | openAccess |
| Appears in Collections: | FEUP - Dissertação |
Files in This Item:
| File | Description | Size | Format | |
|---|---|---|---|---|
| 202923.pdf | Asund: Solução de classificação estática em Node.js para aplicações JavaScript | 1.12 MB | Adobe PDF | ![]() View/Open |
Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.
