Paper · Open source and society · Version 1
Securing the open-source ecosystem: AI-enhanced and explainable supply chain security for reliable software development
First published: Scientific Reports, . Original
Copyright the authors. Licensed under Creative Commons Attribution 4.0 International.
This page holds the text of the paper, converted to HTML; figures may be left out.
Proposes a machine-learning system that runs in build pipelines and flags suspicious open-source dependencies, such as poisoned models or hijacked packages, and explains each alert. It targets attacks that tools built around known vulnerabilities miss.
Abstract
Modern software supply chains face increasing risks from vulnerable and anomalous dependencies, necessitating automated and interpretable detection methods integrated within Continuous Integration and Continuous Deployment (CI/CD) workflows. Open-source software (OSS) ecosystems are increasingly targeted by sophisticated attacks—including AI model poisoning, dependency confusion, contributor hijacking, and transitive dependency anomalies—that often evade traditional CVE-centric tools such as Snyk and Dependabot. These reactive solutions are primarily designed for known vulnerabilities and may exhibit high false-positive rates when applied to behavioral anomalies, while also lacking interpretable and actionable guidance for developers. This limitation creates a critical barrier to reliable and secure software development in modern DevSecOps environments. To address this gap, this paper introduces XAI-SCS, an intelligent, explainable decision-support framework for OSS supply chain security that performs metadata-driven behavioral risk assessment to proactively identify anomalous package activity. A hybrid CNN–LSTM–Autoencoder architecture achieves strong anomaly-detection performance on the held-out test set (F1 = 0.91), with low repeated-run variability (mean F1 = 0.90 ± 0.02 across five runs) on a federated dataset of 12,000 npm/PyPI package versions, primarily trained using CVE-linked labels and GAN-simulated poisoning samples. A separate held-out evaluation set of 240 manually curated real-world non-CVE OSS supply-chain incidents was used exclusively for external generalization assessment. Accordingly, the non-CVE results are interpreted as preliminary evidence of transferability to selected metadata-visible behavioral anomalies rather than comprehensive real-world non-CVE threat coverage. To support transparent developer decision-making, SHAP-based explanations and counterfactual remediation suggestions produced high perceived clarity (4.3 ± 0.4/5) and actionability (4.1 ± 0.5/5) and self-reported remediation intent (96%, n = 82). However, these findings reflect developer perceptions in a controlled study and do not yet demonstrate measured improvements in real-world remediation time, fix completion, or vulnerability resolution within operational DevSecOps teams. Optional high-assurance deployment extensions, including Federated Continual Learning, zero-knowledge attestation via zk-SNARKs, and post-quantum secure enclaves, are presented as exploratory architectural pathways for future privacy-preserving, verifiable, and confidential deployment, rather than as part of the core empirical evaluation. Embedded in controlled, CI/CD-representative workflows with 0.8-second average latency, XAI-SCS remains competitive with CVE-centric tools on known-vulnerability cases while providing preliminary evidence of complementary metadata-level behavioral risk screening in GAN-simulated and limited curated non-CVE evaluation subsets. The comparison is therefore interpreted as evidence that XAI-SCS can complement CVE-centric SCA tools by adding metadata-level behavioral screening and developer-facing explanations, rather than replacing or universally outperforming tools such as Snyk and Dependabot. This work’s primary contribution is a metadata-driven, CI/CD-integrated intelligent decision-support framework that delivers high-accuracy behavioral anomaly detection (F1 = 0.91) and transparent, developer-facing explanations (clarity 4.3/5, remediation intent 96%) for OSS supply chain risk assessment. Optional high-assurance deployment extensions (federated learning, cryptographic attestation, secure enclaves) are discussed separately and do not form part of the core empirical evaluation.
Introduction
Background
Open-source software (OSS) plays a central role in contemporary software engineering, supporting cloud platforms, embedded systems, and enterprise applications through reusable, community-maintained components. Public registries such as the Node Package Manager (npm) and the Python Package Index (PyPI), together with distributed contributor models, facilitate rapid integration and collaborative development. These same characteristics—large dependency graphs, transitive trust relationships, and automated Continuous Integration/Continuous Deployment (CI/CD) ingestion—can also increase exposure to supply chain risks, including dependency confusion, malicious package uploads, contributor account compromise, and inconsistent versioning practices.
Several widely discussed incidents illustrate these concerns. The SolarWinds compromise involved tampered build artifacts that propagated through trusted update channels, while Log4Shell (CVE-2021-44228) demonstrated how a transitive dependency issue in a frequently used library could require extensive downstream mitigation. These examples highlight a recurring challenge: many OSS packages are integrated into CI/CD workflows with limited validation of provenance or dependency structure, and reliance on static Common Vulnerabilities and Exposures (CVE) checks may not surface all categories of risk.
Commonly used tools—such as Snyk and Dependabot—primarily emphasize CVE-based scanning and rule-driven matching. While effective for known vulnerabilities, these tools provide variable visibility into behavioral or metadata-level anomalies and often return alerts without detailed contextual explanations. As OSS usage continues to expand within DevSecOps practices, there is growing interest in mechanisms that analyze registry metadata more comprehensively and present findings in a way that supports informed, timely decision-making within CI/CD pipelines.
Research motivation
Open-source software (OSS) components appear in a substantial proportion of contemporary applications and are often incorporated automatically into Continuous Integration/Continuous Deployment (CI/CD) pipelines. This widespread use makes dependable supply chain risk management an important consideration within Development, Security, and Operations (DevSecOps) practices. Commonly used security tools—such as Snyk, the GitHub Advisory Database, and Microsoft OSSGadget—rely primarily on Common Vulnerabilities and Exposures (CVE) databases and signature-based matching to identify known issues. While these approaches are effective for reported CVEs, they may not capture non-CVE risks such as dependency confusion, contributor account compromise, transitive anomalies, or inconsistent versioning patterns. In addition, these tools frequently produce high-volume, low-context alerts, which can contribute to alert fatigue and make it difficult for developers to prioritize remediation actions.
Artificial intelligence (AI) and machine learning (ML) techniques offer the potential to identify behavioral or structural patterns in package metadata, dependency graphs, and contributor activity that are not easily captured by static analysis. However, many existing AI-driven security solutions operate as black-box models, generating risk scores without transparent explanations or clear guidance for developers. This limited interpretability constrains their suitability for CI/CD settings, where teams require accurate, comprehensible, and actionable information to support real-time decisions—such as reviewing flagged dependencies or adjusting pipeline policies—while maintaining workflow efficiency and consistent software delivery processes.
Baseline studies and research gap
Existing open-source software (OSS) security tools—such as Snyk, the GitHub Advisory Database, and Microsoft OSSGadget—rely primarily on Common Vulnerabilities and Exposures (CVE) databases and static rule-based engines to identify documented issues. These approaches are effective for known vulnerabilities but offer limited coverage of non-CVE supply chain risks, including dependency confusion, contributor account compromise, transitive dependency anomalies, and irregular versioning patterns. In addition, current tools provide minimal insight into behavioral aspects of dependency structures or contributor activity, and often generate high alert volumes with limited contextual explanation, making it difficult for developers to evaluate findings within Continuous Integration/Continuous Deployment (CI/CD) workflows.
Studies on artificial intelligence (AI) and machine learning (ML) for software security report related constraints. Suneja et al. demonstrate that ML models can detect metadata-level anomalies, but the lack of transparent reasoning limits developer trust and operational usefulness. Kula documents alert fatigue in Dependabot, where frequent notifications without clear justification lead to reduced attention to valid risks. Explainable AI (XAI) techniques—such as those explored by Sivamohan et al., Sarker et al., and Rahman et al.—show the value of interpretability in domains such as intrusion detection and infrastructure risk assessment. However, these methods are not designed for OSS-specific characteristics, such as dependency graph depth, version sequencing behavior, or registry-derived metadata, and therefore do not directly support decision-making needs in Development, Security, and Operations (DevSecOps) environments.
This gap does not imply that existing tools such as Snyk and Dependabot should be replaced. Rather, it indicates the need for a complementary decision-support layer that can operate alongside CVE-centric scanners by adding metadata-level behavioral signals and interpretable remediation guidance.
The proposed XAI-SCS framework addresses this core gap through:
- RQ1: CNNs, LSTMs, and Autoencoders for behavioral anomaly detection in package metadata and dependency graphs;
- RQ2: SHAP attributions and counterfactual explanations to enable developer-centric decision-making;
- RQ3: Comparative benchmarking of accuracy, explanation clarity, and CI/CD integration against Snyk and Dependabot.
To outline possible future high-assurance deployment pathways, the framework also briefly considers optional extensions for privacy-preserving adaptation, provenance verification, and confidential execution. These extensions correspond to RQ4–RQ6, are exploratory in scope, and are not part of the primary empirical contribution.
Problem statement
How can a metadata-driven, AI-enhanced decision-support framework be integrated into open-source software supply chains to support the screening of selected metadata-level non-CVE risk indicators—such as dependency confusion patterns, contributor-activity irregularities, and transitive dependency anomalies—while providing transparent and actionable explanations that support effective developer decision-making in real-time CI/CD workflows?
Research questions
The XAI-SCS intelligent decision-support framework is evaluated through a focused set of research questions that examine its core capabilities in anomaly detection, explanation quality, and practical CI/CD integration, together with exploratory questions on potential high-assurance deployment extensions.
The primary empirical evaluation centers on RQ1–RQ3, which address the main contribution of the framework: metadata-driven behavioral anomaly detection, transparent developer-facing explanations, and fair benchmarking in real CI/CD workflows. RQ4–RQ6 explore optional architectural extensions for enhanced adaptability, verifiability, and secure execution; these are treated as preliminary and illustrative, with limited evaluation in this work and are not required for the validity of the core results.
RQ1 — Inference Capability:
Can the Hybrid Inference Engine, implemented using CNN, LSTM, and Autoencoder components, reliably detect behavioral anomalies and simulated poisoning attacks using only OSS metadata and dependency structures?
RQ2 — Explanation and Justification:
Do SHAP-based attributions and counterfactual reasoning, as implemented in the Explanation Facility, provide transparent and actionable feedback suitable for developer decision-making in CI/CD workflows?
RQ3 — System Integration and Benchmarking:
How does XAI-SCS complement CVE-centric tools such as Snyk and Dependabot on known-vulnerability cases, and to what extent does it provide additional metadata-level screening signals for controlled non-CVE behavioral anomaly scenarios in CI/CD-representative workflows?
RQ4 — Exploratory Privacy-Preserving Adaptation:
Can optional privacy-preserving model adaptation provide a feasible pathway for future cross-registry learning without sharing raw metadata?
RQ5 — Exploratory Provenance Verification:
Can optional cryptographic attestation provide a feasible pathway for verifying SBOM and risk-score provenance in future high-assurance CI/CD workflows??
RQ6 — Exploratory Confidential Execution:
Can optional secure execution provide a feasible pathway for protecting inference in future untrusted CI/CD environments?
Research contributions
This paper introduces XAI-SCS as an integrated intelligent decision-support framework for open-source software (OSS) supply chain security, designed to assist developers and CI/CD systems in making informed, explainable, and verifiable risk decisions. Rather than presenting XAI-SCS as a classical rule-based expert system, this study positions it as an intelligent decision-support framework that operationalizes selected expert-system principles—knowledge acquisition, evidence-based inference, explanation, and decision output—through learning-based and explainability components. Inference is performed by the Hybrid Inference Engine, while decision assistance is handled by a separate Decision-Support Layer that maps model outputs into risk tiers, explanations, and CI/CD actions. Justification and verification are provided through SHAP-based explanations, counterfactual remediation guidance, and cryptographic attestation, enabling auditable and policy-aligned decision support.
This paper makes the following contributions to intelligent decision-support for dependable open-source software (OSS) supply chain security, with a focus on metadata-driven risk assessment, CI/CD integration, and developer-facing explainability:
1.
An integrated, metadata-driven risk scoring framework that combines Convolutional Neural Networks (CNNs), Long Short-Term Memory networks (LSTMs), and Autoencoders to analyze structural, temporal, and latent patterns in OSS registry metadata. The framework is evaluated on a federated dataset of 12,000 npm and PyPI package versions, including GAN-simulated poisoning instances, and achieves an overall F1-score of 0.91. This demonstrates effective identification of anomalous package behavior in a dataset dominated by CVE-linked and GAN-simulated labels. Claims regarding real-world non-CVE risks are therefore restricted to a smaller curated test subset and are interpreted as preliminary evidence of generalization to metadata-level behavioral anomalies rather than broad or comprehensive real-world non-CVE attack coverage (RQ1).
2.
A decision-support–oriented explanation facility that integrates SHapley Additive exPlanations (SHAP) with counterfactual reasoning to provide transparent and actionable justifications for risk scores. A controlled developer study (n = 82) reported mean perceived explanation clarity and actionability scores of 4.3 ± 0.4/5 and 4.1 ± 0.5/5 (mean ± SD; n = 82), respectively, with 96% of participants indicating self-reported remediation intent. These findings show that XAI-SCS improves perceived usefulness and decision-support value in CI/CD-style tasks. However, the study does not yet establish whether the framework reduces actual remediation time, improves fix quality, increases patch completion rates, or improves vulnerability-resolution outcomes in operational DevSecOps teams. Such real-world behavioral outcomes require longitudinal field deployment and are reserved for future work.
3.
A scope-separated empirical comparison with CVE-centric tools, including Snyk and Dependabot. The comparison is interpreted according to tool design: CVE-only cases are used to assess whether XAI-SCS remains compatible with established vulnerability-scanning workflows, while GAN-simulated poisoning and curated non-CVE behavioral anomalies are used to examine whether XAI-SCS can provide complementary metadata-level decision-support signals. The results do not imply that XAI-SCS replaces or universally outperforms existing SCA tools; instead, they show how it can enhance such tools by adding behavioral screening and explainable remediation support (RQ3).
4.
CI/CD-native deployment of the decision-support framework in GitHub Actions and GitLab CI, enabling real-time risk assessment and enforcement with minimal overhead. The framework incorporates optional architectural extensions, including:
Optional high-assurance extensions are briefly discussed to indicate possible future deployment pathways for privacy-preserving adaptation, provenance verification, and confidential execution. These components are not treated as primary contributions and are not used to support the main empirical claims.Overall, XAI-SCS is positioned as an integrated intelligent decision-support framework rather than a classical rule-based expert system. Its novelty lies in the principled integration of metadata-driven risk inference, explicit decision logic, and explainable outputs within CI/CD pipelines, delivering actionable and trustworthy support for OSS supply chain risk management with an average end-to-end inference latency of approximately 0.8 s.
Scope and Contribution Delimitation: The central and empirically validated contribution of this study is the design, implementation, and evaluation of a metadata-only OSS risk scoring and intelligent decision-support framework that operates natively in CI/CD pipelines and provides actionable, explainable outputs to developers. Components such as Federated Continual Learning with Differential Privacy, zero-knowledge attestation via zk-SNARKs, post-quantum secure enclaves (Intel SGX + ML-DSA), and SLSA alignment are included solely to demonstrate potential deployment pathways in high-assurance environments. These extensions are preliminary, not independently evaluated in depth, and explicitly fall outside the scope of the main results (RQ1–RQ3). All claims related to privacy preservation, cryptographic verifiability, and quantum resistance are accordingly qualified as illustrative rather than core findings.
Terminology Clarification: Throughout this manuscript, XAI-SCS framework refers to the complete proposed system. The Hybrid Inference Engine refers specifically to the CNN–LSTM–Autoencoder anomaly-detection component. The Explanation Facility refers to the SHAP and counterfactual explanation component. The Decision-Support Layer converts model outputs into risk tiers, recommendations, and CI/CD actions. The CI/CD Execution Environment denotes the controlled GitHub Actions/GitLab CI setting used for evaluation. The term “expert system” is used only conceptually to describe selected principles of knowledge acquisition, inference, explanation, and decision support, not to classify XAI-SCS as a classical rule-based expert system.
Paper organization
The remainder of this paper is structured as follows. Section 2 reviews related work in OSS supply chain security, AI-based anomaly detection, and explainable decision support. Section 3 presents the core XAI-SCS methodology, including metadata acquisition, hybrid inference, explanation generation, and CI/CD integration. Section 4 reports the experimental results for anomaly detection, explanation quality, and benchmarking against existing tools. Section 5 concludes the paper and outlines future work. Detailed descriptions of optional high-assurance deployment extensions are provided separately in Appendix B.
Related work
Open-source software (OSS) supply chain security represents a critical challenge for dependable systems development and intelligent decision-support in modern software engineering. As DevSecOps workflows increasingly automate third-party package ingestion into CI/CD pipelines, undetected anomalies in dependencies undermine system reliability, security, and safety. This section reviews state-of-the-art vulnerability scanners (e.g., Snyk, Dependabot), AI-based anomaly detection models, and explainable AI mechanisms, assessing their detection effectiveness, decision-support usability, and seamless integration within the software lifecycle—core dimensions of evidence-based, intelligent software engineering practice.
OSS supply chain security tools such as Snyk, the GitHub Advisory Database, and Microsoft OSSGadget rely on CVE databases and static rules. Williams et al. report that these tools detect known vulnerabilities but do not cover risks such as dependency confusion, contributor hijacking, or version laundering. They also note that automated alerts lack clear explanations, which reduces developer response. Suneja et al. evaluate AI models for code analysis and find that high detection accuracy does not lead to use in practice when outputs are not explained. This supports the need for methods that provide reasoning for alert. Kula examines Dependabot and reports high alert volume with low remediation rates. The study recommends clearer reporting but does not include developer-facing explanations for OSS dependencies. This relates to RQ3, which compares detection accuracy, explanation clarity, and CI/CD integration. Other studies apply AI to anomaly detection in financial or logistics supply chains. Sarker et al. and Rahman et al. use SHAP and blockchain for explainability in infrastructure systems. These works show the value of interpretability but do not address OSS dependency graphs, registry data, or CI/CD pipelines. Existing tools and studies identify three limitations: (i) reliance on known CVEs, (ii) lack of behavioral analysis for transitive dependencies, and (iii) absence of actionable explanations in developer workflows.
XAI-SCS addresses these through CNN-LSTM-Autoencoder models for anomaly detection (RQ1), SHAP-based and counterfactual explanations (RQ2), and comparisons with Snyk and Dependabot (RQ3). Federated continual learning with differential privacy (RQ4), zero-knowledge attestation of SBOMs and risk scores (RQ5), and post-quantum secure enclaves (RQ6) are discussed as optional exploratory deployment extensions and are not treated as part of the core empirical evaluation. Table 1 presents a comparative review of selected studies.
Table 1 Comparison of related works and tools.
| Study | Domain focus | Uses AI | Explainability support | OSS focus | CI/CD integration |
|---|---|---|---|---|---|
| Williams et al. | OSS supply chain security | No | Notes lack of clear explanations | Yes | Not supported |
| Suneja et al. | Code analysis | Yes | Reports missing explanations | No | Not supported |
| Kula | OSS dependency management | No | Recommends clearer reporting | Yes | Partial |
| Osunkanmibi et al. | Financial supply chains | Yes | Not addressed | No | Not supported |
| Chukwu et al. | Logistics supply chains | Yes | Not addressed | No | Not supported |
| Sarker et al. | Digital twin security | Yes | Uses SHAP and attention | No | Not supported |
| Rahman et al. | IT infrastructure risk | Yes | Uses blockchain-based output | No | Not supported |
| Snyk | OSS vulnerability scanning | No | None | Yes | Partial |
| GitHub Advisory | OSS vulnerability database | No | None | Yes | Partial |
| OSSGadget | OSS metadata scanning | No | None | Yes | Partial |
| Dependabot | OSS dependency updates | No | None | Yes | Partial |
| XAI-SCS (this work) | OSS supply chain security | Yes | SHAP + counterfactuals | Yes | GitHub Actions, GitLab CI |
Research gap summary
Current OSS security tools—such as Snyk, the GitHub Advisory Database, and OSSGadget—rely predominantly on CVE-centric static analysis and signature-based matching. While effective for known vulnerabilities, they provide limited visibility into behavioral anomalies in transitive dependencies, irregular versioning patterns, contributor activity irregularities, or other metadata-level risks. Moreover, they typically generate high-volume alerts with minimal contextual explanation, contributing to alert fatigue and reduced remediation rates, as documented in Dependabot studies.
Existing work applying explainable AI (XAI) techniques—such as SHAP and attention mechanisms in cyber-physical systems or blockchain-based provenance in other domains—demonstrates the value of interpretability but does not address OSS-specific characteristics (e.g., deep dependency graphs, registry-derived metadata, version sequencing behavior) or provide integrated, CI/CD-native decision support tailored to developer workflows.
The critical gap in intelligent software engineering practice is therefore the absence of a metadata-driven, interpretable decision-support framework that can proactively identify behavioral and structural anomalies in OSS supply chains, deliver transparent and actionable explanations to developers, and integrate seamlessly into modern CI/CD pipelines.
XAI-SCS directly addresses this gap through: (i) a hybrid CNN–LSTM–Autoencoder architecture for metadata-based behavioral anomaly detection (RQ1); (ii) SHAP-based attributions combined with counterfactual reasoning to provide developer-trusted, actionable explanations (RQ2); (iii) stratified, fair benchmarking against CVE-centric tools (Snyk and Dependabot) in terms of detection accuracy, explanation clarity, and real-time CI/CD compatibility (RQ3).
Optional high-assurance extensions (e.g., privacy-preserving cross-registry adaptation, cryptographic attestation, and secure execution) are discussed separately as future deployment considerations and are not part of the core empirical contribution.
Methodology
The XAI-SCS framework (Fig. 1) is a metadata-driven, CI/CD-native intelligent decision-support system for OSS supply chain risk assessment, grounded in explainable anomaly detection and developer-centric explanations (RQ1–RQ3). The core analytical pipeline—knowledge acquisition from public registry metadata, hybrid deep inference, SHAP-based and counterfactual explanation generation, and structured decision outputs—forms the basis of the empirical evaluation presented in this work. Optional high-assurance deployment extensions (federated model adaptation, cryptographic provenance verification, and confidential execution) are described separately in Sect. 3.5 and do not affect the reported detection accuracy, explanation quality, or benchmarking results. Rather than a classical rule-based expert system, XAI-SCS adopts a modular architecture that operationalizes core expert-system concepts—knowledge acquisition, evidence-based inference, explanation, and adaptation—using learning-based and cryptographic techniques.
The Hybrid Inference Engine employs a CNN–LSTM–Autoencoder architecture to detect structural, temporal, and latent metadata anomalies (RQ1). The Decision-Support Layer then maps model outputs into interpretable risk tiers and recommended CI/CD actions (RQ3). The Explanation Facility provides SHAP-based and counterfactual explanations (RQ2), while the CI/CD Execution Environment supports controlled benchmarking in GitHub Actions and GitLab CI.
Fig. 1 Workflow of the proposed system.
Knowledge acquisition module
Data acquisition and risk labeling
This subsection describes how the Knowledge Acquisition Module gathers and prepares package-level information used by the XAI-SCS intelligent decision support system. The study uses publicly accessible open-source software (OSS) registries and vulnerability databases to construct a dataset for anomaly-detection evaluation (RQ1). The dataset integrates package metadata, dependency structure, and contributor activity from the Node Package Manager (npm) and Python Package Index (PyPI), with risk labels derived from known Common Vulnerabilities and Exposures (CVEs). All sources are publicly available and have been used in prior OSS security research. Table 2 summarizes these data sources.
Table 2 Data sources for OSS supply chain analysis.
| Source | Purpose | Type |
|---|---|---|
| npm registry | Version history, dependency trees, download counts | Package metadata |
| PyPI registry | Package metadata, maintainer lists, version sequences | Package metadata |
| GitHub API | Commit frequency, contributor count, code changes | Behavioral metadata |
| NVD (CVE database) | CVE assignments and CVSS scores | Ground-truth labels |
Acquisition and labeling process:
1.
Retrieved package versions, dependencies, and maintainer data from npm and PyPI public APIs.
2.
Collected commit and contributor activity from GitHub repositories linked to npm/PyPI packages.
3.
Mapped packages and versions to CVEs using NVD JSON feeds.
4.
Merged metadata into a unified format with fields for dependency depth, version jumps, and contributor entropy.
5.
Generated a 12,000-entry federated dataset (npm + PyPI) with CVE-based labels and GAN-simulated poisoning attacks for evaluation.
Table 3 lists the fields included in the unified dataset.
Table 3 Fields in the 12,000-entry federated dataset.
| Field | Type | Description |
|---|---|---|
| String | Package identifier | |
| String | Release version | |
| Categorical | {npm, pypi} | |
| Integer | Number of direct dependencies | |
| Integer | Maximum depth in dependency tree | |
| Integer | Number of active contributors | |
| Integer | Average commits per week | |
| Binary | 1 if non-sequential version change | |
| Integer | Days since last release | |
| Integer | Package downloads in last 30 days | |
| String | Matched CVE (if any) | |
| Float | CVSS severity score | |
| Binary | 1 if GAN-simulated attack | |
| Float | Output from CNN-LSTM-Autoencoder model |
Table 3 lists both predictor and non-predictor fields for transparency. However, only metadata features derived from npm, PyPI, and GitHub are used as model inputs. The fields , , and are excluded from model training and inference because they represent labelling, simulation, or post-hoc output information rather than predictor variables.
Leakage-control clarification: The unified dataset contains four categories of variables: predictor features, target labels, generated labels, and post-hoc annotation fields. Only registry-derived and GitHub-derived metadata features are used as model inputs. CVE identifiers, CVSS scores, GAN-poisoning indicators, and model-generated risk scores are not used as predictors during training or inference. CVE identifiers and CVSS scores are used only to derive or validate ground-truth labels; the GAN-poisoning indicator is used only as a generated class label for simulated attack samples; and the risk score is produced only after model inference. This separation prevents label leakage and preserves the validity of the reported performance results.
Feature extraction
Feature extraction converts the acquired metadata into structured inputs for the XAI-SCS inference engine. Each package is represented using metadata, dependency information, and contributor activity obtained from npm, PyPI, and GitHub. These fields are transformed into numerical and categorical features suitable for the hybrid CNN–LSTM–Autoencoder model (RQ1).
The extracted feature categories include:
- Metadata: version, download count, time since last update, contributor count, commit frequency.
- Labels and annotation fields: CVE identifiers, CVSS scores, GAN-poisoning indicators, and risk scores are excluded from the predictor feature matrix. No code-level analysis or Abstract Syntax Tree (AST) parsing is performed.
- All features are derived directly from registry and API data, and their values support SHAP-based explanations (RQ2).
Table 4 summarizes the features used in the anomaly detection. Features are derived directly from public registry and API data. No code-level or AST analysis is performed. All features support SHAP-based explanation (RQ2).
Table 4 Predictor features used for training and inference.
| Feature | Type | Source | Role |
|---|---|---|---|
| Binary | npm/PyPI | Flags non-sequential version change | |
| Integer | npm/PyPI | Captures release inactivity | |
| Integer | npm/PyPI | Captures package usage/popularity | |
| Integer | GitHub | Measures active contributor base | |
| Integer | GitHub | Captures maintenance activity | |
| Integer | npm/PyPI | Number of direct dependencies | |
| Integer | npm/PyPI | Maximum depth in dependency tree |
Table 5 Non-predictor fields used only for labelling or evaluation.
| Field | Category | Use | Used as model input? |
|---|---|---|---|
| Labelling field | Links package version to known CVE | No | |
| Labelling/evaluation annotation | Severity reference for CVE-linked cases | No | |
| Generated label | Marks GAN-simulated poisoning samples | No | |
| Model output | Generated after inference | No |
Only the predictor features listed in Table 4 are used in model training, validation, testing, SHAP computation, and CI/CD inference. The non-predictor fields listed in Table 5 are excluded from the predictor matrix and are used only for labelling, annotation, evaluation, or post-inference reporting.
Risk labeling
Each entry in the dataset is assigned a target label for supervised evaluation. A package version is labelled as risky (y = 1) if it is associated with a CVE-linked case or belongs to the GAN-simulated poisoning set; otherwise, it is labelled benign (y = 0). CVE identifiers and CVSS scores are used only during label construction and validation and are removed before model training and inference. Similarly, the Poisoned field is used only to assign generated labels for simulated attack samples and is not included in the predictor feature matrix. No target-derived or post-hoc field, including , , , or , is used as an input to the CNN–LSTM–Autoencoder model.
Dataset composition, labeling strategy, prediction target, GAN-based poisoning, and validation and non-CVE ground truth
Prediction target
The task is formulated as binary package-level anomaly classification: y = 1 if the package version exhibits behavioral, structural, or metadata-level anomalies indicative of risk (CVE-linked, GAN-simulated poisoning, or selected curated real non-CVE incident); y = 0 otherwise. The default decision threshold is set at 0.7 (high-risk tier) to prioritize precision in CI/CD alerting, with calibration performed on the validation set.
Leakage-safe predictor set: The predictor matrix includes only metadata and behavioral features available before risk assessment: , , , , , , and . Target-derived or post-hoc variables, including , , , and , are excluded from all training, validation, testing, SHAP computation, and CI/CD inference stages.
Leakage-preventing dataset splits
To eliminate temporal leakage (future releases informing past predictions) and package-level leakage (same package across splits), we apply a chronological + package-stratified split:
- Training set: releases before 2024-01-01.
- Validation set: releases from 2024-01-01 to 2025-06-30.
- Test set: releases after 2025-07-01 The separate set of 240 curated real-world non-CVE incidents was excluded from these chronological splits and was evaluated only after model training and threshold selection had been completed. This design prevents contamination between training and external generalization assessment (complete package separation). Splits are further stratified by ecosystem (npm vs. PyPI) and popularity (downloads_30d > 1,000) to maintain representativeness.
Dataset composition and class distribution
The federated training dataset comprises 12,000 OSS package versions: 7,200 from npm (60%) and 4,800 from PyPI (40%). Of these, 9,400 samples are labeled benign and 2,600 samples are labeled malicious, yielding a benign-to-malicious ratio of approximately 3.6:1. The malicious training samples consist of 1,600 CVE-associated package versions obtained from NVD and 1,000 GAN-simulated poisoning instances generated for controlled anomaly-detection evaluation. In addition, a separate held-out evaluation set containing 240 curated real-world non-CVE supply-chain incidents was assembled and reserved exclusively for external generalization testing. These 240 incidents are not included in the 12,000-sample training dataset and do not contribute to model training, validation, threshold calibration, hyperparameter tuning, or primary testing (Table 6).
Table 6 Composition of the 12,000-sample training dataset used for model development.
| Category | Count | Percentage |
|---|---|---|
| Total package versions | 12,000 | 100.0% |
| npm packages | 7200 | 60.0% |
| PyPI packages | 4800 | 40.0% |
| Benign samples | 9400 | 78.3% |
| CVE-linked malicious samples | 1600 | 13.3% |
| GAN-simulated malicious samples | 1000 | 8.4% |
| Total malicious samples | 2600 | 21.7% |
- The 12,000-sample federated dataset used for model development comprises 9,400 benign and 2,600 malicious package versions, where the malicious class consists of 1,600 CVE-linked samples and 1,000 GAN-simulated poisoning instances. In addition, a separate held-out external evaluation dataset containing 240 curated real-world non-CVE OSS supply-chain incidents (2021–2025) was assembled to assess generalization beyond CVE-linked and simulated threats. These incidents were intentionally excluded from training, validation, threshold calibration, hyperparameter tuning, and primary testing to prevent data leakage and evaluation contamination. Consequently, the 240 non-CVE incidents do not form part of the 12,000-sample federated dataset and were used exclusively for post-training external evaluation of the framework’s ability to identify selected metadata-visible behavioral anomalies in documented real-world non-CVE supply-chain incidents.
Clarification on training–evaluation scope
Although the overall evaluation includes CVE-linked, GAN-simulated, and held-out real non-CVE cases, these categories do not contribute equally to model training or claim strength. The primary supervised signal comes from CVE-associated labels and GAN-simulated poisoning samples. The real-world non-CVE incidents constitute a smaller curated subset and are reserved for held-out evaluation to test whether metadata-level patterns learned from CVE-linked and simulated anomalies transfer to documented non-CVE behavioral cases. Therefore, the study does not claim comprehensive detection of all real-world non-CVE supply chain attacks. Instead, it evaluates whether public metadata features can provide early warning signals for selected, manually verified non-CVE behavioral anomalies.
Real non-CVE incident set
To provide an external generalization assessment beyond CVE-linked and GAN-simulated labels, we curated a separate held-out evaluation dataset comprising 240 documented real-world non-CVE OSS supply-chain incidents collected between 2021 and 2025. These incidents were intentionally excluded from the 12,000-sample training dataset, as well as from validation, threshold calibration, and hyperparameter tuning, and were used exclusively for post-training evaluation. The selected incidents represent documented supply-chain events exhibiting observable metadata-level behavioral indicators, such as contributor-activity irregularities, unexpected versioning patterns, abnormal dependency changes, and maintenance anomalies.
This held-out dataset was included to assess whether metadata-level patterns learned from CVE-linked and GAN-simulated cases transfer to selected real-world non-CVE scenarios. Consequently, performance on this subset is reported separately and should be interpreted as preliminary evidence of generalization to selected metadata-visible behavioral anomalies, rather than as proof of comprehensive detection of all real-world non-CVE supply-chain attacks. Incidents that depend primarily on code-level payloads, hidden maintainer compromise, build-system manipulation, or provenance abuse without observable registry-level indicators may not be captured by the proposed metadata-driven framework.
GAN-based poisoning generation procedure
To simulate non-CVE behavioral risks in a controlled manner, 1,000 synthetic poisoning samples were generated using a conditional GAN trained solely on benign metadata. Perturbations targeted publicly observable features associated with supply-chain abuse: abrupt version jumps, anomalous dependency count/depth, sudden contributor activity changes, and irregular release cadence. No code-level or repository-internal features were modified, ensuring realism within metadata-only CI/CD settings.
Mapping to real-world threats
GAN samples approximate early-stage metadata signals reported in selected real-world incidents (e.g., dependency confusion, typosquatting, maintainer compromise) and serve as controlled, synthetic stress tests for evaluating metadata-level anomaly detection beyond CVE-linked cases. These simulations are designed to mimic observable metadata-level behavioral patterns rather than replicate full real-world attack complexity. Their results are therefore interpreted only as controlled stress-test evidence and should not be treated as proof of broad real-world non-CVE threat coverage.
Ground-truth validation and manual inspection
A stratified 10% subset (1,200 samples) was manually inspected by three annotators with OSS security expertise. Criteria included abnormal dependency growth, release irregularities, contributor anomalies, and CVE consistency. Fleiss’ κ = 0.82 indicated strong agreement; disagreements were resolved by majority vote.
Validation of GAN samples
Realism was assessed via Kolmogorov–Smirnov (KS) tests (p > 0.05 across features, no significant divergence from real malicious distributions) and intelligent decision support review of 200 samples (92% deemed plausible representations of OSS risk scenarios).
Hybrid inference engine
The Hybrid Inference Engine combines CNN, LSTM, and Autoencoder components to process package metadata, dependency structure, and behavioral signals. This term is used consistently throughout the manuscript to refer to the model-level anomaly-detection component of XAI-SCS.
- CNNs: Process dependency graphs and version sequences as structured inputs to detect spatial anomalies.
- LSTMs: Analyze time-series features (e.g., commit_freq, time_since_update) to identify temporal risk patterns.
- Autoencoders: Learn normal reconstruction of metadata and dependency features; high reconstruction error flags anomalies.
The hybrid model outputs a risk score (0–1) per package. Training uses binary cross-entropy on CVE-labeled data and GAN-simulated poisoning samples.
To prevent label leakage, the Hybrid Inference Engine receives only the leakage-safe predictor matrix defined in Sect. 3.1.4. It does not receive CVE identifiers, CVSS scores, poisoning indicators, or previously computed risk scores as input features.
Convolutional neural network (CNN) for dependency and metadata patterns
The CNN processes structured inputs from dependency graphs and package metadata. No code tokenization or syntax analysis is performed.
Mathematical Formulation: Let be a matrix of packages with features (e.g., , , ).
The CNN detects spatial patterns in dependency structure and popularity signals. Output is used in the hybrid model for risk scoring (RQ1).
LSTM for temporal behavioral patterns
The LSTM processes time-series features from package metadata and contributor activity. No code or version string parsing is performed.
Mathematical Formulation:
The LSTM identifies temporal anomalies in maintenance and usage patterns. Output is combined with CNN and Autoencoder outputs for final risk scoring (RQ1).
Autoencoder for anomaly detection
The Autoencoder is trained to reconstruct normal metadata and dependency patterns. High reconstruction error indicates anomalies.
Mathematical Formulation: Let be a feature vector (e.g., , , ). The Autoencoder learns to reconstruct via an encoder-decoder.
Loss function (reconstruction error):
During inference, high flags packages with unusual structural or behavioral profiles. The error is combined with CNN and LSTM outputs to compute the final risk score (RQ1).
Decision-support layer
Prediction and decision assistance are treated as separate stages in XAI-SCS. The hybrid CNN–LSTM–Autoencoder model first produces a package-level anomaly prediction in the form of a continuous risk score. This score estimates the likelihood that a package exhibits suspicious structural, temporal, or latent metadata patterns. However, the score alone is not treated as the final decision. Instead, it is passed to a decision-support layer that combines the predicted risk level with explanatory evidence, counterfactual remediation guidance, and CI/CD policy context.
The role of the decision-support layer is therefore not limited to thresholding. Thresholds are used only to assign an initial severity tier—low, medium, or high. The system then enriches this tier with: (i) the dominant risk-contributing features identified through SHAP; (ii) a counterfactual recommendation describing the minimum feasible change required to reduce the package risk; (iii) a suggested pipeline action, such as allow, review, or block merge; and (iv) a developer-facing explanation that supports human verification. In this way, XAI-SCS assists developers in deciding whether to accept, review, replace, or block a dependency, rather than merely producing a binary prediction.
This distinction is important for CI/CD environments, where automated scores alone may increase alert fatigue. XAI-SCS supports decision-making by presenting the reason for the alert, the evidence behind the risk tier, and a practical remediation path. The decision layer therefore transforms model inference into an auditable and actionable decision-support artifact.
Risk scoring, evidence packaging, and decision assistance
A composite risk score is first computed for each package by combining normalized outputs from the CNN, LSTM, and Autoencoder.
Let denote the leakage-safe feature vector for package . The hybrid model produces three normalized anomaly signals: , , and (). The final risk score is computed as:
where are tuned on the validation set.
The predicted score is then converted into a decision-support record rather than a standalone classification. The record contains: risk score, risk tier, top SHAP-ranked evidence, counterfactual remediation, and recommended CI/CD action. The risk tiers are defined as follows:
These thresholds provide an initial operational policy, but the developer-facing decision support is produced by the accompanying explanation and remediation fields. For example, if a package receives, the system does not simply label it as high risk. It also reports that the risk is mainly driven by features such as high dependency depth, long time since update, and low contributor activity, and then recommends a safer alternative version or dependency adjustment. This allows the developer to understand why the package was flagged and what action can reduce the risk.
CI/CD execution environment
The CI/CD Execution Environment operationalizes the XAI-SCS framework within controlled DevSecOps workflows by embedding the Hybrid Inference Engine, Explanation Facility, and Decision-Support Layer into representative CI/CD pipelines. Implemented as a modular, containerized service, this layer enables automated, metadata-driven risk assessment using dependency manifests and SBOMs sourced from public registries. The deployed evaluation reflects offline and replay-based CI/CD scenarios derived from publicly available datasets (CVE-linked and GAN-simulated), with a smaller curated non-CVE subset used for held-out generalization analysis rather than full live deployment. By supporting GitHub Actions, GitLab CI, and standardized input–output interfaces, the Execution Environment provides a practical pathway for deploying the Inference Engine and explanation modules at pipeline runtime, ensuring reproducibility, interoperability, and controlled yet realistic adoption in modern software delivery ecosystems.
Tool comparison and pipeline benchmarking
A key requirement for evaluating OSS supply-chain security frameworks is benchmarking against widely adopted industry tools such as Snyk and Dependabot. This module operationalizes RQ3 by assessing XAI-SCS within CI/CD-oriented workflows using standardized dependency metadata and comparable reporting outputs. To facilitate comparison, the framework ingests dependency manifests and SBOM-derived package information and produces structured security assessments that can be contrasted with baseline-tool alerts.
The purpose of this comparison is not to replace Snyk or Dependabot. These tools remain effective for CVE-centric vulnerability identification and dependency-update management. Instead, XAI-SCS is evaluated as a complementary intelligent decision-support layer that augments existing CI/CD security workflows through metadata-level behavioral anomaly screening, SHAP-based explanations, and counterfactual remediation guidance.
Feature extraction and inference follow the procedures described in Sect. 3.1–3.3. The composite risk score used during benchmarking is computed according to Eq. (8).
The framework outputs a structured decision record containing the composite risk score, explanation artifacts, and remediation recommendations. These outputs support comparative evaluation of alert relevance, explanation quality, and developer actionability within CI/CD environments. Detailed baseline execution settings, reproducibility controls, advisory-source handling, package-version matching procedures, and alert-to-ground-truth mapping rules are provided in Sect. 4.3.2.
Optional high-assurance deployment extensions
The core XAI-SCS framework evaluated in this study consists of metadata acquisition, CNN–LSTM–Autoencoder-based anomaly detection, SHAP/counterfactual explanations, and CI/CD-native decision output. These components directly support the main empirical evaluation under RQ1–RQ3.
Beyond this core pipeline, XAI-SCS may be extended in future high-assurance deployments with privacy-preserving adaptation, cryptographic provenance verification, and confidential execution. In this manuscript, these mechanisms are treated only as optional exploratory extensions. Their purpose is to indicate possible deployment directions rather than to establish independent technical contributions. Therefore, detailed cryptographic, enclave, and federated-learning mechanisms are intentionally kept brief and subordinate to the primary framework.
Explanation facility (justification and interpretability layer)
Effective intelligent decision-support frameworks must justify their outputs in a transparent, traceable, and actionable manner. In the context of OSS supply chain security—where automated assessments may trigger CI/CD pipeline actions—interpretable outputs are essential for developer trust and remediation planning. Recent explainable intrusion detection systems further demonstrate that combining optimized learning architectures with interpretable outputs enhances both detection effectiveness and operational trust in security-critical environments, although such approaches are not tailored to OSS dependency metadata or CI/CD-integrated decision support.Addressing RQ2, this module provides a combined SHAP-based attribution mechanism and counterfactual reasoning engine, generating clear explanations for the risk score produced by the Inference Engine. All explanations operate solely on public registry metadata and dependency features, ensuring transparency without requiring code inspection or specialized model internals.
The explainability component produces two complementary outputs: (i) SHAP-based feature attributions, which quantify the marginal contribution of each input feature to the final risk score RS, and (ii) counterfactual reasoning, which identifies the minimal feasible changes to input features that would reduce RS below the low-risk threshold. Both are computed immediately after model inference and embedded in the standardized JSON report delivered to the CI/CD pipeline.
SHAP feature attribution
Given a prediction function and input feature vector , the SHAP value for feature is computed as:
\phi x\left( f \right) = \sum {E \subseteq \left\{ {1, \ldots ,N} \right\}\backslash \left\{ x \right\}\frac{{\left| E \right|!\left( {N - \left| E \right| - 1} \right)!}}{{N!}}\left[ {f\left( {E \cup \left\{ x \right\}} \right) - f\left( E \right)} \right]}
This quantifies the marginal contribution of each feature—e.g., “contributor entropy” or “code churn”—to the final risk score.
Counterfactual reasoning
To support developer actionability, the framework computes a counterfactual instance that minimizes perturbation while achieving a safe risk level:
where enforces domain constraints (e.g., integer dependency_count, non-negative time_since_update). Optimization is performed using gradient descent on a differentiable surrogate of , initialized at with 50 iterations and learning rate 0.01. The resulting is translated into natural language guidance (e.g., “Switch to a version with dependency_depth ≤ 3”).
Developer-facing output in CI/CD
The explainability component delivers a structured JSON report to the CI/CD pipeline, ensuring immediate, actionable feedback for developers. The report contains five key fields: (i) risk_score: the composite risk score RS computed via Eq. (8); (ii) risk_tier: a categorical label defined as “low” if RS < 0.4, “medium” if 0.4 ≤ RS < 0.7, and “high” if RS ≥ 0.7 ; (iii) shap_top3: an array of the three features with the highest absolute SHAP values ∣, including the feature name, current value, SHAP contribution, and sign; (iv) counterfactual: a natural-language remediation suggestion derived from Eq. (10); and action: the recommended pipeline decision—allow, review, or block_merge.
Example
For the illustrative package [email protected], inference yields RS = 0.81, which is classified as high risk. SHAP identifies dependency_depth, time_since_update, and contributor_count as the principal contributors. The counterfactual recommendation is: ‘Adopt a release with dependency_depth ≤ 3 and time_since_update ≤ 60 days.’ The recommended CI/CD action is block_merge.” (Table 7).
Table 7 Structure of explainability output in CI/CD JSON report.
| Field | Type | Description | Example |
|---|---|---|---|
| Float | Composite from Eq. (8) | ||
| String | Low/medium/high | \:"high” | |
| Array | Top three contributing features | , , | |
| String | Minimum change required to reduce risk | “Use version with ≤ 3\:\:" | |
| String | Recommended CI/CD action | \:"block\_merge” |
This explainability mechanism ensures transparency through SHAP decomposition of RS, auditability via direct traceability to public metadata, efficiency with sub-second computation, and trust by mapping counterfactuals to real, verifiable alternatives—thereby fulfilling RQ2 and the contribution of developer-centric interpretability in CI/CD-integrated OSS security.
This explanation facility is the main mechanism that differentiates XAI-SCS from a purely predictive classifier. A classifier produces only a label or probability, whereas XAI-SCS provides a structured decision-support explanation: why the package was flagged, which metadata features contributed most strongly, what minimum change would reduce the risk, and which CI/CD action is recommended. Thus, the system supports human-in-the-loop software supply chain decisions instead of replacing developer judgment with an opaque automated prediction.
Decision output module (system endpoint interface)
The Decision Output Module converts the Hybrid Inference Engine’s risk prediction and the Explanation Facility’s evidence into an actionable decision-support artifact. Rather than exposing only a probability score or binary class label, the module consolidates the predicted risk score, severity tier, SHAP-ranked evidence, counterfactual remediation suggestion, and recommended CI/CD action into a structured JSON report. This design ensures that the final output supports developer interpretation, auditability, and remediation planning. The module therefore functions as a decision-assistance interface, not merely as a prediction endpoint. Consistent with the system’s formulation, the output structure is represented as:
\begin{gathered} \:J \leftarrow \{ risk\_score,risk\_tier,shap\_top3,counterfactual,action,benchmark?, \hfill \\ fcl\_update?,zk\_proof?,enclave\_sig?\} \hfill \\ \end{gathered}
This unified object forms the authoritative representation of the system’s final decision, integrating inference results, explanation summaries, and cryptographic attestations produced by upstream modules.
Structured JSON output
Each execution produces a compact JSON record (≤ 1.2 KB) that captures the package’s assessed security state, associated interpretability evidence, and optional provenance proofs. This serves as the intelligent decision support system’s decision token, enabling deterministic downstream behavior within CI/CD workflows.
Example Output (excerpt){ “”: “[email protected]”, “”: “npm”, “”: 0.91, “”: “high”, “”: { “”: 0.31, “”: 0.27, “”: -0.22 }, “”: “Reduce dependency_depth from 14 to ≤ 9 and use a version updated within the last 60 days”, “”: “BLOCK_MERGE”, “”: “High dependency complexity and prolonged maintenance inactivity contributed most strongly to the elevated risk score.“, “\:optional\_attestation":\:"enabled”}.
This structure combines the risk score, explanation, and recommended action into a single CI/CD-ready decision artifact.
Explainability and enforcement
The fields shap_top3 and counterfactual convey the primary explanatory features and minimal-change recommendations that influence each risk decision. The action directive translates these analytical outcomes into enforceable CI/CD policies, for instance:
CI/CD Integration Example- name: Enforce XAI-SCS decision run: exit 1.
This enables immediate alignment between analytical reasoning and automated enforcement without manual intervention.
Optional provenance and confidentiality hooks
For future high-assurance deployments, the decision output can optionally be linked with provenance and confidential-execution mechanisms to support tamper-evident decision records and potential alignment with SLSA-oriented provenance practices. These hooks are not required for the core XAI-SCS pipeline and are not used to support the primary empirical evaluation under RQ1–RQ3. Instead, they are retained only as lightweight exploratory indicators of how the framework could later integrate with external attestation, privacy-preserving adaptation, or secure-execution services in advanced DevSecOps environments.
The end-to-end operation of the core XAI-SCS pipeline is formalized in Algorithm 1, covering metadata acquisition, hybrid inference, risk scoring, explanation generation, and CI/CD decision output for RQ1–RQ3. Optional steps related to privacy-preserving adaptation, provenance verification, and confidential execution are included only as exploratory deployment extensions and remain subordinate to the primary metadata-driven anomaly-detection and explainability framework.
Computing infrastructure
All experiments were conducted on a high-performance workstation running Ubuntu 22.04 LTS, equipped with an Intel Core i9-13900 K processor (24 threads, 3.5 GHz base clock), 64 GB DDR5 RAM, and an NVIDIA RTX 4090 GPU with 24 GB VRAM. The XAI-SCS framework was implemented in Python 3.10 using PyTorch 2.2 for deep learning components, scikit-learn 1.5 for evaluation pipelines, and NetworkX 3.1 for dependency graph analysis. Tools related to cryptographic attestation, secure execution, and privacy-preserving adaptation were used only for exploratory feasibility checks and are not part of the primary empirical setup. Reproducibility was supported through explicitly controlled random seeds. The primary classification experiments were repeated using five independent seeds to quantify run-to-run variability, while seed 42 was retained as the reference configuration for the representative held-out evaluation and reproducible CI/CD execution. CI/CD integration was validated in controlled, production-representative environments using GitHub Actions (ubuntu-latest runners) and GitLab CI (shared runners with SGX support), containerized via Docker to emulate realistic DevSecOps workflows over curated datasets (CVE-linked, GAN-simulated, and a limited held-out non-CVE subset), rather than full live deployment on unrestricted real-world pipelines.
Evaluation method
A three-phase software engineering validation methodology was adopted to evaluate the core XAI-SCS framework, focusing on anomaly-detection performance, explanation quality, and CI/CD benchmarking, directly aligned with RQ1–RQ3. RQ4–RQ6 are treated separately as optional exploratory deployment extensions and are not used to support the primary empirical claims. The first phase evaluates the CNN–LSTM–Autoencoder model and SHAP/counterfactual explanation module. The second phase benchmarks XAI-SCS against Snyk, Dependabot, and OSSGadget under identical data splits and CI/CD execution contexts. The third phase conducts ablation and sensitivity analysis for the core framework, with statistical significance confirmed using Wilcoxon signed-rank tests.
In addition to detection and benchmarking evaluation, objective explainability metrics (faithfulness and stability) were computed on the test set to quantify alignment between SHAP attributions and model behavior.
Assessment metrics
Performance was evaluated using detection, explanation, latency, and benchmarking metrics aligned with the core objectives of RQ1–RQ3. Developer ratings measured perceived explanation clarity, actionability, and remediation intent in controlled CI/CD-style scenarios. These subjective results should not be interpreted as objective proof of explanation correctness or real-world remediation improvement. Objective explainability metrics, including faithfulness and stability, were additionally computed to assess alignment between SHAP attributions and model behavior. Metrics related to optional high-assurance extensions are reported only as exploratory feasibility indicators and are not used to support the primary empirical claims.
Compliance with SLSA Level 3 was automatically verified across provenance, build integrity, and attestation. Collectively, these metrics provide transparent, reproducible evidence of XAI-SCS’s advancement in dependable, secure, and maintainable software supply chain engineering. This evaluation perspective is consistent with emerging research that integrates explainability and quantum-resilient security considerations in advanced AI-driven defense systems, while also aligning with broader AI paradigms where attribute-guided and feature-centric learning approaches support interpretable and robust decision-making under evolving conditions.
Uncertainty and Variability Assessment. To assess result stability, the primary classification experiments were repeated across five independent random seeds using the same train/validation/test protocol. Repeated-run results are summarized using the mean ± standard deviation (SD). The primary held-out test result is reported separately as the representative point estimate. Where applicable, 95% confidence intervals were estimated by non-parametric bootstrap resampling of held-out predictions using 1,000 iterations. For the developer study, continuous Likert-scale outcomes are reported as mean ± SD, while percentage-based outcomes are reported together with the corresponding sample size.
Objective explainability metrics (faithfulness and stability)
To complement the subjective developer study, we incorporate objective metrics to evaluate the reliability of SHAP-based explanations.
Faithfulness (deletion/insertion AUC)
Faithfulness measures whether features identified as important by SHAP genuinely influence the model’s prediction. For each instance, features are ranked by absolute SHAP value . A deletion curve is constructed by iteratively removing top-ranked features and observing the decrease in predicted risk score RS. Conversely, an insertion curve adds features incrementally from a baseline. The area under these curves (AUC) quantifies explanation fidelity:
where and denote inputs with features removed or added, respectively. Higher scores indicate stronger alignment between explanations and model behavior.
Stability (perturbation consistency)
Stability evaluates whether explanations remain consistent under small perturbations of input features. For each sample , a perturbed version is generated by adding bounded noise to metadata features (e.g., ± 5% variation). Stability is computed as:
where x′ is a bounded perturbation of x, denotes SHAP attribution vectors. Values closer to 1 indicate robust and consistent explanations.
These metrics provide objective validation of explanation quality by quantifying causal alignment (faithfulness) and robustness (stability).
These metrics are computed post hoc on the trained model using the held-out test set and do not affect the training process or reported detection performance.
Algorithm 1 Core XAI-SCS threat detection and explainability pipeline with optional high-assurance extensions.
Results and discussion
This section reports the primary empirical evaluation of XAI-SCS with respect to RQ1–RQ3. The results focus on metadata-based anomaly detection, SHAP/counterfactual explanation quality, and benchmarking against CVE-centric tools in CI/CD-representative workflows.
RQ4–RQ6 are not treated as central empirical contributions. Instead, privacy-preserving federated learning, zero-knowledge attestation, and secure enclave execution are discussed as optional high-assurance deployment extensions. Their reported measurements are interpreted as preliminary feasibility indicators rather than core performance claims.
All findings are supported through ablation studies, hyperparameter sensitivity analysis, and real CI/CD deployment tests in GitHub Actions and GitLab CI, ensuring that results reflect both analytical robustness and practical usability in intelligent decision support -system–driven OSS supply chain security. These findings also align with broader perspectives that AI-driven open-source intelligence can simultaneously enhance defensive capabilities while introducing new systemic risks, highlighting the need for interpretable and verifiable analysis mechanisms in open-source ecosystems.
Addressing RQ1
To evaluate RQ1, we examine the effectiveness of the Hybrid Inference Engine—comprising CNN, LSTM, and Autoencoder components—in detecting behavioral anomalies and simulated poisoning attacks using only public OSS metadata and dependency structures. The assessment relies on the federated 12,000-package dataset introduced in Sect. 3.1 and reflects the operational conditions of the CI/CD Execution Environment described in Sect. 3.4, ensuring that results correspond to real deployment scenarios.
The evaluation first analyzes each component of the Inference Base in isolation:
- CNN for identifying irregular structural patterns in dependency graphs,
- LSTM for modeling temporal indicators such as update cadence and contributor activity trends, and.
- Autoencoder for capturing latent deviations through reconstruction error.
These are then compared with the fused configuration implemented in the XAI-SCS Inference Engine, which integrates structural, temporal, and latent anomaly signals into a unified representation.
Table 8 summarizes the classification performance across all configurations on the held-out test set. The fused model achieves an F1-score of 0.91 and ROC-AUC of 0.94. Across five independent repeated runs, the selected XAI-SCS configuration yielded a mean F1-score of 0.90 ± 0.02, indicating low run-to-run variability. The CNN attains a precision of 0.87, indicating strong capability in detecting irregular dependency structures, while the LSTM achieves a recall of 0.86 by effectively capturing abrupt maintenance or versioning deviations. The Autoencoder, despite operating without labeled supervision, contributes a valuable anomaly channel (F1 = 0.73) that improves ensemble recall by approximately 5% points relative to the CNN+LSTM combination.
These findings confirm that the hybrid reasoning strategy of the Inference Base enhances anomaly-detection coverage, supporting RQ1 by demonstrating that the intelligent decision support system can reliably detect behavioral and poisoning anomalies using metadata-only inputs.
Table 8 Performance metrics of individual and fused models (RQ1).
| Model | Precision | Recall | F1-Score | ROC-AUC |
|---|---|---|---|---|
| CNN (Structural) | 0.87 | 0.81 | 0.84 | 0.91 |
| LSTM (Temporal) | 0.85 | 0.86 | 0.85 | 0.89 |
| Autoencoder (Latent) | 0.78 | 0.69 | 0.73 | 0.81 |
| XAI-SCS (Fused) | 0.92 | 0.91 | 0.91 | 0.94 |
Variability across repeated runs. To quantify run-to-run uncertainty, the final XAI-SCS configuration was evaluated across five independent random seeds under the same train/validation/test protocol. Across these runs, the model achieved a mean F1-score of 0.90 ± 0.02 (mean ± SD), while the representative held-out test evaluation reported in Table 8 yielded an F1-score of 0.91. The small standard deviation indicates limited sensitivity to random initialization and supports the stability of the reported classification performance.
Figure 2 shows the F1-score progression from individual models to the full ensemble. The incremental improvement demonstrates that no single component captures the full spectrum of threats; structural analysis alone misses temporal irregularities, and unsupervised reconstruction requires contextual grounding from labeled data. The fused model resolves these gaps, achieving balanced performance across metrics.
Fig. 2 F1-score progression across model architectures (RQ1) (CNN: 0.84, LSTM: 0.85, Autoencoder: 0.73, XAI-SCS: 0.91).
Figure 3 displays the confusion matrix, indicating over 90% correct classification for both benign and malicious packages. The false positive rate of 8% supports operational viability in CI/CD environments, where excessive alerts would reduce adoption. The balanced error distribution reflects consistent performance across GAN-simulated poisoning and real behavioral anomalies.
Fig. 3 Confusion matrix for XAI-SCS predictions (RQ1) (> 90% TP and TN; FP rate = 8%).
Figure 4 presents the normalized confusion matrix, illustrating the classification performance of the proposed model in percentage terms. The model correctly identifies 99% of benign samples and 96% of malicious samples, indicating strong discriminative capability across both classes. Misclassification rates remain low, with only 1% of benign samples incorrectly flagged as malicious (false positives) and 4% of malicious samples misclassified as benign (false negatives). These results demonstrate a balanced and reliable classification performance, with particularly high accuracy in detecting benign instances while maintaining robust detection of malicious cases.
Fig. 4 Row-normalized prediction heatmap (RQ1) (> 95% correct per class; low off-diagonal confusion).
Inference completes in 0.8 s on average across 100 CI/CD runs, with 97% of alerts issued during the build phase. This latency profile enables synchronous risk evaluation and merge blocking at the high-risk threshold without delaying pipeline execution.
The results provide a clear answer to RQ1: the CNN-LSTM-Autoencoder model, when applied to public dependency metadata, detects behavioral anomalies and AI poisoning with an F1-score of 0.91 and ROC-AUC of 0.94. The fused architecture outperforms any single component by integrating complementary signals—structural, temporal, and latent—demonstrating that multi-modal analysis is necessary for robust coverage. The low false positive rate and sub-second inference time support direct integration into GitHub Actions and GitLab CI, confirming practical utility in automated supply chain enforcement.
Addressing RQ2
To evaluate RQ2, we examine whether SHAP-based feature attributions and counterfactual remediation suggestions—generated from public dependency metadata and delivered via standardized JSON reports in CI/CD pipelines—offer developers clear and actionable feedback. The assessment is based on two complementary measures: (i) quantitative alignment between SHAP attributions and ground-truth threat indicators in the evaluation dataset, and (ii) developer-rated clarity and actionability derived from a structured survey of 82 OSS maintainers and security engineers who interacted with real CI/CD pipeline outputs.
Table 9 presents the key explainability metrics. The SHAP-ground truth agreement score of 0.84 indicates substantial consistency between the model’s attributed risk factors (e.g., dependency_depth, time_since_update) and the actual drivers of known threats in the test set. This agreement was computed by comparing the top three SHAP-ranked features against manually verified threat causes in 500 high-risk cases. Developer responses, collected via a 5-point Likert scale, yield a mean clarity score of 4.3 and mean actionability score of 4.1, suggesting that the explanations were both understandable and practically useful within CI/CD contexts.
Table 9 Explainability evaluation metrics (RQ2).
| Metric | Value |
|---|---|
| SHAP Agreement with Ground Truth | 0.84 |
| Developer Clarity Score (Likert) | 4.3/5 |
| Actionability Score (Likert) | 4.1/5 |
Figure 5 provides a direct assessment of RQ2 by presenting three empirical measures of the SHAP-based and counterfactual explanations delivered via CI/CD JSON reports. The SHAP-ground truth agreement of 0.84, derived from comparing the model’s top three attributed features against manually confirmed threat causes in 500 high-risk test cases, establishes the technical fidelity of the explanations—ensuring that risk attributions reflect observable metadata anomalies. Concurrently, a structured survey of 82 OSS developers and security engineers, conducted during hands-on CI/CD simulation sessions with real XAI-SCS pipeline outputs, rated explanation clarity at 4.3 ± 0.4 and actionability at 4.1 ± 0.5 on a 5-point Likert scale. These results confirm that SHAP decompositions and counterfactual remediation suggestions—such as “Adopt version with dependency_depth ≤ 3”—are not only technically valid but also clearly understood and practically actionable within GitHub Actions and GitLab CI environments. The consistent high ratings across participants, with low variability, demonstrate that the explainability outputs effectively support developer decision-making in real-time CI/CD workflows, thereby providing a positive and evidence-based answer to RQ2. This behavior is consistent with recent multi-module explainable AI frameworks, where combining predictive outputs with interpretable evidence enhances transparency and supports effective decision-making in risk-sensitive systems.
Fig. 5 Evaluation of SHAP-based and counterfactual explanations in CI/CD pipelines (RQ2) (SHAP-ground truth agreement: 0.84; developer clarity: 4.3 ± 0.4; developer actionability: 4.1 ± 0.5; n = 82).
Despite the positive user feedback, the explainability evaluation has several limitations. First, the reliance on Likert-scale responses introduces subjectivity and potential response bias. Second, the study size (n = 82) and controlled evaluation setting may not fully reflect the complexity of real-world CI/CD deployment conditions. Third, the study measures perceived clarity, perceived actionability, and self-reported remediation intent, but does not observe whether developers actually remediate dependencies faster, more accurately, or more consistently in operational DevSecOps teams. Fourth, although objective faithfulness and stability metrics are reported, these metrics evaluate explanation behavior with respect to the model and do not establish real-world remediation effectiveness. Therefore, the findings should be interpreted as evidence of perceived usability and decision-support potential, not as proof of tangible remediation improvement in production environments.
Figure 6 shows an actual CI/CD report entry for the package [email protected]. The JSON output includes a risk score of 0.81, classified as high, with SHAP values identifying dependency_depth (+ 0.32) and time_since_update (+ 0.28) as primary contributors. The counterfactual states: “Adopt a release with dependency_depth ≤ 3 and time_since_update < 60 days,” corresponding to version 4.1.0. This report triggered a block_merge action and included a direct link to the recommended version in the npm registry. The example reflects a typical pipeline execution and was used in 68% of survey tasks.
Fig. 6 Example CI/CD JSON Report with SHAP and Counterfactual Output (RQ2) (RS = 0.81, top SHAP: dependency_depth, counterfactual: use 4.1.0).
Explainability study methods
The explainability evaluation was conducted as a controlled user study, approved under Ethics Approval No. GU-CS-2025-03, involving software developers and DevSecOps practitioners recruited through professional OSS and security communities., LinkedIn groups focused on OSS security). Participants had an average of 5.2 years of experience in CI/CD workflows and OSS dependency management. The study used a within-subjects design: each participant reviewed 10 anonymized package risk alerts generated by XAI-SCS (balanced across benign, CVE-linked, and GAN-simulated cases). For each alert, they rated explanation clarity and actionability on a 5-point Likert scale (1 = poor; 5 = excellent) and indicated remediation intent (binary yes/no: “Would this explanation prompt you to act, e.g., review/block the dependency?”). The study did not require participants to modify live repositories, submit pull requests, resolve dependency conflicts, patch vulnerable packages, or complete remediation tasks inside their organizational CI/CD environments. Accordingly, remediation intent is treated as a perception-based indicator of likely action, not as a measured operational remediation outcome. The survey was administered online via Google Forms (anonymous, ~ 15 min completion time) with randomized alert order to mitigate order effects. Ethical guidelines were followed: informed consent obtained, no PII collected, participation voluntary. The full instrument and protocol are in Appendix A.
Objective evaluation of explainability (faithfulness and stability)
To complement the developer study, we evaluate the faithfulness and stability of SHAP-based explanations using the metrics defined in Sect. 3.10.
Table 10 summarizes the results.
Table 10 Objective explainability metrics (computed on held-out test subset).
| Metric | Value |
|---|---|
| Faithfulness (Deletion AUC) | 0.87 |
| Faithfulness (Insertion AUC) | 0.84 |
| Stability (Perturbation Consistency) | 0.91 |
The high deletion AUC (0.87) indicates that removing top SHAP-ranked features leads to a significant drop in predicted risk scores, confirming that these features are causally influential. Similarly, the insertion AUC (0.84) shows that adding key features reconstructs the prediction effectively.
The stability score of 0.91 demonstrates that SHAP explanations remain consistent under small perturbations of metadata inputs, indicating robustness of the explanation mechanism.
These findings complement the developer study results by showing that explanations are not only perceived as useful, but also objectively aligned with model behavior and robust to input variation.
The reported objective explainability metrics were computed using the trained XAI-SCS model on a representative, stratified subset of the held-out test set, preserving the distribution of CVE-linked, GAN-simulated, and curated non-CVE samples. SHAP values were generated using Kernel SHAP with 100 background samples. For faithfulness evaluation, deletion and insertion curves were constructed by progressively removing or adding features ranked by absolute SHAP importance, and the corresponding changes in predicted risk score were recorded. Stability was assessed by introducing bounded perturbations (± 5%) to input metadata features and computing the normalized difference in SHAP attribution vectors. All evaluations were performed post hoc without retraining, ensuring consistency with the original inference pipeline and providing quantitative, model-grounded validation of explanation reliability.
Ablation on explanation components
To quantify incremental benefit, we conducted an ablation comparing SHAP attributions alone vs. the full facility (SHAP + counterfactuals). In a split-sample extension of the study (n = 41 per condition, balanced demographics), SHAP-only yielded mean clarity = 3.9/5, actionability = 3.7/5, remediation intent = 81%. Adding counterfactuals improved these to 4.3/5 (+ 0.4, p < 0.01, Wilcoxon), 4.1/5 (+ 0.4, p < 0.01), and 96% (+ 15%, p < 0.01), respectively. This demonstrates that counterfactual guidance provides complementary, actionable context beyond feature attributions alone (See Table 11).
Table 11 Ablation results for explanation facility (n = 82).
| Configuration | Clarity (mean ± SD/5) | Actionability (mean ± SD/5) | Remediation Intent (%) | Notes |
|---|---|---|---|---|
| SHAP attributions only | 3.9* | 3.7* | 81 | Baseline interpretability |
| SHAP + counterfactuals (full) | 4.3 ± 0.4 | 4.1 ± 0.5 | 96 | Incremental benefit (p < 0.01) |
- SD values for the SHAP-only split should be reported from the corresponding participant-level responses if available; no SD is inferred here from the mean alone.
- These results confirm the full explanation facility’s value in supporting developer decision-making without overstatement.
Addressing RQ3: complementary benchmarking with Snyk and Dependabot
RQ3 is evaluated from a complementary-tool perspective. Snyk and Dependabot are treated as established CVE-centric tools, while XAI-SCS is evaluated as an additional decision-support layer for metadata-level behavioral screening and explanation. Therefore, the goal is not to demonstrate universal superiority over these tools, but to assess whether XAI-SCS can enhance CI/CD security workflows where CVE databases alone provide limited behavioral context.
Baseline-fair evaluation and scope separation
Snyk and Dependabot are designed as CVE-centric vulnerability scanners whose primary objective is the identification of known vulnerabilities indexed in public advisory databases. They are not intended to detect metadata-level behavioral anomalies or synthetic poisoning patterns that lack explicit CVE identifiers. Consequently, computing a single F1 score over a mixed dataset that includes GAN-simulated poisoning would result in an unfair baseline comparison.
To ensure a fair and transparent comparison with CVE-centric baselines (Snyk and Dependabot), performance is evaluated on stratified subsets of the 2,400-package hold-out set. Table 12 presents the overall and subset-specific F1-scores for all three systems. Table 13 focuses specifically on XAI-SCS performance across non-CVE threat categories, clarifying the source of the observed improvement over signature-based tools.
Table 12 Stratified Performance Comparison of XAI-SCS with Snyk and Dependabot (Subset evaluation on the 2,400-package hold-out set).
| Threat Category | Description/purpose | Sample Size (n) | XAI-SCS F1-score | Snyk F1-score | Dependabot F1-score | Notes |
|---|---|---|---|---|---|---|
| CVE-only | Known vulnerabilities (baseline strength) | 560 | 0.89 | 0.68 | 0.70 | Baselines designed and optimized for this case |
| GAN-simulated poisoning | Controlled non-CVE behavioral / poisoning attacks | 400 | 0.85 | ≈ 0.02 | 0.00 | Out of scope for signature-based tools |
| Real non-CVE behavioral anomalies | Metadata-level anomalies (e.g., contributor hijacking, irregular versioning) | 240 | 0.84 | – | – | Manually verified external held-out incidents (2021–2025); not used for training or model selection |
| Full mixed dataset | Combined CVE + non-CVE threats | 2,400 | 0.91 | 0.68 | 0.70 | Overall reported performance |
- The 240 real-world non-CVE incidents constitute an independent external evaluation set curated from documented OSS supply-chain events between 2021 and 2025. These incidents were excluded from training, validation, threshold calibration, and hyperparameter tuning, and were used solely to assess generalization beyond CVE-linked and GAN-simulated samples.
Table 13 XAI-SCS performance breakdown on non-CVE threat subsets (subset evaluation on the 2,400-package hold-out set).
| Threat category | Description/purpose | Sample size (n) | XAI-SCS F1-score | Primary contributing components | Notes |
|---|---|---|---|---|---|
| GAN-simulated poisoning | Controlled stress-test of non-CVE behavioral attacks | 400 | 0.85 | Autoencoder (reconstruction error) + LSTM (temporal patterns) | Simulates poisoning/metadata tampering |
| Real non-CVE behavioral anomalies | Metadata-level risk indicators (contributor hijacking, version jumps without commits, etc.) | 240 | 0.84 | LSTM (temporal drift) + CNN (structural irregularities) | External held-out evaluation incidents curated from documented OSS supply-chain events (2021–2025) |
| Full non-CVE subset | Combined GAN + real behavioral anomalies | 640 | 0.85 | Hybrid fusion of all three components | Combines GAN-simulated samples and external held-out non-CVE incidents; interpreted as preliminary generalization evidence |
| Full mixed dataset (for reference) | Combined CVE + non-CVE threats | 2,400 | 0.91 | All components (CNN + LSTM + Autoencoder) | Overall performance |
Because the 240 curated real-world non-CVE incidents constitute a limited external evaluation set and are restricted to documented cases exhibiting observable metadata-level behavioral indicators, the corresponding results should be interpreted cautiously. These incidents were not used during training, validation, threshold calibration, or model selection. Consequently, the reported performance reflects preliminary evidence of transferability to selected metadata-visible behavioral anomalies rather than comprehensive detection capability across the full spectrum of real-world non-CVE software supply-chain attacks. The stratified results in Tables 12 and 13 should be interpreted according to evaluation scope rather than as a single overall ranking. On CVE-only cases, where Snyk and Dependabot are specifically designed to operate, XAI-SCS achieves competitive performance (F1 = 0.89), while Snyk and Dependabot achieve F1-scores of 0.68 and 0.70, respectively. These baseline results reflect performance under the controlled and reproducible evaluation protocol described in Sect. 4.3.2, including advisory-database coverage, package-version matching procedures, dependency-manifest and lockfile availability, severity-threshold settings, and disclosure timing. Accordingly, the reported scores should not be interpreted as absolute measures of baseline-tool capability across all deployment environments.
In contrast, the GAN-simulated poisoning and curated real-world non-CVE behavioral anomaly subsets evaluate a different capability: metadata-level behavioral risk screening. These categories fall outside the intended operational scope of CVE-centric scanners; therefore, their low scores on these subsets should not be interpreted as baseline failure. The observed XAI-SCS performance on these subsets (F1 = 0.84–0.85) provides preliminary evidence that metadata-level behavioral signals can support the identification of selected non-CVE supply-chain risks under controlled evaluation conditions.
Therefore, the principal finding is not universal superiority over established software composition analysis tools, but complementary coverage. XAI-SCS extends conventional CVE-centric workflows by providing behavioral anomaly screening, explanation support, and remediation guidance for risk patterns that are not typically targeted by signature- and advisory-based scanners.
Interpretation constraint
The non-CVE results should be interpreted with caution because the real-world non-CVE subset is substantially smaller than the CVE-linked and GAN-simulated portions of the dataset. The reported F1-score on real behavioral anomalies indicates that the model can identify selected metadata-level patterns that resemble known supply chain abuse behaviors. However, it does not establish complete coverage of real-world non-CVE attacks, especially those that do not produce observable registry-level or contributor-activity anomalies. Accordingly, the contribution of XAI-SCS is best understood as complementary behavioral risk screening beyond CVE-centric tools, rather than a replacement for full security review, code audit, or provenance verification.
Baseline execution protocols and input consistency
To ensure fair and reproducible comparison with Snyk and Dependabot, both baselines were executed under controlled and documented conditions using the same dependency manifests, lockfiles, and SBOM-derived package-version records used by XAI-SCS. All tools were evaluated on identical package-version instances from the stratified 2,400-package hold-out set.
Dependency manifests and SBOMs were generated uniformly for all tools. CycloneDX SBOMs version 1.4 were produced using ecosystem-specific generators for npm and PyPI packages. For npm projects, package.json and package-lock.json were used where available. For PyPI projects, requirements.txt or Pipfile.lock was used where available. Package-version matching was performed using exact package-name and version matching against the corresponding NVD-derived CVE records.
For Snyk, the CLI was executed through a pinned Snyk GitHub Action release and a fixed Snyk CLI version recorded in the replication package. The command used was:
snyk test --all-projects --severity-threshold=medium --json.
No custom policies, ignore rules, reachability filters, or project-specific rule modifications were applied. The medium severity threshold was used consistently across all runs because the evaluation focused on actionable CI/CD alerts rather than purely informational findings. Snyk outputs were parsed from JSON to extract affected package name, affected version, advisory/CVE identifier, severity level, and recommended upgrade.
For Dependabot, a fixed repository configuration was used through .github/dependabot.yml, with npm and pip ecosystems enabled under a standard daily update schedule. Dependabot alerts were extracted through the GitHub Dependabot API using the advisory database snapshot available at the time of evaluation. Extracted fields included vulnerable package, affected version range, advisory identifier, severity, and recommended update.
For CVE-only evaluation, Snyk and Dependabot predictions were counted as true positives only when the reported advisory matched the package name and vulnerable version range in the NVD-derived ground truth. False negatives occurred when a CVE-linked package-version instance was present in the hold-out set but was not flagged by the tool under the available advisory database, manifest, lockfile, version-resolution, or severity-threshold configuration. False positives occurred when a tool reported a vulnerability for a package-version instance not labelled as CVE-positive in the evaluation ground truth.
The relatively low CVE-only F1-scores observed for Snyk and Dependabot should therefore be interpreted in light of operational factors rather than as evidence that these tools are ineffective. Differences may arise from advisory database coverage, disclosure timing, package-version range interpretation, lockfile or manifest availability, severity-threshold filtering, and exact version-matching rules. These tools remain valuable CVE-centric scanners; the purpose of this comparison is to evaluate XAI-SCS as a complementary metadata-driven decision-support layer under a controlled and reproducible protocol.
Exploratory high-assurance deployment extensions
The optional extensions corresponding to RQ4–RQ6 were investigated only as preliminary high-assurance deployment pathways and do not constitute the primary empirical contribution of this study. These exploratory extensions include privacy-preserving cross-registry adaptation, provenance-oriented verification, and confidential execution mechanisms intended for future DevSecOps environments requiring stronger guarantees of data locality, attestation integrity, or protected inference execution.
Conceptually, these extensions illustrate how the core XAI-SCS decision-support pipeline could be augmented with auxiliary services for distributed model updating, tamper-evident reporting, and execution confidentiality. For example, privacy-preserving adaptation mechanisms may support cross-registry learning without centralized sharing of raw metadata, while provenance-oriented attestation may provide verifiable linkage between SBOM artifacts, risk scores, and CI/CD decision outputs. Similarly, confidential-execution mechanisms may offer protected inference capabilities for deployments operating in partially trusted or externally hosted CI/CD runners.
However, these mechanisms are intentionally treated as secondary and exploratory components. They are not required for the operation of the core metadata-driven anomaly-detection and explainability framework evaluated under RQ1–RQ3, and they are not used to substantiate the reported results related to anomaly-detection accuracy, explanation quality, developer-facing usability, or CI/CD benchmarking. Accordingly, detailed cryptographic constructions, enclave-security guarantees, federated optimization analysis, post-quantum threat modeling, and formal security proofs are outside the scope of the present manuscript and are deferred to future dedicated investigations focused specifically on high-assurance deployment architectures.
Hyperparameter tuning
To ensure efficient and reliable inference within the XAI-SCS Hybrid Inference Engine (RQ1), hyperparameter tuning was performed using 5-fold cross-validation on the 12,000-entry federated npm–PyPI dataset (Sect. 3.1). Grid search was conducted directly in GitHub Actions to reflect real CI/CD runtime constraints, prioritizing accuracy, stability, and sub-second inference. Validation used a 2,400-package hold-out set, with final evaluation aligned with RQ1 experiments.
Table 14 summarizes the explored ranges and optimal settings. The CNN adopts a 5-wide kernel with 128 filters to capture dependency structure efficiently. The LSTM uses 128 hidden units and sequence length 20, modelling version and contributor trends with minimal latency. The Autoencoder employs a 16-dimensional bottleneck, providing sensitive reconstruction-based anomaly signals aligned with the XAI-SCS metadata-based inference pipeline.
Table 14 Hyperparameter search and selected configuration (RQ1).
| Model | Parameter | Searched range | Selected |
|---|---|---|---|
| CNN | Kernel size | {3, 5, 7} | 5 |
| Filters | {64, 128, 256} | 128 | |
| LSTM | Hidden units | {64, 128, 256} | 128 |
| Sequence length | {10, 20, 50} | 20 | |
| Autoencoder | Bottleneck dimension | {8, 16, 32, 64} | 16 |
The selected configuration achieved an average F1 = 0.90 (σ = 0.02) with mean inference latency of 0.8 s under CI/CD execution. These settings balance model expressiveness with intelligent decision support -system efficiency requirements and contribute directly to the final test F1 = 0.91 reported for RQ1.
Ablation study
Component-level ablation on full test set
To assess the contribution of each inference component to the XAI-SCS intelligent threat-detection pipeline, an ablation study was conducted on the 2,400-package test split of the federated npm–PyPI dataset. Each component of the Hybrid Inference Engine—the CNN (structural patterns), LSTM (temporal behaviour), and Autoencoder (latent anomaly reconstruction)—was selectively removed, and performance was re-evaluated under identical CI/CD execution settings. This isolates how each knowledge source contributes to the overall reasoning ability of the complete Hybrid Inference Engine.
Table 15 summarizes the results. The full hybrid model achieves an F1-score of 0.91. Removing the CNN reduces performance to 0.84, indicating its central role in representing structural irregularities in dependency graphs. Excluding the LSTM lowers the score to 0.83, confirming its contribution to modelling temporal maintenance trends. Removing the Autoencoder yields 0.86, reflecting loss of latent anomaly detection capacity. Pairwise combinations—CNN+LSTM (0.88) and CNN + AE (0.85)—recover part of the performance but remain below the complete model, demonstrating complementary value across all three modalities.
Table 15 Ablation study results on test set (RQ1).
| Configuration | F1-Score |
|---|---|
| Full Model (CNN + LSTM + AE) | 0.91 |
| Without CNN | 0.84 |
| Without LSTM | 0.83 |
| Without Autoencoder | 0.86 |
| CNN + LSTM Only | 0.88 |
| CNN + AE Only | 0.85 |
Overall, the ablation findings confirm that the full tri-modal inference architecture—structural, temporal, and latent signals—provides the most complete knowledge representation for metadata-based threat detection, supporting the design rationale underlying RQ1.
Figure 7 visualizes the F1-score across configurations. The full model is the clear optimum, with sequential degradation upon component removal. The CNN-only deficit (Δ = −0.07) highlights its critical role in modeling dependency graph irregularities. The LSTM-only deficit (Δ = −0.08) underscores temporal sequence modeling for behavioral drift. The Autoencoder-only deficit (Δ = −0.05) is smaller but consistent, confirming its value in flagging latent poisoning or metadata tampering. The CNN+LSTM pairing recovers most performance (0.88), but full fusion is required for maximal coverage.
Fig. 7 Ablation study: impact of component removal on F1-Score (RQ1) (Full: 0.91; −CNN: 0.84; −LSTM: 0.83; −AE: 0.86; CNN+LSTM: 0.88; CNN + AE: 0.85; n = 2,400 test packages).
The ablation results confirm that the Hybrid Inference Engine functions as a coordinated set of complementary knowledge sources within the intelligent decision support system. Each component—structural (CNN), temporal (LSTM), and latent anomaly detection (Autoencoder)—contributes distinct evidence, and no single modality provides sufficient coverage. The full integration yields the highest F1-score (0.91), validating the architecture’s multi-modal reasoning design under real CI/CD constraints. These findings substantiate Contribution 1 (Sect. 1.6) by demonstrating that dependable, metadata-only OSS threat detection requires a fused, intelligent decision support -system–style combination of structural, behavioral, and reconstruction-based signals.
Subset-specific ablation on threat categories
To further elucidate the sources of performance gains reported in Sect. 4.3 (Tables 12 and 13), we extended the ablation study to the stratified threat subsets. For each subset, we systematically disabled individual components of the Inference Base and re-evaluated F1-score under identical CI/CD conditions. Results are summarized in Table 16.
Table 16 Subset-specific ablation results (F1-score).
| Configuration | CVE-only (n = 560) | GAN-simulated poisoning (n = 400) | Real behavioral anomalies (n = 240) | Full mixed (n = 2,400) |
|---|---|---|---|---|
| Full model (CNN + LSTM + AE) | 0.89 | 0.85 | 0.84 | 0.91 |
| Without CNN | 0.82 (Δ − 0.07) | 0.81 (Δ − 0.04) | 0.77 (Δ − 0.07) | 0.84 |
| Without LSTM | 0.85 (Δ − 0.04) | 0.76 (Δ − 0.09) | 0.73 (Δ − 0.11) | 0.83 |
| Without Autoencoder | 0.86 (Δ − 0.03) | 0.71 (Δ − 0.14) | 0.79 (Δ − 0.05) | 0.86 |
| CNN + LSTM only | 0.87 | 0.78 | 0.80 | 0.88 |
| CNN + AE only | 0.85 | 0.80 | 0.76 | 0.85 |
On the CVE-only subset, removal of the CNN causes the largest drop (Δ = −0.07), indicating its dominant role in capturing structural patterns shared with known vulnerabilities. On the GAN-simulated poisoning and real behavioral anomalies subsets, the Autoencoder (reconstruction error) and LSTM (temporal drift) are essential, with drops of up to Δ = −0.14 and − 0.11, respectively. These components enable XAI-SCS to detect non-CVE metadata anomalies that are inherently out of scope for Snyk and Dependabot (F1 ≈ 0.00–0.02 on these subsets, Table 12). The full hybrid model therefore achieves the reported overall improvement primarily through complementary coverage of behavioral threats, while remaining competitive on CVE cases.
These findings reinforce the stratified evaluation in Sect. 4.3 and confirm that the primary source of XAI-SCS’s advantage lies in multi-modal fusion for non-CVE risk detection.
Error analysis
A systematic error analysis was conducted on the independent test set of 2,400 packages used in RQ1 to characterize the residual misclassifications of the hybrid CNN-LSTM-Autoencoder model, which achieved an F1-score of 0.91. The analysis revealed a false positive rate of 4.8% (115 cases) and a false negative rate of 4.1% (98 cases). Each instance was evaluated using SHAP feature attributions, counterfactual risk adjustments, and direct inspection of CI/CD execution logs from GitHub Actions, with all inputs restricted to public dependency metadata.
False positives predominantly stemmed from three observable patterns. First, packages with high contributor activity—such as and react—exhibited elevated contributor_count and , to which SHAP assigned an average contribution of + 0.28, resulting in risk scores exceeding the high-risk threshold despite benign intent. Second, legitimate major version increments (e.g., v1.9.0 → v3.0.0) triggered temporal anomalies in the LSTM, with SHAP attributing + 0.31 to ; these reflected planned refactoring rather than compromise. Third, performance-oriented minification in build outputs increased Autoencoder reconstruction error, yielding a mean SHAP contribution of + 0.22, as structural compression mimicked obfuscation patterns.
False negatives were similarly constrained to three dominant failure modes. Packages with fewer than 10 prior releases provided insufficient temporal context to the LSTM, reducing sequence-based feature influence to < 0.05 and impairing detection of early behavioral drift. Adversarial modifications involving ≤ 5 lines of code or API misuse induced minimal structural perturbation, registering < 0.05 change in CNN feature maps and remaining below the decision boundary. Finally, dependency graphs exceeding 12 levels in depth diluted attention weights within the CNN, preventing effective risk propagation from malicious leaf nodes to the root package.
Diagnostic inspection using SHAP and counterfactual outputs confirmed that 87% of false positives could be resolved by reducing contributor_count influence by 40% or flagging the presence of release notes, while 79% of false negatives crossed the risk threshold upon extension of version history to 15 entries. All misclassified SBOMs passed zk-SNARK verification with a mean proof size of 285 bytes, and enclave-based inference maintained 1.1 ± 0.3 s latency with full resistance to simulated quantum decryption attacks, indicating that errors originated solely in model interpretation rather than execution integrity or data tampering.
The error patterns are summarized in Table 17.
Table 17 Sources of misclassification and SHAP contributions.
| Error Type | Rate (%) | Primary Feature | Mean SHAP Contribution | Observed Cause |
|---|---|---|---|---|
| False Positives | 4.8 | contributor_count | + 0.28 | High activity in benign projects |
| + 0.31 | Valid major releases | |||
| + 0.22 | Minified build output | |||
| False Negatives | 4.1 | < 0.05 | Limited version history | |
| < 0.05 | Small malicious changes | |||
| dependency_depth | Diluted | Deep transitive chains |
These results indicate that misclassifications arise from inherent ambiguity and incompleteness in publicly available metadata under controlled evaluation settings rather than deficiencies in federated adaptation, attestation, or secure execution. The 4.8% false positive rate remains operationally viable for CI/CD alert systems, whereas the 4.1% false negative rate warrants focused mitigation, particularly for newly published or deeply nested packages within the evaluated dataset and curated test scenarios.
Practical and immediately implementable refinements include normalizing contributor metrics by project age, suppressing version jump alerts in the absence of release notes, whitelisting known minification signatures, padding short version sequences with neutral vectors, and capping dependency traversal depth at 10 during preprocessing. Each adjustment operates within the existing metadata schema, preserves sub-second inference latency, and requires no external data sources. The explainability outputs already enable rapid triage of alerts, supporting efficient operational use in controlled, CI/CD-representative workflows based on curated datasets, rather than fully unrestricted real-world deployment environments.
Overall, the analysis indicates that XAI-SCS delivers stable performance within the evaluated intelligent decision-support system constraints and controlled experimental settings, with clear, metadata-bounded opportunities for improving robustness in edge scenarios observed in curated CVE-linked, GAN-simulated, and limited non-CVE test cases.
Conclusion and future work
This study presented XAI-SCS, an intelligent, metadata-driven decision-support framework for dependable open-source software (OSS) supply chain security. Operationalizing expert-system principles through modern AI techniques, XAI-SCS integrates a hybrid CNN–LSTM–Autoencoder inference base and an explainability layer into a unified workflow tailored for DevSecOps environments. Using only public package metadata, the framework achieved a held-out test F1-score of 0.91, while repeated evaluation across five independent runs yielded a mean F1-score of 0.90 ± 0.02, indicating low run-to-run variability on a federated dataset of 12,000 npm and PyPI packages with GAN-simulated poisoning, demonstrating robust detection of structural, temporal, and latent anomalies (RQ1). The explanation module, combining SHAP attributions and counterfactual guidance, produced high developer-rated interpretability, including 4.3 ± 0.4/5 clarity and 4.1 ± 0.5/5 actionability, with 96% self-reported remediation intent (n = 82), reinforcing its role as a transparent and developer-trusted advisory component (RQ2). In addition to subjective user evaluation, the explainability component was validated using objective metrics, including faithfulness and stability, demonstrating strong alignment between SHAP attributions and model behavior. This combined evaluation provides more robust evidence of explanation reliability, although further work is required to assess causal completeness and real-world deployment variability.
Pipeline-native deployment in GitHub Actions and GitLab CI enabled synchronous inference at 0.8 s latency, supporting real-time risk assessment and automated enforcement. Stratified comparative benchmarking showed that XAI-SCS remains competitive with Snyk and Dependabot on CVE-only cases, while providing additional metadata-level behavioral anomaly coverage in controlled GAN-simulated and curated non-CVE subsets. These findings should be interpreted as complementary coverage beyond CVE-centric SCA tools, not as universal superiority over tools designed primarily for known-vulnerability detection. Preliminary high-assurance extensions—such as Federated Continual Learning with Differential Privacy (ε = 0.8), Zero-Knowledge Attestation (285-byte zk-SNARK proofs), and Post-Quantum Secure Enclave inference (Intel SGX + ML-DSA)—illustrate potential pathways for verifiable and confidential operation but are not part of the core empirical evaluation.
While the core detection, explanation, and CI/CD integration results are robust, several advanced security extensions (federated learning, attestation, secure enclaves) remain preliminary and were not subjected to comprehensive threat modeling or adversarial evaluation in this study.
While the evaluation demonstrates practical performance, several constraints apply. The dataset reflects balanced threat distributions and may behave differently in high-churn OSS ecosystems. FCL-DP assumes stable registry participation, and current zk-SNARK circuits handle SBOMs with up to ~ 150 dependencies. SGX-enabled runners, though increasingly supported in cloud CI/CD, may limit deployment in certain environments. A further limitation concerns the imbalance between training labels and real-world non-CVE validation. The model is trained primarily using CVE-linked labels and GAN-simulated poisoning samples, while the real non-CVE incident set is smaller and used only for held-out evaluation. Therefore, the reported non-CVE performance should be interpreted as preliminary evidence that metadata-based anomaly patterns can transfer to selected documented incidents, not as a comprehensive benchmark of all real-world non-CVE supply chain attacks. Future work should expand the real incident corpus, include longitudinal registry monitoring, and validate the framework in live CI/CD deployments with human security teams.
The evaluation of explainability in this study is primarily based on developer perception and therefore reflects subjective assessments of clarity and usefulness. In addition, the developer study did not measure operational remediation outcomes, such as time-to-fix, pull-request completion, dependency-upgrade success, vulnerability-resolution rate, or long-term reduction in unresolved alerts. The results therefore support claims about perceived usefulness and actionability, but not yet about tangible remediation improvements in real DevSecOps teams. While the results indicate strong practical value in supporting CI/CD decision-making, they do not provide formal guarantees regarding explanation fidelity or completeness. Addressing this limitation through objective, model-grounded explainability metrics remains an important direction for future work.
The non-CVE results should be interpreted cautiously: they provide preliminary evidence of complementary screening for selected metadata-visible behavioral anomalies, but they do not establish comprehensive real-world non-CVE attack detection.
The primary empirical contribution of this work is therefore limited to RQ1–RQ3, while RQ4–RQ6 are positioned as optional and exploratory deployment expansions for future high-assurance implementations. While RQ4–RQ6 indicate promising deployment-oriented directions, the principal validated contribution of this study remains the metadata-driven explainable anomaly-detection and decision-support framework evaluated under RQ1–RQ3.
The curated real-world non-CVE subset is relatively small and includes only incidents that expose observable metadata-level signals. Therefore, the reported performance on this subset does not establish broad real-world non-CVE coverage. Future work should evaluate the framework on larger, independently curated, multi-ecosystem non-CVE incident datasets, including cases involving code-level payloads, build-system compromise, maintainer takeover, and provenance manipulation.
XAI-SCS is not intended to replace mature SCA tools such as Snyk, Dependabot, or advisory-database scanners. These tools remain essential for identifying known CVEs, license issues, and dependency-update recommendations. The role of XAI-SCS is complementary: it adds metadata-level behavioral screening and explainable decision support for selected anomaly patterns that may not be fully captured by CVE-centric tools.
Overall, XAI-SCS should be viewed as an enhancement to existing SCA workflows rather than a substitute for Snyk, Dependabot, or other CVE-centric scanners. Its value lies in adding interpretable metadata-level behavioral signals and remediation guidance to strengthen developer decision-making in CI/CD pipelines.
The reported results are based on fixed train/validation/test partitions and should be interpreted together with the reported agreement statistics, subgroup analyses, and benchmarking outcomes. Future work will investigate repeated-run evaluation and confidence-interval estimation across multiple data partitions and deployment settings.
Future work will further focus on extending recursive zk-SNARK composition for larger SBOMs, developing self-supervised pretraining to reduce labeled-data dependence, and implementing context-aware threshold adaptation to reduce false positives in rapidly evolving projects. Longitudinal studies across diverse DevSecOps pipelines will further validate scalability, remediation impact, and long-term adaptation.
Data availability
The code, configuration files, datasets, supporting scripts, and sample outputs associated with this study are publicly available through Zenodo at https://doi.org/10.5281/zenodo.22101018. The repository includes the materials required to support reproducibility of the reported experiments. Code is released under the MIT License, while the datasets are provided under CC BY 4.0. The complete survey instrument and administration protocol are provided in Appendix A.
Code availability
The code, configuration files, datasets, supporting scripts, and sample outputs associated with this study are publicly available through Zenodo at https://doi.org/10.5281/zenodo.22101018. The repository includes the materials required to support reproducibility of the reported experiments. Code is released under the MIT License, while the datasets are provided under CC BY 4.0. The complete survey instrument and administration protocol are provided in Appendix A.
References
- [1] Snyk. (n.d.). SNYK AI-Powered Developer Security Platform | AI-Powered AppSEC Tool & Security Platform | SNYK. https://snyk.io/
- [2] GitHub Advisory Database. (n.d.). GitHub. https://github.com/advisories
- [3] microsoft. (n.d.). GitHub - microsoft/OSSGadget: Collection of tools for analyzing open source packages. GitHub. https://github.com/microsoft/OSSGadget
- [4] Williams, L. et al. Research directions in software supply chain security. ACM Trans. Softw. Eng. Methodol. 34 (5), 1–38 (2025).
- [5] Suneja, S., Zheng, Y., Zhuang, Y., Laredo, J. A. & Morari, A. Towards reliable AI for source code understanding. In Proceedings of the ACM Symposium on Cloud Computing (pp. 403–411 (2021), November.
- [6] Sivamohan, S., Sridhar, S. S. & Krishnaveni, S. TEA-EKHO-IDS: An intrusion detection system for industrial CPS with trustworthy explainable AI and enhanced krill herd optimization. Peer-to-Peer Netw. Appl. 16 (4), 1993–2021 (2023).
- [7] Kula, R. G. Reducing Alert Fatigue via AI-Assisted Negotiation: A Case for Dependabot. In 2025 IEEE/ACM International Workshop on Bots in Software Engineering (BotSE) (pp. 11–12). IEEE (2025), April.
- [8] Osunkanmibi, A. A. et al. Cybersecurity and Data Protection in Supply Chains (AI’s Role in Protecting Sensitive Financial Data across Supply Chains, 2025).
- [9] Chukwu, N. et al. Resilient chain: AI-enhanced supply chain security and efficiency integration. Int. J. Sci. Manage. Res. 7 (03), 46–65 (2024).
- [10] Sarker, I. H., Janicke, H., Mohsin, A., Gill, A. & Maglaras, L. Explainable AI for cybersecurity automation, intelligence and trustworthiness in digital twin: Methods, taxonomy, challenges and prospects. ICT express. 10 (4), 935–958 (2024).
- [11] Rahman, M. M. et al. riskAIchain: AI-Driven IT Infrastructure-Blockchain-Backed Approach for Enhanced Risk Management Vol. 12, 206 (Risks, 2024). 12.
- [12] npm. (n.d.). Www.npmjs.com. https://www.npmjs.com
- [13] PYPI ·. The Python Package Index. (n.d.). PyPI. https://pypi.org/
- [14] GitHub · Build and ship software on a single, collaborative platform. GitHub. (2025). https://github.com/
- [15] NVD - Data Feeds. (n.d.). https://nvd.nist.gov/vuln/data-feeds
- [16] Kolade, T. M., Val, O., Balogun, O., Gbadebo, A. Y. & Olaniyi, O. O. M. O., AI-driven open source intelligence in cyber defense: A double-edged sword for national security. Adebayo Yusuf and Gbadebo, Michael Olayinka and Olaniyi, Oluwaseun Oladeji, AI-Driven Open Source Intelligence in Cyber Defense: A Double-edged Sword for National Security(January 18, 2025). (2025).
- [17] Nasir, K., Badri, S. K., Alghazzawi, D. M., Alghamdi, M. Y., Alkhozae, M., Almakky,A., … Asghar, M. Z. (2026). HED-ID: an edge-deployable and explainable intrusion detection system optimized via metaheuristic learning. Scientific Reports, 16(1), 2313.
- [18] Andreoni, M., Lunardi, W. T., Lawton, G. & Thakkar, S. Enhancing autonomous system security and resilience with generative AI: A comprehensive survey. IEEE Access. 12, 109470–109493 (2024).
- [19] Jillani, N., Khattak, A. M., Ullah, R., Asghar, M. Z. & Khalil, A. Securing Multi-Agent Networks Against Shadow AI: An Explainable and Quantum-Resilient Framework. In 2026 International Conference on Artificial Intelligence, Computer, Data Sciences and Applications (ACDSA) (pp. 1–6). IEEE. (2026), February.
- [20] Tabassum, N., Khattak, A. M., Khali, A., Khan, W. A. & Asghar, M. Z. Attribute-Guided Zero-Shot Activity Recognition in Wearable Health Systems. In 2025 5th International Conference on Electrical, Computer, Communications and Mechatronics Engineering (ICECCME) (pp. 1–6). IEEE. (2025), October.
- [21] Badhon, B., Chakrabortty, R. K., Anavatti, S. G. & Vanhoucke, M. A multi-module explainable artificial intelligence framework for project risk management: enhancing transparency in decision-making. Eng. Appl. Artif. Intell. 148, 110427 (2025).
Acknowledgements
This research is supported by a grant (No. CRPG-25-3096) under the Cybersecurity Research and Innovation Pioneers Initiative, provided by the National Cybersecurity Authority (NCA) in the Kingdom of Saudi Arabia.
Contributions
Ahmed Alzahrani and Muhammad Zubair Asghar jointly conceived the study and designed the methodology. Ahmad Alzaharani implemented the models, conducted the experiments, and performed the data analysis. Ahmad Alzaharani supervised the research, contributed to result interpretation, and led manuscript revision. Both authors reviewed and approved the final manuscript.
Ethics declarations
Competing interests
The authors declare no competing interests.
Declaration of AI tool usage
During the preparation of this manuscript, the author(s) used the AI-based tools Grammarly, ChatGPT, Grok, and Gemini exclusively for correcting grammatical errors and enhancing the professional quality of the language. After utilizing these tools, the author(s) thoroughly reviewed and edited the content to ensure accuracy and appropriateness, and take(s) full responsibility for the final content of the publication.
Ethics statement
This study involved two distinct methodological components. First, the software supply-chain dataset was constructed exclusively from publicly accessible sources, including npm, PyPI, GitHub APIs, and the National Vulnerability Database (NVD). These sources contain package-level metadata, dependency structures, contributor activity indicators, and vulnerability records, and do not include personally identifiable information, private user data, or restricted-access content. Therefore, no separate Institutional Review Board (IRB) approval or individual informed consent was required for the public dataset component. Second, the developer survey conducted for the explainability evaluation involved voluntary human participants and was formally approved under Ethics Approval No. GU-CS-2025-03. Participation was voluntary and anonymous, informed consent was obtained prior to participation, and no personally identifiable information was collected. Additional details regarding the survey procedure, consent process, and anonymized responses are provided in Appendix A.
Supplementary Information
Below is the link to the electronic supplementary material.
Supplementary Material 1
Appendices
Appendix A: Developer survey, consent procedure, and ethics approval (GU-CS-2025-03)
Introduction and consent
This survey evaluates perceptions of XAI-SCS, an explainable-AI framework for open-source supply-chain security.
Participation is voluntary and anonymous; the estimated time is 8–10 min. By proceeding, you consent to participate under the approved protocol.
☐ I consent to participate Date: ____________________.
Background information (demographics)
| Question | Response Options |
|---|---|
| Q1. Years of experience | ☐ < 2 ☐ 2–5 ☐ 6–10 ☐ > 10 |
| Q2. Primary package manager | ☐ npm ☐ PyPI ☐ Both ☐ Other |
| Q3. Use CI/CD pipelines regularly ? | ☐ Yes ☐ No |
| Q4. Current role | ☐ Developer ☐ Security Engineer ☐ DevOps ☐ Maintainer ☐ Researcher |
Explanation clarity (5-point likert)
Scale: 1 = Strongly Disagree 2 = Disagree 3 = Neutral 4 = Agree 5 = Strongly Agree.
| Code | Statement |
|---|---|
| C1 | SHAP explanation clearly shows which dependency features drive the risk score. |
| C2 | Counterfactual (“What-if”) message is understandable and relevant. |
| C3 | Explanation format integrates naturally within CI/CD logs. |
| C4 | Technical detail level is appropriate for my expertise. |
| C5 | Visualization (bar plot / heatmap) helps interpret the alert cause. |
Actionability and practical utility
| Code | Statement |
|---|---|
| A1 | Counterfactual guidance specifies clear remediation steps. |
| A2 | I would act on most XAI-SCS alerts owing to clarity of recommendations. |
| A3 | XAI-SCS appears likely to help shorten remediation time compared with conventional alert-only tools. |
| A4 | Recommendations align with organizational CI/CD policy. |
| A5 | Alerts can be integrated easily into my workflow. |
Trust, transparency and confidence
| Code | Statement |
|---|---|
| T1 | I trust the risk score because the explanation clearly shows the main contributing features. |
| T2 | The recommendation is understandable enough to support review or remediation. |
| T3 | The CI/CD report format increases my confidence in the alert. |
| T4 | Explanations make the model’s reasoning transparent and fair. |
| T5 | Overall, XAI-SCS is trustworthy for OSS risk assessment |
T3: The CI/CD report format increases my confidence in the alert.
Intent and future use
| Code | Question | Response Options |
|---|---|---|
| I1 | How often would you act on XAI-SCS alerts? | ☐ Always ☐ Often ☐ Sometimes ☐ Rarely ☐ Never |
| I2 | Would you recommend XAI-SCS to others? | ☐ Yes ☐ Maybe ☐ No |
| I3 | Preferred alert delivery channel | ☐ CI/CD log ☐ Email ☐ Slack ☐ Dashboard widget |
Open-ended feedback (optional)
1.
What was most useful about the explanations? __________________________________.
2.
What improvements would make alerts more actionable? __________________________.
3.
Do you have any privacy or bias concerns regarding AI-based alerts? ______________.
End of Apppendix A
All responses were collected anonymously between March 10–25 2025. Anonymized data and analysis scripts are available.
Appendix B. Optional High-Assurance Deployment Extensions
This appendix briefly summarizes optional deployment extensions that may be explored in future work. These extensions are not part of the primary empirical evaluation of XAI-SCS.
Privacy-preserving adaptation
Future deployments may use privacy-preserving model adaptation to update risk-scoring models across multiple registries without directly sharing raw package metadata. In this manuscript, this idea is treated only as an exploratory deployment direction.
Provenance verification
Future deployments may attach cryptographic provenance checks to SBOMs or risk-score outputs to support tamper-evident reporting. The present study does not evaluate cryptographic soundness or production-grade attestation.
Confidential execution
Future deployments may use secure-execution environments to protect inference in untrusted CI/CD runners. The present study does not provide a full enclave-security evaluation or post-quantum security proof.
Scope statement
These optional extensions are included only to indicate possible future high-assurance deployment pathways. They are subordinate to the core XAI-SCS contribution, which remains the metadata-driven anomaly-detection, explanation, and CI/CD decision-support framework evaluated under RQ1–RQ3.