mlsanityData to 14 Oct 2026

Detection of security smells in IaC scripts through semantics-aware code and language processing

arXiv 2509.18790 ↗First posted 23 Sep 2025cs.CR cs.AI cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Infrastructure as Code (IaC) automates the provisioning and management of IT infrastructure through scripts and tools, streamlining software deployment. Prior studies have shown that IaC scripts often contain recurring security misconfigurations, and several detection and mitigation approaches have been proposed. Most of these rely on static analysis, using statistical code representations or Machine Learning (ML) classifiers to distinguish insecure configurations from safe code. In this work, we introduce a novel approach that enhances static analysis with semantic understanding by jointly leveraging natural language and code representations. Our method builds on two complementary ML models: CodeBERT, to capture semantics across code and text, and LongFormer, to represent long IaC scripts without losing contextual information. We evaluate our approach on misconfiguration datasets from two widely used IaC tools, Ansible and Puppet. To validate its effectiveness, we conduct two ablation studies (removing code text from the natural language input and truncating scripts to reduce context) and compare against four large language models (LLMs) and prior work. Results show that semantic enrichment substantially improves detection, raising precision and recall from 0.46 and 0.79 to 0.92 and 0.88 on Ansible, and from 0.55 and 0.97 to 0.87 and 0.75 on Puppet, respectively.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 11 of its 35 references that are in the map. First posted on arXiv 23 Sep 2025.

Builds on

11 of 35 references.

References · 11

  1. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  2. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
  3. 2024Multitask-based Evaluation of Open-Source LLM on Software Vulnerabilitycited by 23
  4. 2025Everything You Wanted to Know About LLM-based Vulnerability Detection But Were Afraid to Askcited by 15
  5. 2024GenKubeSec: LLM-Based Kubernetes Misconfiguration Detection, Localization, Reasoning, and Remediationcited by 11
  6. 2024Analyzing and Mitigating (with LLMs) the Security Misconfigurations of Helm Charts from Artifact Hubcited by 8
  7. 2023A Survey on Automated Software Vulnerability Detection Using Machine Learning and Deep Learningcited by 7
  8. 2022GLITCH: Automated Polyglot Security Smell Detection in Infrastructure as Codecited by 5
  9. 2024LLM-Based Misconfiguration Detection for AWS Serverless Computingcited by 5
  10. 2020DeepIaC: Deep Learning-Based Linguistic Anti-pattern Detection in IaCcited by 2
  11. 2022Static Analysis of Infrastructure as Code: a Surveycited by 2

Built on by

Not cited yet.