Skip to main content
QUICK REVIEW

[Paper Review] Towards Leveraging LLMs to Generate Abstract Penetration Test Cases from Software Architecture

Jafari, Mahdi, Sharma, Rahul|arXiv (Cornell University)|Mar 24, 2026
Information and Cyber SecurityComputer Science0 citations
TL;DR

The paper defines an Abstract Penetration Test Case (APTC) metamodel and investigates LLM-based generation of architecture-grounded APTCs from PCM models, evaluating prompting strategies across multiple case studies. Results show up to 93% usefulness and 86% correctness, indicating practical support for architects and testers.

ABSTRACT

Software architecture models capture early design decisions that strongly influence system quality attributes, including security. However, architecture-level security assessment and feedback are often absent in practice, allowing security weaknesses to propagate into later phases of the software development lifecycle and, in some cases, to remain undiscovered, ultimately leading to vulnerable systems. In this paper, we bridge this gap by proposing the generation of Abstract Penetration Test Cases (APTCs) from software architecture models as an input to support architecture-level security assessment. We first introduce a metamodel that defines the APTC concept, and then investigate the use of large language models with different prompting strategies to generate meaningful APTCs from architecture models. To design the APTC metamodel, we analyze relevant standards and state of the art using two criteria: (i) derivability from software architecture, and (ii) usability for both architecture security assessment and subsequent penetration testing. Building on this metamodel, we then proceed to generate APTCs from software architecture models. Our evaluation shows promising results, achieving up to 93\% usefulness and 86\% correctness, indicating that the generated APTCs can substantially support both architects (by highlighting security-critical design decisions) and penetration testers (by providing actionable testing guidance).

Motivation & Objective

  • Motivate architecture-level security assessment by shifting penetration testing earlier in the software lifecycle.
  • Define a structured metamodel for Abstract Penetration Test Cases (APTC) rooted in architectural artifacts.
  • Evaluate the effectiveness of LLMs with various prompting strategies in generating APTCs from architecture models.
  • Assess how generated APTCs aid architects and penetration testers and identify limitations and needed architectural annotations.

Proposed method

  • Propose an APTC metamodel describing target threat, weakness, attack vector, and affected architectural elements.
  • Serialize PCM architecture to a security-oriented textual representation and enforce schema-compliant APTC generation via constrained prompts.
  • Use prompt engineering (zero-shot, one-shot, few-shot; with and without chain-of-thought) to generate APTCs with two LLMs (GPT and Gemini).
  • Evaluate generated APTCs against CAWE weaknesses through expert-based and LLM-assisted expert assessments.
  • Validate outputs against a predefined JSON schema to ensure architectural traceability and interoperability.

Experimental results

Research questions

  • RQ1RQ1: How should an abstract penetration test case (APTC) be defined to support architecture-level security assessment?
  • RQ2RQ2: To what extent can LLMs analyze and understand the security implications of a software architecture?
  • RQ3RQ3: To what extent can LLMs generate meaningful APTCs from software architecture models?

Key findings

  • LLMs can generate architecture-grounded APTCs that are largely meaningful and aligned with CAWE weaknesses.
  • Prompting strategy and model choice significantly affect correctness and usefulness, with Gemini often outperforming GPT in usefulness under certain prompts.
  • The approach achieves up to 93.3% usefulness and 86.7% correctness in aggregate across three scenarios.
  • Some outputs incorrectly identify weaknesses or reference non-existent architectural elements, highlighting limitations in semantic grounding.
  • A structured APTC metamodel enables traceable, schema-compliant generation suitable for integration into security workflows.
  • The evaluation discusses threats to validity and suggests extensions to cover more CAWEs and richer threat models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.