Securing Software in the Age of Large Language Models
Abstract
Large Language Models (LLMs) offer new capabilities for software security by interpreting source code and natural-language specifications, and generating plausible code. However, their probabilistic behavior, hallucinations, limited security knowledge, and inconsistent outputs make their direct use non-trivial. This dissertation investigates how LLMs can identify code requiring protection, discover and repair vulnerabilities in existing software, and improve the security of generated software code while accounting for reliability and deployment costs. The completed research provides results across three settings. LLM-CAL identifies cryptographic code for fine-grained TEE boundary establishment, reducing the Trusted Computing Base by 81.20%. RESTing-LLAMA uses semantic OpenAPI documentation to discover 11 vulnerabilities across real-world REST APIs with fewer requests and a lower false-positive rate than existing fuzzers. RAVEN combines agentic retrieval, repository-level dependency analysis, and iterative refinement to achieve an 83.13% repair success rate across 160 real-world CVE instances. The ongoing research examines the trustworthiness of LLM-based code generation through knowledge-poisoning attacks against RACG systems and an agentic Graph RAG framework for retrieving CWE-structured security knowledge. Together, these studies examine how LLMs can be adapted for securing existing and generated software.