Abstract
Large specification-driven software systems are defined by extensive collections of technical documents that no individual or team can review comprehensively. Deciding which security events such systems should log, and what each log entry must contain, therefore remains a manual, error-prone task, and gaps in logging weaken the ability to detect, investigate, and respond to attacks. This thesis examines how AI agents can automatically identify and generate security-relevant logging requirements from software specifications. A systematic literature review shows that existing AI security agents operate at runtime on data whose contents were decided elsewhere, leaving the design-time definition of logging requirements unaddressed. To explore this gap, a specification-driven AI agent was developed and evaluated using the Automotive Open System Architecture (AUTOSAR) standard as a case study, selected for its scale, complexity, and central role in automotive software. The findings suggest that the agent is effective at surfacing security-relevant concerns and is best positioned as a design-support aid for expert review rather than an autonomous source of logging requirements. Although AUTOSAR served as the case study, the approach is designed to transfer to other large specification-driven frameworks, such as OpenAPI, ROS 2, and Kubernetes.