ARPaCCino: An Agentic-RAG for Policy as Code Compliance

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Romeo, Francesco, Arena, Luigi, Blefari, Francesco, Pironti, Francesco Aurelio, Lupinacci, Matteo, Furfaro, Angelo
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918185536585728
author Romeo, Francesco
Arena, Luigi
Blefari, Francesco
Pironti, Francesco Aurelio
Lupinacci, Matteo
Furfaro, Angelo
author_facet Romeo, Francesco
Arena, Luigi
Blefari, Francesco
Pironti, Francesco Aurelio
Lupinacci, Matteo
Furfaro, Angelo
contents Policy as Code (PaC) is a paradigm that encodes security and compliance policies into machine-readable formats, enabling automated enforcement in Infrastructure as Code (IaC) environments. However, its adoption is hindered by the complexity of policy languages and the risk of misconfigurations. In this work, we present ARPaCCino, an agentic system that combines Large Language Models (LLMs), Retrieval-Augmented-Generation (RAG), and tool-based validation to automate the generation and verification of PaC rules. Given natural language descriptions of the desired policies, ARPaCCino generates formal Rego rules, assesses IaC compliance, and iteratively refines the IaC configurations to ensure conformance. Thanks to its modular agentic architecture and integration with external tools and knowledge bases, ARPaCCino supports policy validation across a wide range of technologies, including niche or emerging IaC frameworks. Experimental evaluation involving a Terraform-based case study demonstrates ARPaCCino's effectiveness in generating syntactically and semantically correct policies, identifying non-compliant infrastructures, and applying corrective modifications, even when using smaller, open-weight LLMs. Our results highlight the potential of agentic RAG architectures to enhance the automation, reliability, and accessibility of PaC workflows.
format Preprint
id arxiv_https___arxiv_org_abs_2507_10584
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ARPaCCino: An Agentic-RAG for Policy as Code Compliance
Romeo, Francesco
Arena, Luigi
Blefari, Francesco
Pironti, Francesco Aurelio
Lupinacci, Matteo
Furfaro, Angelo
Software Engineering
Artificial Intelligence
Policy as Code (PaC) is a paradigm that encodes security and compliance policies into machine-readable formats, enabling automated enforcement in Infrastructure as Code (IaC) environments. However, its adoption is hindered by the complexity of policy languages and the risk of misconfigurations. In this work, we present ARPaCCino, an agentic system that combines Large Language Models (LLMs), Retrieval-Augmented-Generation (RAG), and tool-based validation to automate the generation and verification of PaC rules. Given natural language descriptions of the desired policies, ARPaCCino generates formal Rego rules, assesses IaC compliance, and iteratively refines the IaC configurations to ensure conformance. Thanks to its modular agentic architecture and integration with external tools and knowledge bases, ARPaCCino supports policy validation across a wide range of technologies, including niche or emerging IaC frameworks. Experimental evaluation involving a Terraform-based case study demonstrates ARPaCCino's effectiveness in generating syntactically and semantically correct policies, identifying non-compliant infrastructures, and applying corrective modifications, even when using smaller, open-weight LLMs. Our results highlight the potential of agentic RAG architectures to enhance the automation, reliability, and accessibility of PaC workflows.
title ARPaCCino: An Agentic-RAG for Policy as Code Compliance
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2507.10584