The invention relates to the technical field of
software reliability guarantee, in particular to a code
vulnerability detection method based on efficient parameter
fine tuning of a code pre-training model, which comprises the following steps: preprocessing source codes of a
vulnerability data set; s2, converting the preprocessed
source code, and extracting a token sequence and a code attribute graph path corresponding to the
source code; s3, constructing a code
vulnerability detection model, wherein the code
vulnerability detection model comprises a
semantic feature extractor, a structural feature extractor, a
feature fusion layer and a classifier; s4, jointly training a code
vulnerability detection model by using the token sequence corresponding to the extracted
source code and the code attribute graph path; and S5, through the optimized code
vulnerability detection model, outputting a result that whether the source code to be detected has vulnerabilities or not. According to the method, the model is finely adjusted through efficient parameter fine adjustment, training resources are saved, good performance is obtained, and the code vulnerability detection efficiency and accuracy are improved by fusing and learning semantic and structural features of source codes at the same time.