TRANSMISSION // 2611.31110v1
Testing Dependencies in the Context of Their Apps
Source published
Preflight tests Python dependencies by exercising functions an application references. Small experiments found behavior missed by import-only checks, but do not establish broad detection performance.

A dependency may appear harmless when merely imported, yet behave differently when a program calls a particular function. Preflight aims to test Python packages in that application-specific context before they run in the application.
Software packages often run with the permissions of the applications that use them. A compromised dependency may therefore reach sensitive resources, such as credentials or local files. Checking a package’s origin, scanning its source, or importing it in a test may not reveal behavior that appears only when a particular function is called.
A paper introduces Preflight, a system designed to test Python dependencies in the context of a specific downstream application. Its central question is whether exercising the parts of a package an application references can reveal security-relevant behavior that package-level checks—or a simple import—might miss.
How Preflight works
Preflight analyzes an application’s Python code to identify imported packages and referenced symbols, such as functions or constructors. It matches dependencies to pinned versions in a lockfile, then uses a language model to propose small test programs, called harnesses, that invoke the referenced symbols. Deterministic checks validate each harness; the model may revise rejected proposals within a limited number of attempts.
The system installs and runs the package and harness in a restricted Docker environment. It records activity such as network connections, sensitive environment-variable access, file writes, and subprocess creation. When a suitable earlier version exists, Preflight compares the newer version’s behavior with that baseline. It combines this evidence with static-analysis findings to produce a clean, suspicious, or malicious verdict. Signed certificates bind results to the analyzed application and dependency state.
The model’s role is limited to helping construct harnesses: according to the paper, it does not decide the verdict or interpret raw runtime traces. In the reported incident cases, attempts at model-assisted verdict synthesis exceeded input-size or context limits, so deterministic rules produced the final verdicts.
What the tests found
The researchers tested four software-supply-chain incidents across five application contexts, along with 100 benign packages and a comparison of function-level tests with import-only probing. Preflight labeled four incident contexts malicious and one clean. The clean result was for a LiteLLM client workload that did not exercise the compromised proxy-server path. A separate proxy workload did exercise that path and received a malicious verdict. This illustrates the system’s intended scope: a verdict concerns behavior observed through the tested application surface, not a universal judgment about a package in every possible use.
All 100 packages in the benign test set received clean verdicts, with no observed false positives. In the two-case comparison, function-level harnesses exposed malicious behavior in both Ultralytics and ctx, while import-only probes exposed neither. These results support the narrower point that calling application-referenced functionality can reveal behavior that importing alone missed in these examples.
A malicious verdict does not necessarily mean every anticipated behavior was detected. In some incident tests, Preflight returned that verdict without observing every behavior researchers expected. For DurableTask, it observed network-related activity but not the anticipated file write or subprocess. Because the test used no defensible benign predecessor, it could not establish that the observed capabilities were newly introduced in a particular version.
What remains uncertain
This is an early evaluation, not evidence that Preflight catches supply-chain attacks in general. Four incidents and five application contexts make a limited test set. The 100 benign packages represent specific exercised workloads, not every possible way those packages might be used. Reflection, dynamically constructed imports, plugins, unusual inputs, or environment-dependent behavior may fall outside the analyzed or exercised surface. A prior version is also a behavioral reference, not proof that it was benign.
The comparison tested function-level versus import-only execution; it did not show that AI-generated harnesses outperform carefully written deterministic tests. The paper also notes that the Docker sandbox could be strengthened. Although the system collects traces from installation and execution, its canonical behavioral representation does not provide complete phase attribution among installation, import, and explicit API execution.
The paper describes itself as accepted at the AI for Science workshop at NeurIPS 2026. That publication status is reported by the authors; it is not independently verified here. The supplied arXiv record has a future publication date, so the timing and status should be treated cautiously. In any case, workshop acceptance is not independent confirmation of real-world detection rates. The experiments provide evidence about this prototype and these cases. Broader testing across attack types, applications, and package ecosystems would be needed to establish how useful the approach is in practice.
- software supply chain
- Python security
- dependency verification
- malicious packages
- sandboxing
- AI software
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.