Back to search

University of Akron

Detecting and Analyzing Security Code Smells in C/C++ Using Program Slicing and Query-based Static Analysis

Abstract

dc:description

Many security weaknesses in C and C++ arise from a small set of recurring source-code patterns: bound-unchecked function calls, unguarded arithmetic, hard-coded credentials, and similar constructs. Each maps to a known weakness class, yet conventional static analyzers are designed to confirm exploitable vulnerabilities and so overlook these patterns until they prove dangerous.This thesis treats such patterns as security code smells. It defines the concept, formalizes ten smells as the 10 SCS catalog with explicit Common Weakness Enumeration mappings, and builds SmellDetect — a compilation-free detector that combines srcML markup, program slicing, and query-based analysis (srcQL with XPath guard filters). Each smell is classified by the minimum program-analysis level its detection requires.SmellDetect is evaluated against cppcheck, a widely used lightweight static analyzer for C/C++, and Joern, a code-property graph platform built for deep vulnerability analysis - on the NIST Juliet benchmark and on subsystems of Linux kernel. Across the Juliet cases, it detects all ten smells with an F1 of 1.00 and no false positives or false negatives, exceeding both baselines. Detection quality depends on the type of pattern rather than on analysis depth. The result is a formally defined, reproducible smell detector for C/C++ and a direct measurement of the gap between smell-oriented and vulnerability-oriented detection. Because it builds on srcML’s language-independent markup, the same compilation-free, query-based approach extends to other srcML-supported languages, such as C++, Java, and C#, given a smell catalog of each.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
masters
Discipline thesis:degree_discipline
Computer Science
Grantor dc:publisher
University of Akron
Year dc:date
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Asante, Afia Darko
Advisor dc:contributor.advisor
  • Collard, Michael

Subjects

dc:subject × 2

Rights

dc:rights
Statement dc:rights
  • unrestricted
  • This thesis or dissertation is protected by copyright: all rights reserved. It may not be copied or redistributed beyond the terms of applicable copyright laws.
Language dc:language
English

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
OhioLINK
Base URL
etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Asante, Afia Darko. Detecting and Analyzing Security Code Smells in C/C++ Using Program Slicing and Query-based Static Analysis. masters thesis, University of Akron, 2026. http://rave.ohiolink.edu/etdc/view?acc_num=akron1784225704710196