Shengyi Pan
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Previous Organizations / Institutes
The organizations / institutes from the scholar's other articles in the past ten years
Research Subjects
Shengyi Pan has a total of 18 co-authors. Here are the top co-authors by number of shared publications:
- Shanping Li
Zhejiang University, Hangzhou, China
5 shared publications - Xin Xia
The State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China
5 shared publications - Xing Hu
The State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China
5 shared publications - Jiayuan Zhou
Queen's University, Kingston, Canada
4 shared publications - Yongliang Zhang
School of Computer Science and Technology, Zhejiang University of Technology, Hangzhou, China
3 shared publications - Chenhao Gao
College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China
2 shared publications
Latest Publications
- Open Access
- 1 October 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (ISSTA) , 2225-2247
Answer Is Cheap, Show Me the Evidence! Augmenting Automated Vulnerability Assessment with Evidence
Software Vulnerability (SV) assessment is a vital phase in SV management, which characterizes discovered SVs to locate hot spots and prioritize their remediation. To reduce the overhead and latency of manual assessment, prior works have explored automatically predicting assessment results from SV reports (SVRs). However, existing approaches fail to process the information conveyed by the rich text content (e.g., screenshots and code snippets) embedded in SVRs and miss information about vulnerable projects. More importantly, they primarily focus on assessment accuracy while neglecting to provide explanations or evidence supporting their predictions. As a result, these approaches remain impractical in real-world settings, where imperfect accuracy necessitates manual validation. LLMs offer a promising opportunity to address this limitation by performing SV assessment while simultaneously providing supporting evidence. Nevertheless, our extensive evaluation reveals that mainstream LLMs perform poorly on SV assessment tasks, largely due to a lack of assessment specific knowledge. To address the above challenges, we propose EAVA, a novel framework that effectively leverages LLMs to perform SV assessment and provide supporting evidence. EAVA employs specialized LLM agents to process rich text content in SVRs and incorporate information about vulnerable projects. EAVA builds a dedicated assessment LLM by injecting assessment-specific knowledge through finetuning. Specifically, we enable large-scale reasoning trajectory annotation using off-the-shelf LLMs and adopt a two-stage training paradigm, i.e., supervised instruction tuning to inject domain knowledge, followed by reinforcement learning to enhance the model’s intrinsic reasoning capability. Evaluations on a newly collected SVR dataset demonstrate that EAVA outperforms the best-performing baseline by 5.3%-35.2% across multiple evaluation metrics. Ablation studies validate the effectiveness of our design choices for both assessment specific model training and SV information enrichment. Finally, a user study with security experts confirms that the evidence provided by EAVA is useful and practical for real-world SV assessment.
- 1 October 2026
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (ISSTA) , 2225-2247
Open AccessAnswer Is Cheap, Show Me the Evidence! Augmenting Automated Vulnerability Assessment with Evidence
Software Vulnerability (SV) assessment is a vital phase in SV management, which characterizes discovered SVs to locate hot spots and prioritize their remediation. To reduce the overhead and latency of manual assessment, prior works have explored automatically predicting assessment results from SV reports (SVRs). However, existing approaches fail to process the information conveyed by the rich text content (e.g., screenshots and code snippets) embedded in SVRs and miss information about vulnerable projects. More importantly, they primarily focus on assessment accuracy while neglecting to provide explanations or evidence supporting their predictions. As a result, these approaches remain impractical in real-world settings, where imperfect accuracy necessitates manual validation. LLMs offer a promising opportunity to address this limitation by performing SV assessment while simultaneously providing supporting evidence. Nevertheless, our extensive evaluation reveals that mainstream LLMs perform poorly on SV assessment tasks, largely due to a lack of assessment specific knowledge. To address the above challenges, we propose EAVA, a novel framework that effectively leverages LLMs to perform SV assessment and provide supporting evidence. EAVA employs specialized LLM agents to process rich text content in SVRs and incorporate information about vulnerable projects. EAVA builds a dedicated assessment LLM by injecting assessment-specific knowledge through finetuning. Specifically, we enable large-scale reasoning trajectory annotation using off-the-shelf LLMs and adopt a two-stage training paradigm, i.e., supervised instruction tuning to inject domain knowledge, followed by reinforcement learning to enhance the model’s intrinsic reasoning capability. Evaluations on a newly collected SVR dataset demonstrate that EAVA outperforms the best-performing baseline by 5.3%-35.2% across multiple evaluation metrics. Ablation studies validate the effectiveness of our design choices for both assessment specific model training and SV information enrichment. Finally, a user study with security experts confirms that the evidence provided by EAVA is useful and practical for real-world SV assessment.
- Open Access
- 5 July 2026
- Published by Association for Computing Machinery (ACM)
- p. 762-772
Mitigating Implicit Inconsistencies in Patch Porting
- 5 July 2026
- Published by Association for Computing Machinery (ACM)
- p. 762-772
Open AccessMitigating Implicit Inconsistencies in Patch Porting
- Open Access
- 11 September 2024
- Published by Association for Computing Machinery (ACM)
- p. 363-375
Automating Zero-Shot Patch Porting for Hard Forks
Forking is a typical way of code reuse, which provides a simple way for developers to create a variant software (denoted as hard fork) by copying and modifying an existing codebase. Despite of the benefits, forking also leads to duplicate efforts in software maintenance. Developers need to port patches across the hard forks to address similar bugs or implement similar features. Due to the divergence between the source project and the hard fork, patch porting is complicated, which requires an adaption regarding different implementations of the same functionality. In this work, we take the first step to automate patch porting for hard forks under a zero-shot setting. We first conduct an empirical study of the patches ported from Vim to Neovim over the last ten years to investigate the necessities of patch porting and the potential flaws in the current practice. We then propose a large language model (LLM) based approach (namely PPatHF) to automatically port patches for hard forks on a function-wise basis. Specifically, PPatHF is composed of a reduction module and a porting module. Given the pre- and post-patch versions of a function from the reference project and the corresponding function from the target project, the reduction module first slims the input functions by removing code snippets less relevant to the patch. Then, the porting module leverages a LLM to apply the patch to the function from the target project. To better elicit the power of the LLM on patch porting, we design a prompt template to enable efficient in-context learning. We further propose an instruction-tuning based training task to better guide the LLM to port the patch and inject task-specific knowledge. We evaluate PPatHF on 310 Neovim patches ported from Vim. The experimental results show that PPatHF outperforms the baselines significantly. Specifically, PPatHF can correctly port 131 (42.3%) patches and automate 57% of the manual edits required for the developer to port the patch.
- 11 September 2024
- Published by Association for Computing Machinery (ACM)
- p. 363-375
Open AccessAutomating Zero-Shot Patch Porting for Hard Forks
Forking is a typical way of code reuse, which provides a simple way for developers to create a variant software (denoted as hard fork) by copying and modifying an existing codebase. Despite of the benefits, forking also leads to duplicate efforts in software maintenance. Developers need to port patches across the hard forks to address similar bugs or implement similar features. Due to the divergence between the source project and the hard fork, patch porting is complicated, which requires an adaption regarding different implementations of the same functionality. In this work, we take the first step to automate patch porting for hard forks under a zero-shot setting. We first conduct an empirical study of the patches ported from Vim to Neovim over the last ten years to investigate the necessities of patch porting and the potential flaws in the current practice. We then propose a large language model (LLM) based approach (namely PPatHF) to automatically port patches for hard forks on a function-wise basis. Specifically, PPatHF is composed of a reduction module and a porting module. Given the pre- and post-patch versions of a function from the reference project and the corresponding function from the target project, the reduction module first slims the input functions by removing code snippets less relevant to the patch. Then, the porting module leverages a LLM to apply the patch to the function from the target project. To better elicit the power of the LLM on patch porting, we design a prompt template to enable efficient in-context learning. We further propose an instruction-tuning based training task to better guide the LLM to port the patch and inject task-specific knowledge. We evaluate PPatHF on 310 Neovim patches ported from Vim. The experimental results show that PPatHF outperforms the baselines significantly. Specifically, PPatHF can correctly port 131 (42.3%) patches and automate 57% of the manual edits required for the developer to port the patch.
- Open Access
- 10 July 2024
- Published by Association for Computing Machinery (ACM)
- p. 138-149
Unveil the Mystery of Critical Software Vulnerabilities
Today’s software industry heavily relies on open source software (OSS). However, the rapidly increasing number of OSS software vulnerabilities (SVs) poses huge security risks to the software supply chain. Managing the SVs in the relied OSS components has become a critical concern for software vendors. Due to the limited resources in practice, an essential focus for the vendors is to locate and prioritize the remediation of critical SVs (CSVs), i.e., those tend to cause huge losses. Particularly, in the software industry, vendors are obliged to comply with the security service level agreement (SLA), which mandates the fix of CSVs within a short time frame (e.g., 15 days). However, to the best of our knowledge, there is no empirical study that specifically investigates CSVs. The existing works only target at general SVs, missing a view of the unique characteristics of CSVs. In this paper, we investigate the distributions (from temporal, type, and repository dimension) and the current remediation practice of CSVs in the OSS ecosystem, especially their differences compared with non-critical SVs (NCSVs). We adopt the industry standard to refer SVs with a 9+ Common Vulnerability Scoring System (CVSS) score as CSVs and others as NCSVs. We collect a large-scale dataset containing 14,867 SVs and artifacts associated with their remediation (e.g., issue report, commit) across 4,462 GitHub repositories. Our findings regarding CSV distributions can help practitioners better locate these hot spots. Regarding the remediation practice, we observe that though CSVs receive higher priorities, some practices (e.g., complicated review and testing pro-cess) may unintentionally cause the delay to their fixes. We also point out the risks of SV information leakage during remediation process, which could leave a window-of-opportunity of over 30 days on median for zero-day attacks. Based on our findings, we provide implications to improve the current CSV remediation practice.
- 10 July 2024
- Published by Association for Computing Machinery (ACM)
- p. 138-149
Open AccessUnveil the Mystery of Critical Software Vulnerabilities
Today’s software industry heavily relies on open source software (OSS). However, the rapidly increasing number of OSS software vulnerabilities (SVs) poses huge security risks to the software supply chain. Managing the SVs in the relied OSS components has become a critical concern for software vendors. Due to the limited resources in practice, an essential focus for the vendors is to locate and prioritize the remediation of critical SVs (CSVs), i.e., those tend to cause huge losses. Particularly, in the software industry, vendors are obliged to comply with the security service level agreement (SLA), which mandates the fix of CSVs within a short time frame (e.g., 15 days). However, to the best of our knowledge, there is no empirical study that specifically investigates CSVs. The existing works only target at general SVs, missing a view of the unique characteristics of CSVs. In this paper, we investigate the distributions (from temporal, type, and repository dimension) and the current remediation practice of CSVs in the OSS ecosystem, especially their differences compared with non-critical SVs (NCSVs). We adopt the industry standard to refer SVs with a 9+ Common Vulnerability Scoring System (CVSS) score as CSVs and others as NCSVs. We collect a large-scale dataset containing 14,867 SVs and artifacts associated with their remediation (e.g., issue report, commit) across 4,462 GitHub repositories. Our findings regarding CSV distributions can help practitioners better locate these hot spots. Regarding the remediation practice, we observe that though CSVs receive higher priorities, some practices (e.g., complicated review and testing pro-cess) may unintentionally cause the delay to their fixes. We also point out the risks of SV information leakage during remediation process, which could leave a window-of-opportunity of over 30 days on median for zero-day attacks. Based on our findings, we provide implications to improve the current CSV remediation practice.
- Open Access
- 12 April 2024
- Published by Association for Computing Machinery (ACM)
- p. 1-13
Towards More Practical Automation of Vulnerability Assessment
It is increasingly suggested to identify emerging software vulnerabilities (SVs) through relevant development activities (e.g., issue reports) to allow early warnings to open source software (OSS) users. However, the support for the following assessment of the detected SVs has not yet been explored. SV assessment characterizes the detected SVs to prioritize limited remediation resources on the critical ones. To fill this gap, we aim to enable early vulnerability assessment based on SV-related issue reports (SIR). Besides, we observe the following concerns of the existing assessment techniques: 1) the assessment output lacks rationale and practical value; 2) the associations between Common Vulnerability Scoring System (CVSS) metrics have been ignored; 3) insufficient evaluation scenarios and metrics. We address these concerns to enhance the practicality of our proposed early vulnerability assessment approach (namely proEVA). Specifically, based on the observation of strong associations between CVSS metrics, we propose a prompt-based model to exploit such relations for CVSS metrics prediction. Moreover, we design a curriculum-learning (CL) schedule to guide the model better learn such hidden associations during training. Aside from the standard classification metrics adopted in existing works, we propose two severity-aware metrics to provide a more comprehensive evaluation regarding the prioritization of the high-severe SVs. Experimental results show that proEVA significantly outperforms the baselines in both types of metrics. We further discuss the transferability of the prediction model regarding the upgrade of the assessment system, an important yet overlooked evaluation scenario in existing works. The results verify that proEVA is more efficient and flexible in migrating to different assessment systems.
- 12 April 2024
- Published by Association for Computing Machinery (ACM)
- p. 1-13
Open AccessTowards More Practical Automation of Vulnerability Assessment
It is increasingly suggested to identify emerging software vulnerabilities (SVs) through relevant development activities (e.g., issue reports) to allow early warnings to open source software (OSS) users. However, the support for the following assessment of the detected SVs has not yet been explored. SV assessment characterizes the detected SVs to prioritize limited remediation resources on the critical ones. To fill this gap, we aim to enable early vulnerability assessment based on SV-related issue reports (SIR). Besides, we observe the following concerns of the existing assessment techniques: 1) the assessment output lacks rationale and practical value; 2) the associations between Common Vulnerability Scoring System (CVSS) metrics have been ignored; 3) insufficient evaluation scenarios and metrics. We address these concerns to enhance the practicality of our proposed early vulnerability assessment approach (namely proEVA). Specifically, based on the observation of strong associations between CVSS metrics, we propose a prompt-based model to exploit such relations for CVSS metrics prediction. Moreover, we design a curriculum-learning (CL) schedule to guide the model better learn such hidden associations during training. Aside from the standard classification metrics adopted in existing works, we propose two severity-aware metrics to provide a more comprehensive evaluation regarding the prioritization of the high-severe SVs. Experimental results show that proEVA significantly outperforms the baselines in both types of metrics. We further discuss the transferability of the prediction model regarding the upgrade of the assessment system, an important yet overlooked evaluation scenario in existing works. The results verify that proEVA is more efficient and flexible in migrating to different assessment systems.
- Open Access
- 1 December 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 8, 216948-216959
BlockRFC: Real-Time Rolled Fingerprint Construction and Distortion Rectification
Compared with a flat fingerprint, the rolled fingerprint has a larger fingerprint area and can be extracted more minutiae. It has high requirements in many fields, not only in the military environment or the police field but also in many civil application fields. The challenge that has been troubled for a long time is that contact-based rolled fingerprint registration is easy to cause obvious distortion without human experts’ supervision, which has a negative impact on fingerprint recognition performance. Due to the elastic deformation of fingertips, the mosaicking gaps in the rolled fingerprint are usually visible but challenging to locate. To address these problems, we propose a novel rolled fingerprint construction algorithm called BlockRFC (Block-based Rolled Fingerprint Construction) in this paper. BlockRFC’s core idea is to use the fingerprint image block as a processing unit for mosaicking and distortion rectification. BlockRFC is based on a real-time mosaicking framework, which makes it possible to construct a rolled fingerprint while collecting fingerprint images. One distinctive advantage of BlockRFC is that it does not require minutiae or ridge information, but fully utilizes the gray-scale information and foreground area in the fingerprint image block. In this paper, we first propose a metric called Mosaicking Gap Rate (MGR), which can effectively quantify the mosaicking gaps in the rolled fingerprints. Experimental results show that the proposed method can not only effectively locate and eliminate the mosaicking gaps but also have better recognition accuracy than previous methods.
- 1 December 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 8, 216948-216959
Open AccessBlockRFC: Real-Time Rolled Fingerprint Construction and Distortion Rectification
Compared with a flat fingerprint, the rolled fingerprint has a larger fingerprint area and can be extracted more minutiae. It has high requirements in many fields, not only in the military environment or the police field but also in many civil application fields. The challenge that has been troubled for a long time is that contact-based rolled fingerprint registration is easy to cause obvious distortion without human experts’ supervision, which has a negative impact on fingerprint recognition performance. Due to the elastic deformation of fingertips, the mosaicking gaps in the rolled fingerprint are usually visible but challenging to locate. To address these problems, we propose a novel rolled fingerprint construction algorithm called BlockRFC (Block-based Rolled Fingerprint Construction) in this paper. BlockRFC’s core idea is to use the fingerprint image block as a processing unit for mosaicking and distortion rectification. BlockRFC is based on a real-time mosaicking framework, which makes it possible to construct a rolled fingerprint while collecting fingerprint images. One distinctive advantage of BlockRFC is that it does not require minutiae or ridge information, but fully utilizes the gray-scale information and foreground area in the fingerprint image block. In this paper, we first propose a metric called Mosaicking Gap Rate (MGR), which can effectively quantify the mosaicking gaps in the rolled fingerprints. Experimental results show that the proposed method can not only effectively locate and eliminate the mosaicking gaps but also have better recognition accuracy than previous methods.
- Open Access
- 1 October 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 8, 183391-183400
A Score-Level Fusion of Fingerprint Matching With Fingerprint Liveness Detection
Fingerprint-based recognition is widely deployed in different domains. However, the traditional fingerprint recognition systems are vulnerable to presentation attack, which utilizes an artificial replica of the fingerprint to deceive the sensors. In such scenarios, Fingerprint Liveness Detection (FLD) is required to ensure the actual presence of a live fingerprint. In this paper, a fingerprint matching method fused with liveness detection is proposed. Firstly, the similarity between two fingerprint images is calculated based on Octantal Neatest-Neighborhood Structure (ONNS), where the closest minutia to the central minutia is found from each sector of octant. Secondly, the FLD score of the fingerprint image is obtained by using the modified Residual Network (Slim-ResCNN). Finally, a score-level fusion is performed on the results of fingerprint matching and FLD by generating interaction features and polynomial features as the score feature vector. To classify whether a fingerprint image is a genuine live fingerprint or a spoof attack (including impostor live and fake fingerprints), the score feature vector is processed using logistic regression (LR) classifiers. The proposed method won the first place in the Fingerprint Liveness Detection Competition 2019 with an overall accuracy of 96.88%, which indicates it can effectively protect the fingerprint recognition systems from spoof attacks.
- 1 October 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 8, 183391-183400
Open AccessA Score-Level Fusion of Fingerprint Matching With Fingerprint Liveness Detection
Fingerprint-based recognition is widely deployed in different domains. However, the traditional fingerprint recognition systems are vulnerable to presentation attack, which utilizes an artificial replica of the fingerprint to deceive the sensors. In such scenarios, Fingerprint Liveness Detection (FLD) is required to ensure the actual presence of a live fingerprint. In this paper, a fingerprint matching method fused with liveness detection is proposed. Firstly, the similarity between two fingerprint images is calculated based on Octantal Neatest-Neighborhood Structure (ONNS), where the closest minutia to the central minutia is found from each sector of octant. Secondly, the FLD score of the fingerprint image is obtained by using the modified Residual Network (Slim-ResCNN). Finally, a score-level fusion is performed on the results of fingerprint matching and FLD by generating interaction features and polynomial features as the score feature vector. To classify whether a fingerprint image is a genuine live fingerprint or a spoof attack (including impostor live and fake fingerprints), the score feature vector is processed using logistic regression (LR) classifiers. The proposed method won the first place in the Fingerprint Liveness Detection Competition 2019 with an overall accuracy of 96.88%, which indicates it can effectively protect the fingerprint recognition systems from spoof attacks.
- Open Access
- 28 April 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 8, 84141-84152
FLDNet: Light Dense CNN for Fingerprint Liveness Detection
Fingerprint liveness detection has gained increased attention recently due to the growing threat of spoof presentation attacks. Among the numerous attempts to deal with this problem, the Convolutional Neural Networks (CNN) based methods have shown impressive performance and great potential. However, there is a need for improving the generalization ability and reducing the complexity. Therefore, we propose a lightweight (0.48M parameters) and efficient network architecture, named FLDNet, with an attention pooling layer which overcomes the weakness of Global Average Pooling (GAP) in fingerprint anti-spoofing tasks. FLDNet consists of modified dense blocks which incorporate the residual path. The designed block architecture is compact and effectively boosts the detection accuracy. Experimental results on two datasets, LivDet 2013 and 2015, show the proposed approach achieves state-of-the-art performance in intra-sensor, cross-material and cross-sensor testing scenarios. For example, on LivDet 2015 dataset, FLDNet achieves 1.76% Average Classification Error (ACE) over all sensors and 3.31% against unkown spoof materials compared to 2.82% and 5.45% achieved by state-of-the-art methods.
- 28 April 2020
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 8, 84141-84152
Open AccessFLDNet: Light Dense CNN for Fingerprint Liveness Detection
Fingerprint liveness detection has gained increased attention recently due to the growing threat of spoof presentation attacks. Among the numerous attempts to deal with this problem, the Convolutional Neural Networks (CNN) based methods have shown impressive performance and great potential. However, there is a need for improving the generalization ability and reducing the complexity. Therefore, we propose a lightweight (0.48M parameters) and efficient network architecture, named FLDNet, with an attention pooling layer which overcomes the weakness of Global Average Pooling (GAP) in fingerprint anti-spoofing tasks. FLDNet consists of modified dense blocks which incorporate the residual path. The designed block architecture is compact and effectively boosts the detection accuracy. Experimental results on two datasets, LivDet 2013 and 2015, show the proposed approach achieves state-of-the-art performance in intra-sensor, cross-material and cross-sensor testing scenarios. For example, on LivDet 2015 dataset, FLDNet achieves 1.76% Average Classification Error (ACE) over all sensors and 3.31% against unkown spoof materials compared to 2.82% and 5.45% achieved by state-of-the-art methods.