Python library fuzzy test drive generation method based on large language model

The fuzzy test-driven code of Python library is generated through large language models and static analysis tools, which solves the problem of inefficient vulnerability detection in the existing technology and realizes efficient vulnerability detection.

CN119670094AInactive Publication Date: 2025-03-21HUNAN UNIV
2 Cites 6 Cited by

Patent Information

Application Number
CN202411735070.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently generate fuzzy testing driver code for Python libraries, resulting in inefficient vulnerability detection.

Method used

A large language model is used to combine static analysis tools and sample code of open source fuzz testing projects to construct prompt words to generate fuzz testing driver code, and through multiple rounds of generation and filtering, a final collection of driver codes to be discovered is formed.

Benefits of technology

It realizes efficient generation of fuzzy test-driven code, improving the efficiency and accuracy of Python library code vulnerability detection.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention focuses on the field of fuzz testing, and particularly relates to intelligent auxiliary fuzz testing drive code generation by using a large language model. The invention provides a convenient, fast and automatic fuzz test driving code generation method for Python library code fuzz test by using a large language model and combining a test function and a sample code. The method comprises the steps that Python library source code analysis and drive code sample information extraction are conducted through a static analysis tool, and a data set of a test function and a sample code is obtained; constructing a prompt word engineering structure comprising a drive sample code, a generation task description, a variation strategy introduction, a test function information set, a drive sample code and a code standardization description, and generating zero-sample, less-sample and thinking chain prompts according to the number of samples; building a large language model agent end, transmitting cue words to open-source and closed-source large language models in an HTTP / HTTPS (Hyper Text Transfer Protocol / Hyper Text Transfer Protocol Secure Socket) message mode, and performing reasoning generation of fuzzy test driving codes; after the drive codes are obtained, the fuzz test drive codes which do not pass the pilot run test are generated and screened for multiple rounds, and finally a fuzz test drive code set to be subjected to vulnerability mining is obtained; and performing vulnerability mining on the test function by utilizing the obtained fuzzy test driving code set, and storing a result to a database for analysis.
Need to check novelty before this filing date? Find Prior Art