Indagine sull'uso di strumenti di analisi statica per l'individuazione di vulnerabilità
View/ Open
Author
Corbo, Erika <2001>
Date
2025-03-25Data available
2025-03-27Abstract
La tesi studia l’analisi statica di codice attraverso l’adoperazione degli strumenti Semgrep, CodeQL e Joern.
L’obiettivo è quello di analizzare gli strumenti evidenziandone i punti di forza e quelli di debolezza e, attraverso il confronto tra essi, constatarne la validità.
Tutti gli strumenti permettono di scansionare il codice per scovare vulnerabilità attraverso funzionalità predefinite, ma è possibile effettuare anche personalizzazioni dell’esperienza sulla base delle proprie esigenze.
Inizialmente vengono analizzate le strutture e i linguaggi che le piattaforme utilizzano e le funzionalità da loro offerte.
Nella fase di confronto gli strumenti sono stati utilizzati sullo stesso codice sorgente, costituito da un progetto deliberatamente contaminato di vulnerabilità; in seguito sono stati confrontati i linguaggi che permettono di realizzare le strutture alla base della scansione e le funzionalità offerte dalle piattaforme.
A seguito dell’analisi, è stato possibile concludere che CodeQL e Semgrep sono validi per l’identificazione di problematiche all’interno di un progetto.
Semgrep si è rivelato un ottimo strumento per la scansione di codice in automatico: le piattaforme associate consentono una gestione efficiente dei risultati delle operazioni ed un’ottima integrazione con diversi software di CI.
CodeQL, invece, è lo strumento più adatto per effettuare analisi dettagliate sul codice: il linguaggio di analisi adopera una libreria specifica per ognuno dei linguaggi di programmazione supportati, consente un ottimo riutilizzo del codice grazie alla presenza di librerie e permette di interagire interattivamente con i risultati delle interrogazioni.
Joern, essendo meno supportato e non implementando alcune delle funzionalità proposte dai concorrenti, è risultato lo strumento meno soddisfacente e con un ampio margine di miglioramento. The thesis examines the static code analysis process using the tools Semgrep, CodeQL, and Joern.
The objective is to analyze these tools by highlighting their strengths and weaknesses and, through their comparison, assess their effectiveness.
All the tools allow scanning code to detect vulnerabilities using predefined functionalities, but they also offer the possibility of customizing the experience according to specific needs.
Initially, the structures and programming languages used by these platforms, as well as their functionalities, are analyzed.
In the comparison phase, the tools were tested on the same source code, which consisted of a deliberately vulnerable project. Subsequently, the languages used to create the scanning structures and the functionalities offered by the platforms were compared.
Following the analysis, it was concluded that all three tools are valid for identifying issues within a project.
Semgrep proved to be an excellent tool for automated code scanning: its associated platforms allow efficient management of scan results and excellent integration with various CI software.
CodeQL, on the other hand, is the most suitable tool for conducting in-depth code analysis: its query language uses a specific library for each supported programming language, enables effective code reuse through libraries, and allows interactive interaction with query results.
Joern, being less supported and lacking some of the functionalities offered by its competitors, proved to be the least satisfactory tool, with significant room for improvement.
Type
info:eu-repo/semantics/bachelorThesisCollections
- Laurea Triennale [2776]