arXiv Science⌕ Search

arXiv subjects

Georgios Alexopoulos

Publications and source records attributed to Georgios Alexopoulos.

5 recordsLinked to original sources

A View from the Bridge: Detecting Boundary Type Errors in Native Extensions of Dynamic Languages

Programs written in dynamic languages, such as Python and JavaScript, often rely on native extensions written in C, C++ or Rust for performance or access to system libraries. Native code accesses the raw memory of the values it receives from the host, so before using a value, it must check the value's tag, which determines its memory layout. When this check is missing, or accepts tags incompatible with the one that the native code later assumes, a boundary type error occurs, and the program crashes or silently corrupts its data. Our key insight is that finding these errors requires no inference of host-language types. Native code must check every value it obtains from the host, so the code itself provides all the information we need: its checks indicate which tags a value may have, while its operations reveal which tag they assume. We capture what native code does with host values in XLIR, a small language in which we define boundary type errors. We then detect them with a flow-sensitive analysis that tracks the tags each check establishes. At each operation, we encode whether some value can pass the preceding checks yet violate the tag that the operation assumes as a satisfiability problem, which we solve with an SMT solver. We have implemented our approach in a tool called Xtypecheck, which analyzes the LLVM IR of Node.js and CPython extensions. It detects all 72 known errors in an existing JavaScript benchmark and 33 of 42 reported in fixed GitHub issues of popular PyPI packages. In the wild, Xtypecheck finds thousands of previously unknown type errors in the native code of 268 npm and 204 PyPI packages and in the built-in standard library extensions of CPython and Node.js. It analyzes most extensions in under ten seconds, and the errors it finds range from hard crashes to silently incorrect output. We have filed 58 issues in 45 of these projects, of which 26 have been fixed.

cs.PL↗

When AI Agrees Too Much: Manipulating Automated Code Review via Bias Injection

Automated Code Review (ACR) systems integrating Large Language Models (LLMs) are increasingly adopted in software development workflows, ranging from interactive assistants to autonomous agents in CI/CD pipelines. In this paper, we study how LLM-based vulnerability detection in ACR is affected by the framing effect: the tendency to let the presentation of information override its semantic content in forming judgments. We examine whether adversaries can exploit this through contextual-bias injection (crafting PR metadata to bias ACR security judgments) as a supply-chain attack vector against real-world ACR pipelines. To this end, we first conduct a large-scale exploratory study across 6 LLMs under five framing conditions, establishing the framing effect as a systematic and widespread phenomenon in LLM-based vulnerability detection. We then design a realistic and controlled experimental environment, evaluating 33 CVEs across 20 real-world projects and two popular ACR pipelines (Claude Code and CodeRabbit), to assess the susceptibility of real-world ACR pipelines to vulnerability re-introduction attacks. We employ two attack strategies: a template-based attack inspired by prior related work, and a novel LLM-assisted refinement attack. We find that template-based attacks are ineffective and may even backfire, as direct biasing attempts raise suspicions. Our refinement attack, on the other hand, is successful in 32/33 (97%) cases, exploiting a fundamental asymmetry: attackers can iteratively refine attacks against a local clone of the review pipeline, while defenders have only one chance to detect them. Overall, our findings highlight the dangers of over-relying on ACR and stress the importance of human oversight and contributor trust in the development process.

cs.SE↗

Cross-Ecosystem Vulnerability Analysis for Python Applications

Python packages often bundle third-party native libraries (e.g., OpenSSL), a practice known as vendoring. Identifying vulnerabilities in these libraries is challenging because current scanners either ignore vendored libraries, causing false negatives, or ignore their origin, causing false positives by missing security fixes backported by OS distributions. We show that accurate cross-ecosystem vulnerability analysis requires the exact provenance of each vendored binary: its upstream project and version, and, when applicable, the specific OS package and version. We recover provenance deterministically using two complementary techniques. For binaries copied from OS packages, Python packaging tools rewrite metadata but leave executable code unchanged. We hash this code and match it against historical OS package artifacts. For libraries built from source, we generate per-library dynamic analysis rules that extract the version through callable interfaces exposed by the binary. Across 1,878 Python packages containing vendored native libraries, we resolve exact provenance in 73.4% of cases overall and 94.9% of practically relevant cases involving libraries with at least one CVE. Our approach substantially outperforms provenance-unaware methods in determining whether vendored libraries are affected by known vulnerabilities. We integrate it with existing Python and binary call-graph generators to perform the first cross-ecosystem reachability analysis of vulnerabilities in libraries vendored in Python packages. Analyzing the latest versions of the top 100,000 Python packages against 10 CVEs in native libraries, we identify 39 directly vulnerable packages with 47M+ monthly downloads and 312 transitively affected packages. We disclosed all findings to maintainers; 54 have been fixed to date.

cs.CR↗

Reducing Cold-Start Latency in Serverless Applications via Dynamic Slicing

We present PyXtrim, a system that reduces the cold-start latency of serverless applications through debloating. We focus on Python, a dominant language for serverless applications whose dynamic features and extensive use of native extensions make traditional static debloating particularly challenging. PyXtrim frames debloating as a dynamic slicing problem, using the application's externally visible behavior as the slicing criterion. Everything outside the resulting slice is removed, both from the application and its dependencies. Our key technical contribution is that the slice is computed by a cross-language dynamic dependence engine that tracks data and control dependences across Python and native code and identifies operations that interact with the operating system, which form the slicing criterion. As a result, PyXtrim can effectively handle real-world applications that rely on dynamic features such as reflection, interoperate with native code and interact with system resources. Across 31 applications on AWS Lambda, PyXtrim reduces cold-start latency by 21.7% and peak memory usage by 17.1% at the median. This is more than double the reduction achieved by the state of the art, while debloating each application in minutes.

cs.DC↗

PyTrim: A Practical Tool for Reducing Python Dependency Bloat

Dependency bloat is a persistent challenge in Python projects, which increases maintenance costs and security risks. While numerous tools exist for detecting unused dependencies in Python, removing these dependencies across the source code and configuration files of a project requires manual effort and expertise. To tackle this challenge we introduce PYTRIM, an end-to-end system to automate this process. PYTRIM eliminates unused imports and package declarations across a variety of file types, including Python source and configuration files such as requirements.txt and setup.py. PYTRIM's modular design makes it agnostic to the source of dependency bloat information, enabling integration with any detection tool. Beyond its contribution when it comes to automation, PYTRIM also incorporates a novel dynamic analysis component that improves dependency detection recall. Our evaluation of PYTRIM's end-to-end effectiveness on a ground-truth dataset of 37 merged pull requests from prior work, shows that PYTRIM achieves 98.3% accuracy in replicating human-made changes. To show its practical impact, we run PYTRIM on 971 open-source packages, identifying and trimming bloated dependencies in 39 of them. For each case, we submit a corresponding pull request, 6 of which have already been accepted and merged. PYTRIM is available as an open-source project, encouraging community contributions and further development. Video demonstration: https://youtu.be/LqTEdOUbJRI Code repository: https://github.com/TrimTeam/PyTrim

cs.SE↗