跳到正文
arXiv cs.AI· Anh Minh Nguyen, Tuan Dat Tran, Alzubair Hassan, Liliana Pasquale·· 3 小时前AI 评分36

SecPatRec:一种自动化安全模式恢复的混合方法

A Hybrid Approach for Automated Security Pattern Recovery

AI 导读

SecPatRec 是一种从源代码仓库自动恢复安全模式的混合方法,将安全模式视为参考架构,结合 ReAct 风格的 LLM 智能体做角色检测与定位,用静态代码属性图分析恢复交互序列。

正文 · 原文

View PDF HTML (experimental)

Abstract:Security-by-design emphasises integrating security into software design and development. Security pattern catalogues operationalise this principle by prescribing reusable architectural solutions to recurring security problems. However, recovering their implementations from source code remains challenging because security patterns are abstract, span multiple components, and admit many valid implementations. We present SecPatRec, a hybrid approach for automated security pattern recovery from source code repositories. We treat a security pattern as a reference architecture and frame its recovery as a deductive task: determining which prescribed roles are present, grounding them in code entities, and recovering their interaction sequences. SecPatRec pairs a ReAct-style LLM agent equipped with semantic and lexical code search for role detection and grounding with static code property graph analysis for interaction recovery. We curate a human-validated ground-truth dataset of 100 pattern instances covering five security patterns across 93 open-source Java and Python repositories, and introduce a three-level evaluation framework measuring recovery correctness against this ground truth. We evaluate SecPatRec using four LLMs, including proprietary and open-source models. Averaged over all models and pattern instances, SecPatRec achieves role-detection accuracy of 0.84, role-grounding similarity of 0.84, and an interaction-recovery score of 0.66. Compared to a one-shot end-to-end LLM baseline, SecPatRec achieves higher aggregate recovery scores and lower estimated LLM API costs per run, while processing repositories that exceed the baseline's configured input limit. The recovered role mappings and statically derived interaction sequences provide structural and behavioural evidence that can support inspection of security-pattern implementations.
Comments: 35 pages, 41 figures, 11 tables
Subjects: Cryptography and Security (cs.CR); Artificial Intelligence (cs.AI); Software Engineering (cs.SE)
Cite as: arXiv:2611.05823 [cs.CR]
  (or arXiv:2611.05823v1 [cs.CR] for this version)
  https://doi.org/10.48550/arXiv.2611.05823

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Minh Nguyen [view email]
[v1] Wed, 4 Nov 2026 02:01:23 UTC (2,525 KB)

来源:arXiv cs.AI · arxiv.org