The present application provides a
vulnerability remediation code identification method, comprising: acquiring
commit information of open-source
software, the
commit information comprising a committed
code snippet and text information associated with the
code snippet; inputting the
commit information into a
first language model and performing identification to obtain function change information and
test case information; inputting the function change information into a
vulnerability remediation identification model to obtain a
vulnerability remediation
code snippet for a target vulnerability, and inputting the
test case information into a vulnerability
test case identification model to obtain a test case code
snippet for the target vulnerability; and inputting the vulnerability remediation code
snippet for the target vulnerability and the test case code
snippet for the target vulnerability into a second
language model and performing integration and identification to obtain an identification result. On the basis of notable characteristics in a test case for a vulnerability, the
identification rate of vulnerability remediation code can be effectively increased. In this way, a user can discover potential vulnerabilities in advance, thus reducing security risks.