arXiv(opens in a new tab)cs.CROct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.01263

Autonomous OSS Threat Detection via Taxonomy-Aligned LLMs

Md. Robiul Islam Niloy

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Open source software (OSS) ecosystems face growing threats from sophisticated supply chain attacks including typosquatting, dependency confusion, Trojan Source obfuscation, malicious build injection, and CI/CD pipeline poisoning. Existing detection approaches rely on signature-based tools and rule-based systems that struggle to generalize across attack variants and emerging threat patterns. In this paper we propose a taxonomy-aligned large language model framework for automated detection and classification of OSS supply chain threats. We introduce a structured AV-xxx threat taxonomy covering five attack categories and construct a curated dataset of 999 verified real-world OSS supply chain incidents sourced from GitHub Security Advisories, CISA alerts, and security research reports spanning 2018 to 2026. Using taxonomy-aligned prompt engineering with GPT-4, our framework achieves 97.0% multi-class classification accuracy and 97.0% macro F1 score across all five threat categories. Comparative evaluation against five traditional machine learning baselines, one zero-shot open source LLM, and two fine-tuned neural models reveals a surprising finding: fine-tuned Llama 3.1 8B (70.5%) and SecRoBERTa (77.5%) both underperform simple TF-IDF classifiers (82.3%), while Mistral 7B without taxonomy alignment achieves only 65.7%. These results confirm that taxonomy-aligned prompting rather than model scale, domain pretraining, or fine-tuning is the critical factor enabling high classification accuracy. Our dataset and code are publicly available to support reproducible supply chain security research.

Keywords: software supply chain security, large language models, threat classification, OSS security, taxonomy-aligned prompting, dependency confusion, typosquatting, pipeline poisoning

1 Introduction

Open source software (OSS) underpins critical infrastructure, commercial platforms, and research ecosystems worldwide. The Linux Foundation estimates that open source components comprise 70 to 90 percent of modern application codebases [19], making the OSS supply chain a high-value target for adversaries seeking broad downstream impact through a single compromise point.

Supply chain attacks against OSS ecosystems have escalated dramatically in recent years. Attackers exploit the implicit trust relationships within developer communities by injecting malicious packages into public registries, manipulating build scripts, and poisoning CI/CD pipelines. High-profile incidents including the XZ Utils backdoor (CVE-2024-3094), the tj-actions/changed-files compromise (CVE-2025-30066) [5] affecting over 23,000 repositories, and coordinated campaigns by threat actors such as

TeamPCP and Lazarus Group demonstrate that OSS supply chain attacks have evolved from isolated incidents into systematic campaigns operating at ecosystem scale [6] [7].

Despite growing awareness, a critical gap remains between academic threat taxonomies and operational detection capabilities. Existing tools rely on rule-based or signature-driven approaches that lack the semantic understanding needed to generalize across attack variants. Furthermore, no systematic framework exists for classifying diverse OSS supply chain threats according to a unified taxonomy that spans the full attack surface from package registry manipulation to pipeline poisoning.

In this paper we propose a taxonomy-aligned large language model (LLM) framework for automated classification of OSS supply chain threats. Our approach introduces a structured AV-xxx threat taxonomy covering five attack categories: typosquatting (AV-200), Trojan Source obfuscation (AV-300), malicious build injection (AV-400), pipeline poisoning (AV-410), and dependency confusion (AV-509). Using taxonomy-aligned prompt engineering with GPT-4, we demonstrate that LLMs can accurately classify supply chain threats with significantly higher accuracy than traditional machine learning approaches, fine-tuned neural models, and zero-shot open source LLMs.

Our main contributions are as follows:

• We construct a curated dataset of 999 verified real-world OSS supply chain incidents sourced from GitHub Security Advisories, CISA alerts, NHS England Digital advisories, and security research reports spanning 2018 to 2026, covering five attack categories across multiple package ecosystems including npm, PyPI, RubyGems, Cargo, Maven, and Go modules.

• We propose a taxonomy-aligned prompt engineering strategy that guides GPT-4 to classify OSS supply chain threats with 97.0% accuracy and 97.0% macro F1 score, outperforming the strongest traditional baseline (TF-IDF + Logistic Regression at 82.3%) by 14.7 percentage points.

• We conduct a comprehensive comparative evaluation against five traditional machine learning baselines, one zero-shot open source LLM (Mistral 7B), and two fine-tuned neural models (Llama 3.1 8B and SecRoBERTa), revealing that fine-tuned models surprisingly underperform simple TF-IDF classifiers, confirming that taxonomy-aligned prompting rather than model scale or fine-tuning is the critical performance factor.

• We release our dataset, fine-tuning scripts, and experimental code publicly to support reproducible research in automated OSS supply chain threat detection.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 presents our dataset construction methodology. Section 4 describes our taxonomy-aligned LLM classification framework. Section 5 presents experimental results and comparative evaluation. Section 7 concludes the paper.

References (26)