arXiv:2610.28794cs.CROct 2026

Manuscript Offprint

arXiv:2610.28794

Sign Here: Attributing a Source for a More Trustworthy Software Supply Chain

Derek Garcia

Derek Garcia

Chainguard

derek.garcia@chainguard.dev

Abstract—Software supply chain attacks continue to be on the rise, exploiting the trust that helps open source ecosystems thrive. Recent incidents like the Shai-Hulud worm and the Axios compromise demonstrate that a single malicious package can have wide reaching and devastating impacts overnight. These high profile attacks can be traced back to the same culprit: package registries. Although they are a useful convenience to pull prebuilt packages from, is such a commonly exploited component of the software supply chain worth the risk? In this paper, we investigate whether removing the registry from the developer workflow by building packages directly from source can serve as a malware prevention strategy - effectively removing an entire attack surface. Our hypothesis is that malicious packages avoid attributing a source to minimize visibility, while benign packages seek exposure and therefore link to their repositories. We evaluate this through three research questions: how effective is building from source at avoiding malware, how feasible is it to build from source in the current state of the supply chain, and how the building from source strategy compares to state-of-the-art security scanners. To do so, we (1) construct an aggregate dataset of 47,066 unique malicious packages from four academic and one industry malicious datasets source across npm and PyPI ecosystems, (2) build a snapshot index of all 3.9 million npm and 764 thousand PyPI packages, and (3) analyze all malicious samples alongside a statistically significant sample of 16,569 packages from each registry, totaling 33,138 packages. We find that simply checking for a source has a success rate between 87.7 and 99.9 percent of preventing malware, depending on the level of source vetting. Consequently, there is a significant lack of transparency within benign packages, with only 47.4 percent attributing a source an end user could build from. Our detailed analysis can dataset is publicly available at https://github.com/chainguard-sandbox/build-from-source.

Index Terms—Open Source, Software Supply Chain, PyPI, npm, Software Transparency, Malware Detection

I. INTRODUCTION

The open source ecosystem operates heavily on trust which has greatly benefited the community. Unfortunately, threat actors also know this and often abuse this trust to perform impactful and widespread attacks. A software supply chain attack is a type of cyber attack where a threat actor compromises or introduces a malicious package into the open source ecosystem that is then consumed by downstream developers, who assume the package they installed is benign [38]. This can be done utilizing methods like dependency confusion [31] or typosquatting [54], in which an attacker publishes a malicious package with a similar name in an attempt to get a user to download the packages, such as “nunpy” opposed to “numpy”. Once ingested, attackers have free reign to perform secret exfiltration, remote code execution (RCE), and other malicious activities [13], [27], [46] without the end user’s knowledge. These software supply chain attacks have been on the rise and have continued to occur more and more frequently [50] with high profile attacks such as the Shai-Hulud and the Axios supply chain attacks impacting thousands of downstream packages overnight [7], [45]. The sources of these attacks can trace to the same origin: distribution. Threat actors are able to introduce malicious packages through various means, but ultimately rely on a package registry like npm or PyPI as a means of distribution. Since the registry presents a large attack surface, would it be possible to remove the registry from a developer’s workflow entirely? We hypothesize that a malicious package would attempt to appear as inconspicuous as possible, which would include not attributing a source since that would lead to greater visibility and a higher potential of being found. The motivation for this work is based on our prior internal research where we have examined both the npm and PyPI ecosystems at a smaller scale. We examined eight and three thousand malicious npm and PyPI packages respectively and attempted to extract attributed sources and verify if they existed, if present. We found in both ecosystems nearly 100 percent of packages lack the proper attribution to reliably build the package from source [18], [25]. These smaller case studies were promising, resulting in our next step to scale up our dataset to examine the effectiveness of our approach at scale. We also hypothesize that developers of benign packages would desire as much exposure as possible. A benign package would include this link for users to find documentation or open issues, generally increasing a package’s visibility. Using this source, downstream developers can clone and build packages directly, circumventing the registry entirely. To explore this dynamic as a means of malware prevention, we aim to answer three research questions:

• RQ 1: How effective is building from source at avoiding malware?

• RQ 2: How feasible is it to build from source given the current state of the software supply chain?

• RQ 3: How does building from source compare to state-of-the-art (SOTA) security scanners?

The contributions of this research are three-fold. First, we create an aggregate malicious package dataset totaling 47,066 unique samples sourced from four academic and one industry datasets for the npm and PyPI ecosystems. Second, we create a snapshot index dataset of all 3.9 million npm and 764 thousand PyPI packages from their respective registries. Third, we perform detailed analysis on all 47 thousand malicious packages and a statistically significant sample size of 16,569 packages from npm and PyPI respectively. Our detailed analysis and dataset is publicly available at https://github.com/chainguard-sandbox/build-from-source.

The remainder of this paper is structured as follows: section II discusses the surrounding context of supply chain attacks, section III reviews related work in this area, section IV details how we constructed our aggregate malicious and benign package datasets, section V introduces our approach to examining the attributed source of packages, section VI discusses our findings of our approach, section VII reviews the implications of our work, section VIII addresses any threats to the validity of findings, and section IX summarizes our work.

References (31)