An Empirical Study of Policy-as-Code Adoption in Open-Source Software Projects

Patrick Loic Foalem, Foutse Khomh, Leuson Da Silva, Ettore Merlo · 2026

Read An Empirical Study of Policy-as-Code Adoption in Open-Source Software Projects by Patrick Loic Foalem, Foutse Khomh, Leuson Da Silva, Ettore Merlo (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-05555.txt.

Introduction

Patrick Loic Foalem and 3 co-authors report, in a 2026 study, the first large-scale look at Policy-as-Code adoption in open-source projects. Policy-as-Code writes governance, compliance, and security rules as code inside a system. Despite wide tool adoption, little was known about how projects actually use these tools.

The authors analyzed 399 GitHub repositories using nine popular tools, mixing usage statistics with close reading of policy files. A model-assisted classification, checked by experts, produced a taxonomy of five categories and fifteen subcategories. Adoption was diverse, often early-stage, and oriented toward governance, configuration control, and documentation. Strong co-use of some tool pairs appeared. The taxonomy should help practitioners and tool builders improve interoperability.

Catalog record

CREATORPatrick Loic Foalem, Foutse Khomh, Leuson Da Silva, Ettore Merlo
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE54 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2601-05555

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

An Empirical Study of Policy-as-Code Adoption in Open-Source Software Projects Patrick Loic Foalem, Foutse Khomh, Leuson Da Silva, Ettore Merlo Abstract Context: Policy-as-Code (PaC) has become a foundational approach for embedding governance, compliance, and security requirements directly into software systems. While organizations increasingly adopt PaC tools, the software engineering community lacks an empirical understanding of how these tools are used in real-world development practices. Objective: This paper aims to bridge this gap by conducting the first large-scale study of PaC usage in open-source software. Our goal is to characterize how PaC tools are adopted, what purposes they serve, and what governance activities they support across diverse software ecosystems. Method: We analyzed 399 GitHub repositories using nine widely adopted PaC tools. Our mixed-methods approach combines quantitative analysis of tool usage and project characteristics with a qualitative investigation of policy files. We further employ a Large Language Model (LLM)–assisted classification pipeline, refined through expert validation, to derive a taxonomy of PaC usage consisting of 5 categories and 15 sub-categories. Results: Our study reveals substantial diversity in PaC adoption. PaC tools are frequently used in early-stage projects and are heavily oriented toward governance, configuration control, and documentation. We also observe emerging PaC usage in MLOps pipelines and strong co-usage patterns, such as between OPA and Gatekeeper. Our taxonomy highlights recurring governance intents. Conclusion: Our findings offer actionable insights for practitioners and tool developers. They highlight concrete usage patterns, emphasize actual PaC usage, and motivate opportunities for improving tool interoperability. This study lays the empirical foundation for future research on PaC practices and their role in ensuring trustworthy, compliant software systems. 1 INTRODUCTION Modern software systems operate in hyper-connected environments, continuously collecting and processing vast amounts of data. As a result, they are increasingly exposed to security violations, data leaks, and operational failures [ 3 ] , which can lead to privacy breaches, regulatory non-compliance, financial penalties, service interruptions, and long-term loss of trust [ 4 ] . To address these challenges, requirements engineering and regulatory bodies have emphasized the role of policies in ensuring security, compliance, traceability, and operational governance [ 42 ] . Historically, policies were manually enforced or hard-coded, making them difficult to evolve, audit, or verify. With the rise of dynamic, distributed, and cloud-native systems, governance mandates such as GDPR, HIPAA, and the EU AI Act [ 2 ] have created demand for scalable, automated compliance mechanisms throughout the software lifecycle. Policy as Code (PaC) addresses those previously mentioned needs by encoding policies as machine-readable, version-controlled, and executable artifacts. By embedding policy logic into infrastructure and software pipelines, PaC enables proactive enforcement of security, compliance, and operational rules, thereby reducing risks of misconfiguration, unauthorized access, and regulatory violations. This approach enhances automation, traceability, and integration with modern practices such as DevOps and CI/CD [ 31 ] . A growing ecosystem of PaC tools supports this paradigm, including Open Policy Agent (OPA), Kyverno, Cloud Custodian, and HashiCorp Sentinel. OPA is a general-purpose engine with the Rego language, often integrated into platforms such as Kubernetes and Terraform [ 26 ] , while Kyverno is a Kubernetes-native engine that simplifies policy authoring through YAML configurations [ 22 ] . Despite these advances, to the best of our knowledge, there is little large-scale empirical evidence on how PaC tools are adopted and used in open-source software (OSS). Understanding their adoption is essential for identifying gaps in developer practices, guiding tool improvement, and informing future research on policy-driven governance. As a result, this paper presents the first large-scale empirical study of PaC tool adoption in OSS. We curate a comprehensive list of tools and mine a dataset of 399 GitHub repositories that employ at least one PaC tool. Our study is driven by the following research questions: • RQ1: What is the popularity of different PaC tools in OSS projects? We analyze the usage of PaC tools across OSS repositories and find that OPA, Cloud Custodian, Kyverno, and Pulumi are the most popular tools. While our findings can guide practitioners toward widely adopted tools with strong community support, widely used tools provide researchers with a baseline for studying adoption trends and practitioners with guidance toward stable, well-supported solutions. • RQ2: What kind of projects adopt PaC tools? Through manual analysis, we observe that PaC tools are primarily adopted in projects, that can be classified into categories such as documentation (37%) , tooling (32%) , and DevOps infrastructure (17%) . We also find emerging adoption in MLOps (1%) and AI/Research (0.2%) , indicating a growing interest in using PaC tools to enforce governance within intelligent systems. These findings can guide developers in understanding the types of projects where PaC tools are commonly used, helping them envision appropriate adoption scenarios. • RQ3: How is PaC used in practice across different tools? We manually inspected policy files to understand their practical purposes and developed a structured taxonomy of PaC usage, comprising five high-level categories: Workflow Automation , Cost Optimization , Security , Compliance , and Deployment Governance . Understanding the purpose of usage helps practitioners in their adoption process, as they can apply these tools for similar objectives, while also assisting tool developers in designing more effective tools that integrate most of these use cases. • RQ4: Are different PaC tools used together? Understanding whether PaC tools are used in combination is essential for assessing how organizations manage interoperability, policy consistency, and governance complexity across their infrastructure. To explore this, we examine co-usage patterns across projects and tools. Our analysis reveals that while most projects tend to adopt a single PaC tool, OPA frequently appears in combination with other tools. These insights can support practitioners in designing multi-tool adoption strategies and guide tool builders toward improved standardization and interoperability support. Paper Organization: The remainder of the paper is organized as follows. Section 2 introduces key background concepts on policies in software engineering and the PaC paradigm. Section 3 details our study methodology. Section 4 presents our results and answers to the research questions. Section 5 discusses the implications of our findings. In Section 6 , we position our study within the context of related work. Section 7 outlines threats to validity. We conclude and propose future research directions in Section 8 . 2 BACKGROUND To investigate the usage of PaC tools in modern software systems, we first clarify the core concepts and typical system architecture. In this paper, we use PaC tools to denote libraries or frameworks whose primary purpose is to express and enforce policies through code-based mechanisms. Policy as Code (PaC). PaC specifies and enforces policies as executable rules evaluated by a dedicated policy engine. A policy is a set of conditions governing system behavior, where the engine returns outcomes such as allow , warn , or deny . By exposing decisions through APIs and keeping policies separate from application code, PaC decouples governance from business logic and enables consistent, reusable, and testable enforcement across services and environments [ 45 ] . Figure 1 illustrates a reference PaC architecture. Policies are typically written in declarative formats (e.g., JSON or YAML) or a domain-specific language (Listing 1 ) processed by the engine. The engine consumes contextual inputs (e.g., request parameters, user identity, or infrastructure metadata), evaluates the

Read the complete text