A research team presents Preflight, a verifier that examines Python dependencies before execution in the context of a specific application. The results suggest that this kind of testing can expose malicious behavior that a simple import test may miss.
Preflight first identifies the symbols an application uses from its dependencies. It then iteratively creates and validates function-level test harnesses, runs the resolved software packages in a restricted environment, and records behavioral fingerprints. When suitable comparison versions are available, it can compare behavior with earlier releases.
The evaluation covered four real software supply-chain incidents across five application contexts, as well as 100 packages considered benign. Preflight returned malicious verdicts in four incident contexts. It returned a clean verdict in the LiteLLM client context because the affected proxy-server path was not exercised there. All 100 benign packages received clean verdicts, with no false positives observed.
A controlled comparison involving Ultralytics and ctx also found that function-level harnesses exposed malicious behavior in both cases, while import-only probes exposed neither. The findings support context-specific checks, but do not establish effectiveness beyond the cases evaluated. The original paper provides details on the experimental setup and evaluation.
Source: arXiv