IntelliSA:一种利用符号规则和神经推理的智能静态分析器,用于IaC安全异味检测
IntelliSA: An Intelligent Static Analyzer for IaC Security Smell Detection Using Symbolic Rules and Neural Inference
AI总结:
IntelliSA通过结合符号规则和神经推理,有效检测IaC安全异味,实现高准确率和低成本的自动化安全分析。
摘要:
基础设施即代码(IaC)使大规模云和本地环境的自动化配置成为可能,减少了重复手动设置的需求。然而,这种自动化是一把双刃剑:IaC脚本中的单个配置错误可能广泛传播,导致严重的系统停机和安全风险。先前研究表明,IaC脚本常包含安全异味——可能引入漏洞的不良编码模式——并提出了基于符号规则的静态分析器来检测它们。然而,我们的初步分析表明,仅依靠规则检测容易产生过多的假阳性,增加手动检查的负担。在本文中,我们提出了IntelliSA,一种用于IaC安全异味检测的智能静态分析器,它集成了符号规则和神经推理。IntelliSA利用符号规则对潜在异味进行广度覆盖,然后利用神经推理过滤假阳性。虽然大语言模型(LLM)可以有效执行此过滤,但依赖LLM API会引入高昂的成本和延迟,引发数据治理问题,并限制可重复性和离线部署。为了解决这些挑战,我们采用知识蒸馏方法:一个LLM教师生成伪标签来训练一个紧凑的学生模型——比教师模型小超过500倍——该模型从教师的知识中学习,并高效地分类假阳性。我们使用包含241个安全异味的11814行真实世界IaC代码的人工标注数据集,评估IntelliSA与两个静态分析器和三个LLM基线(Claude-4、Grok-4和GPT-5)。实验结果表明,IntelliSA实现了最高的F1分数(83%),比基线高出7-42%。此外,IntelliSA在成本效益方面表现最佳,检测了60%的安全异味,同时仅检查了代码库的不到2%。
英文摘要:
Infrastructure as Code (IaC) enables automated provisioning of large-scale cloud and on-premise environments, reducing the need for repetitive manual setup. However, this automation is a double-edged sword: a single misconfiguration in IaC scripts can propagate widely, leading to severe system downtime and security risks. Prior studies have shown that IaC scripts often contain security smells--bad coding patterns that may introduce vulnerabilities--and have proposed static analyzers based on symbolic rules to detect them. Yet, our preliminary analysis reveals that rule-based detection alone tends to over-approximate, producing excessive false positives and increasing the burden of manual inspection. In this paper, we present IntelliSA, an intelligent static analyzer for IaC security smell detection that integrates symbolic rules with neural inference. IntelliSA applies symbolic rules to over-approximate potential smells for broad coverage, then employs neural inference to filter false positives. While an LLM can effectively perform this filtering, reliance on LLM APIs introduces high cost and latency, raises data governance concerns, and limits reproducibility and offline deployment. To address the challenges, we adopt a knowledge distillation approach: an LLM teacher generates pseudo-labels to train a compact student model--over 500x smaller--that learns from the teacher's knowledge and efficiently classifies false positives. We evaluate IntelliSA against two static analyzers and three LLM baselines (Claude-4, Grok-4, and GPT-5) using a human-labeled dataset including 241 security smells across 11,814 lines of real-world IaC code. Experimental results show that IntelliSA achieves the highest F1 score (83%), outperforming baselines by 7-42%. Moreover, IntelliSA demonstrates the best cost-effectiveness, detecting 60% of security smells while inspecting less than 2% of the codebase.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。