Electronic device for detecting software vulnerabilities and method for operating the electronic device
The electronic device automates the identification of vulnerabilities and patching status in large-scale source code by comparing source code with a classification file, addressing the challenge of manual vulnerability assessment in open source applications.
Patent Information
- Application Number
- CN201980035377.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-05-30
- Filing Date
- 2019-05-03
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2039-05-03
AI Technical Summary
Application developers face challenges in identifying and addressing vulnerabilities in large-scale source code due to the inclusion of multiple open sources, with existing technologies lacking automated methods to determine if included open sources are patched or contain vulnerabilities.
An electronic device and method that includes a processor to load and compare source code with a comparison file, classifying strings as fixes or vulnerabilities, and provide information on patching status and vulnerabilities through an output device.
Automatically identifies whether software contains vulnerabilities and determines if it has been patched, reducing the manual effort required by developers to assess open source components.
Smart Images

Figure CN112166419B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an electronic device for detecting software vulnerabilities and a method for operating the electronic device. Background Art
[0002] In recent years, developers have generated and released various types of open source, and application (or program) developers use open source to develop applications. Open source may contain vulnerabilities. In the International Organization for Standardization (ISO) 27005, a vulnerability is defined as a weakness in an asset or a group of assets that can be exploited by one or more threats. IETF RFC2828 defines a vulnerability as a weakness in management, operation, implementation, or design that can be exploited to violate the system security policy.
[0003] Vulnerabilities may be caused by insufficient testing or insufficient audit trails. Vulnerabilities may be caused by various reasons, such as design flaws, software errors, and incorrect source code writing. In recent years, vulnerabilities from various sources have been analyzed and disclosed. For example, Common Vulnerabilities and Exposures or Common Vulnerabilities and Exposures (CVE) provides information about vulnerabilities and their fixes. In addition, the corresponding open source provider or other providers provide patch files to address the vulnerabilities. Summary of the invention
[0004] Technical issues
[0005] As described above, as information about vulnerabilities and their fixes is provided, application developers can use the provided information to identify whether there are any vulnerabilities in the open source included in the application they develop. In addition, application developers can use patch files to fix the source with vulnerabilities. However, when an application including a large-scale source code is created, multiple open sources may be included in the application. As a result, application developers face the limitation of manually identifying whether each open source includes a vulnerability or whether the open source is a patched version. Moreover, the technology for automatically identifying whether the open source included in the application is a patched version has not yet been developed.
[0006] Various embodiments are intended to solve the above problems or other problems and may provide an electronic device and a method for operating the electronic device, wherein the electronic device provides information indicating whether software included in an application contains vulnerabilities, information indicating whether the software has been patched, and information related to the vulnerabilities in the software by comparing vulnerabilities obtained from collected patch files or modified comparison files with the source code of the application.
[0007] Technical Solution
[0008] According to various embodiments, an electronic device includes: an output device; a memory storing at least one source code and a comparison file, the comparison file including at least one of a fix or a vulnerability, wherein each of at least one string contained in a patch file corresponding to the at least one source code is classified as the fix or the vulnerability; and a processor operatively coupled to the memory and the output device. The processor is configured to load the at least one source code stored in the memory, compare the string contained in the comparison file corresponding to the at least one source code with the string contained in the source code, and provide at least one of information indicating whether the source code identified based on the result of the comparison has been patched, the probability that the source code has been patched, or information related to the vulnerability in the source code through the output device.
[0009] According to various embodiments, a method of operating an electronic device includes: storing at least one source code and a comparison file, the comparison file including at least one of a fix or a vulnerability, wherein each of at least one string contained in a patch file corresponding to the at least one source code is classified as the fix or the vulnerability; loading the at least one source code stored in a memory of the electronic device; comparing the string contained in the comparison file corresponding to the at least one source code with the string contained in the source code; and providing, through an output device of the electronic device, at least one of information indicating whether the source code identified based on a result of the comparison has been patched, a probability that the source code has been patched, or information related to a vulnerability in the source code.
[0010] According to various embodiments, an electronic device includes: a communication circuit; a memory storing at least one source code; and a processor operatively coupled to the memory and the communication circuit. The processor is configured to: receive a patch file corresponding to at least a portion of the at least one source code through the communication circuit; identify file identification information, the file identification information identifying the source code to which the patch file is applied; classify each of at least one string as a fix or a vulnerability; generate a comparison file to be compared with the source code, the comparison file including at least one of the file identification information, the fix or the vulnerability; and store the comparison file in the memory.
[0011] Technical Effects
[0012] According to various embodiments, an electronic device and a method for operating the electronic device may be provided, wherein the electronic device provides information indicating whether software included in an application contains vulnerabilities, information indicating whether the software has been patched, and information related to the vulnerabilities in the software by comparing vulnerabilities obtained from collected patch files or a modified comparison file with the source code of the application.
[0013] The electronic device according to various embodiments provides information indicating whether the open source of the application contains any vulnerability. Therefore, the application developer does not need to manually identify whether each open source of the application has been patched. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a diagram illustrating a system including an electronic device and a server according to various embodiments;
[0015] Figure 2 is a block diagram illustrating an electronic device according to various embodiments;
[0016] Figure 3 is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0017] Figure 4 is a diagram illustrating a process of generating a comparison file according to various embodiments;
[0018] Figure 5 is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0019] Figure 6 is a diagram illustrating adjustment vulnerabilities and fixes according to various embodiments;
[0020] Figure 7a is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0021] Figure 7b is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0022] Figure 7c is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0023] Figure 7d is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0024] Figure 8 is a diagram illustrating a process of comparing a comparison file with a source code according to various embodiments;
[0025] Fig. 9 is a flow chart illustrating a method of operating an electronic device according to various embodiments;
[0026] Fig.10a is a diagram illustrating a patch file, a comparison file, and a target check file according to various embodiments;
[0027] Fig.10b is a diagram illustrating a patch file, a comparison file, and a target check file according to various embodiments;
[0028] Fig.10c is a diagram illustrating a patch file, a comparison file, and a target check file according to various embodiments;
[0029] Fig.10d is a diagram illustrating a patch file, a comparison file, and a target check file according to various embodiments;
[0030] Fig.11a are diagrams illustrating exemplary screens provided by an electronic device according to various embodiments; and
[0031] Fig.11b 2 is a diagram illustrating exemplary screens provided by an electronic device according to various embodiments. DETAILED DESCRIPTION
[0032] The electronic device according to various embodiments of the present disclosure may be one of various electronic devices. The various embodiments of the present disclosure and the terms used herein are not intended to limit the technical scope of the present disclosure, and it will be understood that the present disclosure covers various modified forms, equivalent forms and / or replacement forms. With regard to the description of the accompanying drawings, similar reference numerals may be used to refer to similar elements. It will be understood that the singular form includes the plural form unless otherwise clearly indicated in the context. In the present disclosure, the term "A or B", "at least one of A and / or B", "A, B or C" or "at least one of A, B and / or C" may cover all possible combinations of the listed items. The terms "1st", "2nd", "first" or "second" used in the present disclosure may be used for the naming of various components regardless of order or importance and do not limit these components. These expressions are used to distinguish one component from another component. When referring to a component (e.g., a first component), "operably or communicatively coupled to another component (e.g., a second component)", "operably or communicatively coupled to another component (e.g., the second component)", or "connected to another component (e.g., the second component)", it should be understood that one component is directly connected to another component or connected to another component through any other component (e.g., a third component).
[0033] As used herein, the term "module" may include units implemented in hardware, software, or firmware, and may be used interchangeably with other terms (e.g., "logic," "logic block," "portion," or "circuit"). A module may be a single integrated component adapted to perform one or more functions or the smallest unit or portion of the single integrated component. For example, a module may be implemented as an application specific integrated circuit (ASIC).
[0034] Figure 1 is a diagram illustrating a system including an electronic device and a server according to various embodiments.
[0035] like Figure 1 As shown, the electronic device 101 can communicate with the server 108 (e.g., a database), and the external electronic device 102 can communicate with the server 108. The electronic device 101 is, for example, an electronic device used by an application developer and can receive at least one source code (e.g., open source) for application creation from the server 108 of open source code. The server 108 is a source code library that receives, manages, and opens various sources such as open source. For example, the server 108 can be any of various source code libraries such as sourchforge, rubyforge, tigris, and bountysource, but is not limited to various source code libraries such as sourchforge, rubyforge, tigris, and bountysource. The electronic device 101 can execute a web browsing application according to the manipulation of the user through the input device, and directly receive a uniform resource identifier (URI) for accessing an open source server, or an option of an object corresponding to the URI. The electronic device 101 can access a web page corresponding to the URI (e.g., a web page for open source download) and download the open source. Any device may be the electronic device 101 as long as it can download open source from the server 108 , and the electronic device 101 may be implemented as any of various electronic devices such as a personal computer (PC), a tablet PC, and a smartphone.
[0036] The electronic device 101 may download at least one patch file corresponding to the open source from the server 108. The electronic device 101 may check information related to the vulnerability from the server 104, wherein the server 104 provides information related to the vulnerability in the open source. For example, the server 104 corresponding to the Common Vulnerabilities and Exposures (CVE) system may provide a reference (e.g., a serial number) and related content of information security vulnerability disclosures. For example, identification information related to the vulnerability (e.g., the serial number of the vulnerability) may be configured in the format of "CVE-year-serial number", and "CVE-2015-8000" may represent the 8000th reported vulnerability in 2015. The server 104 corresponding to the CVE system may provide a CVE specification, such as a CVE specification corresponding to an externally specified serial number. The CVE specification may include a description of the vulnerability. CVE is only exemplary, and those skilled in the art will readily understand that any mechanism may be used as long as it can perform vulnerability identification. An open source developer or a third party may discover a vulnerability in the open source, and send information related to the vulnerability to the server 104 corresponding to the CVE system through an electronic device. The server 104 providing information related to the vulnerability may provide the received vulnerability information. The open source developer or third party may identify information related to the vulnerability and create a patch file that corrects the vulnerability. For example, the open source developer or third party may use the external electronic device 102 to generate a patch file, and the external electronic device 102 may send the patch file to the server 108.
[0037] The electronic device 101 may receive a patch file corresponding to the identified vulnerability from the server 108. The electronic device 101 may identify information related to an open source vulnerability from a server 104 corresponding to the CVE system. The electronic device 101 may receive a patch file for correcting the open source vulnerability by accessing a server 108 or another electronic device that provides open source based on information related to the identified open source vulnerability. The electronic device 101 may periodically or non-periodically receive information related to various open source vulnerabilities from a server 104 corresponding to the CVE system. The electronic device 101 may automatically access the server 108 based on information received from the server 104 corresponding to the CVE system to download the relevant patch file, or may access the server 108 through the user's manipulation to download the relevant patch file. The electronic device 101 may not only access the server 108 to download the patch file, but may also access a server (not shown) corresponding to another source to download the patch file. That is, the electronic device 101 may collect various patch files corresponding to various open sources. The electronic device 101 may collect patch files through various web crawling schemes based on information related to the identified vulnerability. There is no restriction on crawlers that can crawl patch files. In various embodiments, the electronic device 101 gives crawling priority to collect patch files first but at the same time gives relatively weak security. The electronic device 101 can collect patch files without using information received from CVE. The electronic device 101 can collect patch files by performing web crawling using various information other than the information received from CVE as seeds.
[0038] In various embodiments, the electronic device 101 may filter patch files that meet specific conditions from the collected patch files. For example, the electronic device 101 may store more effective patch files by filtering patch files with specific extensions (or identification information) (e.g., ".md", ".bb", or nix) from the patch files. That is, the electronic device 101 may be configured to generate a comparison file only for the patch files obtained as a result of the filtering.
[0039] Despite Figure 1 In the embodiment of FIG. 1 , the server 108 is shown as storing open source and patch files, but this is merely exemplary, and the open source and patch files may be stored in different storage locations (or different repositories).
[0040] The electronic device 101 may generate a comparison file from the collected patch files. The electronic device 101 may compare the generated comparison file with the source code contained in the application. Based on the comparison result, the electronic device 101 may provide various information, such as information indicating whether the source code is a patched version, information indicating whether the source code needs to be patched, the probability that the source code has been patched, information indicating whether there are any strings to be corrected in the source code, and information related to the location of the strings to be corrected in the source code. The process of the electronic device 101 generating the comparison file and the comparison process will be described in more detail later. Once the electronic device 101 recognizes that a patch file needs to be applied based on the comparison result, the electronic device 101 may automatically correct at least one string in the source code.
[0041] Figure 2 is a block diagram illustrating an electronic device according to various embodiments.
[0042] According to various embodiments, the electronic device 101 may include a processor 120 , a memory 130 , an input device 150 , an output device 160 , and a communication circuit 190 .
[0043] The processor 120 can control at least one other component (e.g., hardware or software component) of the electronic device 101 coupled to the processor 120 by running software (e.g., a program) and perform various data or calculation processing. According to an embodiment, as at least part of data processing or calculation, the processor 120 can load commands or data received from another component (e.g., memory 130, input device 150, or communication circuit 190) into a volatile memory, process the commands or data stored in the volatile memory, and store the result data in a non-volatile memory. According to an embodiment, the processor 120 may include a main processor (e.g., a central processing unit (CPU) or an application processor) and an auxiliary processor (e.g., a graphics processing unit, an image signal processor, a sensor hub processor, or a communication processor) that operates independently or in conjunction with the main processor. Additionally or alternatively, the auxiliary processor may be configured to use lower power than the main processor or be dedicated to a specified function. The auxiliary processor may be implemented separately from the main processor or as part of the main processor.
[0044] The memory 130 may store various types of data used by at least one component of the electronic device 101 (e.g., the processor 120). The data may include, for example, input data or output data of software (e.g., a program) and commands associated with the software. The memory 130 may include a volatile memory or a non-volatile memory. According to various embodiments, the memory 130 may store at least one of a source code, a comparison file for verifying the source code, or a patch file. The memory 130 may store various instructions, such as instructions for loading, editing, and providing source code (program or application), instructions for comparing to verify source code, instructions for loading patch files, and instructions for generating comparison files from patch files.
[0045] The input device 150 may receive user input, convert the user input into an electrical signal, and send the electrical signal to the processor 120. The input device 150 may be implemented as, for example, a keyboard, a mouse, or an electronic pen. However, any device may be used as the input device 150 as long as it can receive external information from, for example, a microphone, a touch panel, and a camera. In addition, the input device 150 may be located outside the housing of the electronic device 101. Depending on the implementation, the electronic device 101 may not include the input device 150. The input device 150 may receive instructions for performing various operations of the electronic device 101.
[0046] The output device 160 may provide information to the outside of the electronic device 101 (e.g., to a user) visually, auditorily, or tactilely. The output device 160 may include, for example, a liquid crystal display (LCD) panel, a holographic device or a projector, and a control circuit for controlling the device. According to an embodiment, the output device 160 may include a touch circuit configured to sense a touch, or a sensor circuit configured to measure the strength of a force generated by a touch (e.g., a pressure sensor). The output device 160 may also be located outside the housing of the electronic device 101. Depending on the implementation, the electronic device 101 may not include the output device 160.
[0047] The communication circuit 190 may support the creation of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device, and support communication through the created communication channel. The communication circuit 190 may include one or more communication processors that operate independently of the processor 120 (e.g., an application processor) and support direct (e.g., wired) communication or wireless communication. According to an embodiment, the communication circuit 190 may include a wireless communication module (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (e.g., a local area network (LAN) communication module or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device through a first network (e.g., a short-range communication network, such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (e.g., a cellular network, the Internet, or a computer network (e.g., a long-range communication network, such as a LAN or a wireless LAN (WLAN))). The various communication modules may be integrated into one component (e.g., a single chip), or may be implemented as multiple separate components (e.g., multiple chips). The wireless communication module may identify and authenticate the communication device 101 in a communication network (e.g., the first network or the second network) using user information (e.g., an International Mobile Subscriber Identity (IMSI)) stored in a Subscriber Identity Module (SIM).
[0048] According to various embodiments, the memory 130 may store at least one source code and a comparison file including any one of a fix and a vulnerability, wherein each of at least one string included in a patch file corresponding to the at least one source code is classified as a fix or a vulnerability. The processor 120 may be functionally coupled to the memory 130 and the display device 160.
[0049] According to various embodiments, the processor 120 may be configured to load at least one source code stored in the memory 130, compare a string contained in the at least one source code with a string contained in a comparison file corresponding to the at least one source code, and provide at least one of information indicating that the source code has been patched, a probability that the source code has been patched, or information related to a vulnerability in the at least one source code to an output device.
[0050] According to various embodiments, as at least part of an operation of comparing a string included in at least one source code with a string included in a comparison file corresponding to the at least one source code, the processor 120 may be configured to identify a first matching ratio and a second matching ratio, wherein the first matching ratio is a ratio of the number of first strings included in the source code to the total number of first strings included in the vulnerabilities of the comparison file, and the second matching ratio is a ratio of the number of second strings included in the source code to the total number of second strings included in the revisions of the comparison file.
[0051] According to various embodiments, as at least part of an operation of comparing a string included in at least one source code with a string included in a comparison file corresponding to the at least one source code, the processor 120 may be configured to identify that the source code is not patched when identifying that a first matching rate is greater than a first threshold.
[0052] According to various embodiments, as at least part of an operation of providing at least one of information indicating whether the source code has been patched, a probability that the source code has been patched, or information about a vulnerability in at least one source code through the output device 160 based on the comparison result, the processor 120 may provide the first matching rate as a probability that the source code has not been patched.
[0053] According to various embodiments, as at least part of an operation of comparing a string included in at least one source code with a string included in a comparison file corresponding to the at least one source code, the processor 120 may be configured to identify that the source code has been patched when it is identified that the second matching rate is greater than a second threshold.
[0054] According to various embodiments, as at least part of an operation of providing at least one of information indicating whether the source code has been patched, a probability that the source code has been patched, or information related to a vulnerability in at least one source code through the output device 160 based on the comparison result, the processor 120 may be configured to provide a second matching rate as a probability that the source code has been patched.
[0055] According to various embodiments, as at least part of an operation of comparing a string included in at least one source code with a string included in a comparison file corresponding to the at least one source code, the processor 120 may be configured to identify at least one string from the strings included in the source code that is partially identical to at least one first string included in a vulnerability of the comparison file.
[0056] According to various embodiments, as at least part of an operation of providing at least one of information indicating whether the source code has been patched, a probability that the source code has been patched, or information indicating a vulnerability in a source code through the output device 160 based on the comparison result, the processor 120 may be configured to provide information about the location of the identified partial string.
[0057] According to various embodiments, as at least part of an operation of comparing a string included in at least one source code with a string included in a comparison file corresponding to the at least one source code, the processor 120 may be configured to identify, from the strings included in the comparison file corresponding to the at least one source code, at least one partial string that is at least partially identical to at least one first string included in a vulnerability of the comparison file.
[0058] According to various embodiments, as at least part of an operation of providing at least one of information indicating whether the source code has been patched, a probability that the source code has been patched, or information indicating a vulnerability in a source code through the output device 160 based on the comparison result, the processor 120 may be configured to display the source code in a manner that distinguishes the identified partial string from other strings.
[0059] According to various embodiments, the processor 120 may be further configured to verify file identification information related to the source code and identify a comparison file having file identification information matching the file identification information related to the source code.
[0060] According to various embodiments, the processor may be configured to receive a patch file corresponding to at least a portion of at least one source code through the communication circuit 190, verify file identification information that identifies the source code to which the patch file is applied, classify each of at least one string contained in the patch file as a fix or a vulnerability, generate a comparison file including at least one of the file identification information, fixes, or vulnerabilities to be compared with the source code, and store the comparison file in the memory 130.
[0061] According to various embodiments, as at least part of an operation of generating a comparison file including at least one of file identification information, fixes, or vulnerabilities to be compared with source code, the processor 120 may be configured to identify a common string that is the same string commonly included in the fix and the vulnerability, generate an adjusted fix by removing the common string from the string of the fix, generate an adjusted vulnerability by removing the common string from the string of the vulnerability, and generate a comparison file including at least one of the file identification information, the adjusted fix, or the adjusted vulnerability.
[0062] According to various embodiments, the processor 120 may be further configured to collect a plurality of patch files through the communication circuit 190 and generate a comparison file for patch files having information and extensions (at least one of which satisfies a predetermined condition).
[0063] According to various embodiments, as at least part of an operation of generating a comparison file including at least one of file identification information, a fix, or a vulnerability to be compared with a source code, the processor 120 may be configured to remove a first prefix indicating deletion from at least one string included in the vulnerability, remove a second prefix indicating the fix from at least one string included in the fix, and generate a comparison file including at least one of an adjusted vulnerability without the first prefix and an adjusted fix without the second prefix.
[0064] Figure 3 is a flowchart illustrating a method of operating an electronic device according to various embodiments. Figure 4 Describe in more detail Figure 3 Embodiment of the invention. Figure 4 is a diagram illustrating a process of generating a comparison file according to various embodiments.
[0065] According to various embodiments, the electronic device 101 may receive at least one patch file corresponding to at least one file in operation 301. As described previously, the electronic device 101 may automatically access the server 108 corresponding to the CVE to download the relevant patch file based on the information received from the server 104 or according to the user's manipulation. Alternatively, the electronic device 101 may download the patch file randomly. The electronic device 101 may access a server (not shown) and the server 108 corresponding to another source to download the patch file. For example, the electronic device 101 may collect the patch file through various web crawling schemes based on the information related to the identified vulnerability. The electronic device 101 may identify the vulnerability information corresponding to the stored source code and collect the patch file corresponding to the stored source code based on the identified vulnerability information. According to various embodiments, the electronic device 101 may also collect other patch files other than the patch file corresponding to the stored source code.
[0066] Reference Figure 4 For example, the electronic device 101 may receive patch files 401, 402, and 403. The first patch file 401 may include multiple character strings -A, +B, +C, -D, -A, +E, -F, and +A. For the convenience of description, although each of the multiple character strings -A, +B, +C, -D, -A, +E, -F, and +A is represented by a single English capital letter, the single English capital letter may represent a character string in the source code (for example, -for(rc=ldap_get_attribute_ber(li->ld,ent,ber,&bv,bvp);). The "-" contained in the patch file is a prefix that means deleting the character string following the "-" from the source code, and the "+" contained in the patch file is a prefix that means adding the character string following the "+" to the source code.
[0067] In the present disclosure, when it is said that the electronic device 101 performs a specific process, it may mean that the processor 120 included in the electronic device 101 performs the specific process or controls other hardware to perform the specific process. Alternatively, when it is said that the electronic device 101 performs a specific process, it may mean that specific hardware performs the specific process without the control of the processor 120. Alternatively, when it is said that the electronic device 101 performs a specific process, for example, it may mean that as at least one command stored in the memory 130 included in the electronic device 101 is executed, the processor 120 performs the specific process or controls other hardware to perform the specific process.
[0068] In operation 303, the electronic device 101 may classify vulnerabilities and fixes based on at least one patch file. The electronic device 101 may tokenize the first patch file 401. For example, the electronic device 101 may perform lexical analysis using a compiler or an assembler. As a result of the lexical analysis, the electronic device 101 may identify multiple strings -A, +B, +C, -D, -A, +E, -F, and +A from the first patch file 401, respectively. The present disclosure is not limited to any specific lexical analysis tool. The electronic device 101 may classify the identified strings -A, +B, +C, -D, -A, +E, -F, and +A into fixes 411 and vulnerabilities 412, respectively. For example, the electronic device 101 may classify strings with a prefix "+" (e.g., +B, +C, +E, and +A) into fixes 411, and strings with a prefix "-" (e.g., -A, -D, -A, and -F) into vulnerabilities 412.
[0069] In operation 305, the electronic device 101 may store a comparison file including at least one of file identification information, vulnerabilities, or corrections. The file identification information may be information identifying a file to be supplemented with a patch file, and may be information such as a file path of a patch file or a file name of a target to be patched. The file identification information may then be used to identify whether the corresponding source is a check target, which will be described in more detail later. According to various embodiments, the electronic device 101 may store file identification information associated with a vulnerability, a correction, or both. For example, the electronic device 101 may store a comparison file as described in Table 1.
[0070] [Table 1]
[0071]
[0072]
[0073] As shown in Table 1, the electronic device 101 can store fixes and vulnerabilities for file identification information. "Code #1", "Code #2" and "Code #3" in Table 1 can be identification information for identifying source code, files or software, and can be file paths or file names but are not limited to file paths or file names. The file identification information can be identified from the first patch file, the second patch file and the third patch file, respectively. As previously described, only fixes can be stored by mapping the fixes to the file identification information, or only vulnerabilities can be stored by mapping the vulnerabilities to the file identification information. In various embodiments, the electronic device 101 can store fixes without "+" from a string, and can store vulnerabilities without "-" from a string. For example, after classifying fixes and vulnerabilities, the electronic device 101 may remove prefixes (e.g., “+” and “-”) from the classified strings and store strings without “+” (e.g., for(rc=ldap_get_attribute_ber(li->ld,ent,ber,&bv,&bvals);) as fixes and strings without “-” (e.g., for(rc=ldap_get_attribute_ber(li->ld,ent,ber,&bv,bvp);) as vulnerabilities.
[0074] In various embodiments, the electronic device 101 may also manage the order of multiple strings contained in a vulnerability. For example, the electronic device 101 may store information indicating that in the revision of the source code of "Code #1", "+for(rc=ldap_get_attribute_ber(li->ld,ent,ber,&bv,&bvals);" is the first added character, "+(rc==LDAP_SUCCESS)&&bvals;" is the second added character, and "+rc=ldap_get_attribute_ber(li->ld,ent,ber,&bv,&bvals)){" is the third added character. The order of the strings in the patch file may be determined according to the arrangement order. For example, in the first patch file, the first added string "+for(rc=ldap_get_attribute_ber(li->ld,ent,ber,&bv,&bvals);" may be located in the previous line of the second added string "+(rc==LDAP_SUCCESS).)&&bvals;". The electronic device 101 may assign a higher priority to a string located in a higher row of the patch file. When the strings are managed in order, the electronic device 101 may compare the source code to be checked with the comparison file while taking into account the arrangement order of the strings in the source code to be checked during comparison, which will be described in more detail later.
[0075] In contrast, the electronic device 101 according to various embodiments may store character strings regardless of the sorting order of the character strings in the vulnerability or fix.
[0076] Figure 5 is a flowchart illustrating a method of operating an electronic device according to various embodiments. Figure 6 Describes in more detail Figure 5 Embodiment of the invention. Figure 6 is a diagram illustrating adjustment vulnerabilities and fixes according to various embodiments.
[0077] According to various embodiments, the electronic device 101 may receive at least one patch file corresponding to at least one file in operation 501. In operation 503, the electronic device 101 may classify vulnerabilities and fixes based on the at least one patch file. The process of receiving the patch file and the process of classifying the vulnerabilities and fixes have been described in detail above, and thus will not be described in detail here.
[0078] In operation 505, the electronic device 101 may identify whether there is a common item between the vulnerability and the fix. Figure 6 As shown, the electronic device 101 can identify the correction 411 and the vulnerability 412 according to the classification result of operation 503. The electronic device 101 can recognize that the string +A in the correction 411 and the string -A in the vulnerability 412 have the same content and only have different prefixes. In the case where the electronic device 101 stores the string after deleting the prefixes "+" and "-", the electronic device 101 can also recognize that the string A in the correction 411 is the same as the string A in the vulnerability 412.
[0079] When it is determined that there is no common item between the vulnerability and the fix, the electronic device 101 may store a comparison file including at least one of the file identification information, the vulnerability, or the fix in operation 507. For example, when there is no string having the same content and only a different prefix between the vulnerability and the fix, the electronic device 101 may store a comparison file including at least one of the identified fix or the vulnerability. Alternatively, in the case where the vulnerability and the fix do not have the same string, the electronic device 101 may store a comparison file including at least one of the identified fix or the vulnerability.
[0080] When it is determined that there are common items between the vulnerability and the fix, the electronic device 101 may delete the common items in operation 509. Figure 6As shown, when the string "+A" and the string "-A" have the same content and only the prefix is different, the electronic device 101 can generate an adjusted correction 421 by deleting the common string "+A" and generate an adjusted vulnerability 422 by deleting the common string "-A". Alternatively, when the prefix has been deleted, the electronic device 101 can generate an adjusted correction and an adjusted vulnerability by deleting the string A commonly included in the correction and the vulnerability. Figure 6 It is shown that only the first "-A" of two "-A"s existing in the vulnerability 412 is deleted, but this is an example and both "-A"s may be deleted. In operation 511, the electronic device 101 may store a comparison file including at least one of the vulnerability or the fix from which the common item has been deleted.
[0081] In various embodiments, the electronic device 101 may generate the comparison file by deleting common items between the vulnerability and the fix or by not deleting common items.
[0082] In various embodiments, when the length of the string included in the vulnerability and the fix satisfies a predetermined condition, the electronic device 101 may delete the string from at least one of the vulnerability or the fix. For example, when the length of the string is less than a threshold, the electronic device 101 may delete the string from at least one of the vulnerability or the fix. Alternatively, when a predetermined test (e.g., "return") is included in the string, the electronic device 101 may delete the string from at least one of the vulnerability or the fix.
[0083] Figure 7a is a flowchart illustrating a method of operating an electronic device according to various embodiments. Figure 8 Describe in more detail Figure 7a Embodiment of the invention. Figure 8 is a diagram illustrating a process of comparing a file with a source code according to various embodiments.
[0084] According to various embodiments, the electronic device 101 may load a target file to be checked, i.e., a target check file, in operation 701. For example, the electronic device 101 may load an application under development (or a completed application) as a target check file. The target check file may refer to an application (or program) or source code included in the application.
[0085] In operation 703, the electronic device tokenizes the target inspection file to identify multiple character strings. Figure 8As shown, the electronic device 101 may tokenize the target inspection file 801 to identify multiple strings A, B, D, A, F, and A. As described above, although the strings are shown as uppercase English letters A, B, D, A, F, and A for simplicity, each uppercase English letter may represent, for example, a string contained in the source code (e.g., for (rc = ldap_get_attribute_ber (li->ld, ent, ber, & bv, bvp);), as listed in Table 1.
[0086] In operation 705, the electronic device 101 may compare the identified character string with a comparison file. Figure 8 As shown, the electronic device 100 may compare the character string of the target inspection file 801 with at least one of the fixes 411 or the vulnerabilities 412 included in the comparison file. Figure 8 As shown, when the prefixes "+" and "-" are reflected in the fix 411 and the vulnerability 412, the electronic device 101 can remove the prefix from the string of at least one of the fix 411 or the vulnerability 412, and then identify whether the string of the target check file 801 is the same as the string. Figure 8 As shown, the electronic device 101 may obtain a first comparison result 811 indicating that the character strings "B" and "A" of the four character strings of the correction 411 in the comparison file are identical to the "B" and the second "A" in the target inspection file 801. Although the first character string of the target inspection file 801 is "A" and the fourth character string of the correction 411 is "+A", the electronic device 101 may determine that the first "A" of the target inspection file 801 does not match the fourth character string "+A" of the correction 411 by performing a comparison under the premise of considering the order of the character strings in the correction 411 and the order of the character strings in the target inspection file 801. For example, the electronic device 101 may identify a matching rate based on a result of calculating the longest common sequence (LCS) between the character strings of the correction 411 and the character strings of the target inspection file 801. The electronic device 101 may identify a first matching rate 821 as 50% based on the first comparison result 811 indicating that two of the four character strings of the correction 411 are identical to the character strings of the target inspection file 801.
[0087] The electronic device 101 may compare the string of the target inspection file 801 with the string of the vulnerability 412. The electronic device 101 may identify a second comparison result 812 indicating that the first "A", "D", the second "A", and "F" in the string of the target inspection file 801 are identical to the string in the vulnerability 412. In addition, the electronic device 101 may identify a second matching rate 822 of 100% based on the second comparison result 812, indicating that all four strings of the vulnerability 412 are identical to the string of the target inspection file 801.
[0088] In operation 707, the electronic device 101 may provide at least one of information indicating whether the target check file includes a vulnerability or information indicating whether the target check file includes a correction based on the comparison result. For example, the electronic device 101 may provide information indicating whether the check target includes corrections based on whether the first matching rate 821 exceeds a threshold, that is, information indicating whether the check target is a patched version. For example, the electronic device 101 may provide information indicating whether the check target includes any vulnerabilities based on whether the second matching rate 822 exceeds a threshold, that is, information indicating whether the target check file is a version before patching. The threshold value for comparison with the matching rate of corrections may be set to be equal to or different from the threshold value for comparison with the matching rate of vulnerabilities. Optionally, the threshold value may be set according to the number of strings contained in the corrections or vulnerabilities.
[0089] In various embodiments, the electronic device 101 may manage the strings of the fix 411 or the strings of the vulnerability 412 regardless of their order as described previously. The electronic device 101 may identify whether the string of the comparison file matches the string of the target check file 801 regardless of the arrangement order of the strings.
[0090] Figure 7b , Figure 7c and Figure 7d is a flow chart showing a method of operating an electronic device according to various embodiments. Figure 7a Describes Figure 7b , Figure 7c and Figure 7d Operations 701 to 705 are described in detail, and thus operations 701 to 705 are not described here. Figure 7b In the embodiment of FIG. 7 , the electronic device 101 may provide at least one of a ratio of vulnerabilities or a ratio of corrections in the target check file based on the comparison result at operation 709 . Figure 8 At least one of the first matching rate 821 or the second matching rate 822.
[0091] exist Figure 7cIn an embodiment of the present invention, the electronic device 101 may display at least one of the string corresponding to the vulnerability or the string corresponding to the fix in a manner distinguishable from other strings among the multiple strings of the target check file based on the comparison result in operation 711. For example, the electronic device 101 may distinguish various attributes (such as color, size, and ambient color) of the string corresponding to the fix or the vulnerability from various attributes of other strings in the entire source code.
[0092] exist Figure 7d In an embodiment of the present invention, the electronic device 101 may provide information related to the position of at least one of the string corresponding to the vulnerability or the string corresponding to the fix among the multiple strings of the target check file based on the comparison result in operation 713. For example, the electronic device 101 may provide position information such as the line number where the string corresponding to the fix or the vulnerability is located in the entire source code.
[0093] Fig. 9 is a flowchart illustrating a method of operating an electronic device according to various embodiments.
[0094] According to various embodiments, the electronic device 101 may load a target inspection file in operation 901. In operation 903, the electronic device 101 may compare identification information related to the target inspection file with identification information related to the comparison file to determine whether the target inspection file is an inspection target based on the comparison result. For example, the electronic device 101 may compare file identification information related to the comparison file shown in Table 1 with file identification information related to the target inspection file. When the target inspection file is identified as an inspection target based on the comparison result, the electronic device 101 may tokenize the target inspection file in operation 905 to identify multiple strings. In operation 907, the electronic device 101 may compare the identified multiple strings with the comparison file. In operation 909, the electronic device 101 may provide at least one of information indicating whether the target inspection file includes a vulnerability or information indicating whether the target inspection file includes a correction based on the comparison result.
[0095] Fig.10a , Fig.10b , Fig.10c and Fig.10d Patch files, comparison files, and target check files are shown according to various embodiments.
[0096] Reference Fig.10a, the electronic device 101 can collect patch files 1001 that correct vulnerabilities such as CVE-2016-7167. The electronic device 101 can parse the character strings contained in the patch files 1001 and classify the parsed character strings into vulnerabilities 1002 and corrections 1003. The electronic device 101 can compare the character strings of the vulnerability 1002 with the character strings of the target inspection file 1004, and recognize that all the character strings of the vulnerability 1002 are the same as at least a portion 1005 of the character strings of the target inspection file 1004. Thus, the electronic device 101 can recognize that the matching rate between the vulnerability 1002 and the target inspection file 1004 is 100%. The electronic device 101 can display the source code of the target inspection file 1004, for example, in a manner that distinguishes the character string 1005 that is the same as the character string of the vulnerability 1002 from other character strings. In addition, the electronic device 101 can compare the correction 1003 with the character string of the target inspection file 1004. The electronic device 101 may recognize that no character string of the target inspection file 1004 matches the character string of the revision 1003. Thus, the electronic device 101 may recognize that the matching rate between the revision 1003 and the target inspection file 1004 is 0%. The electronic device 101 may recognize that the matching rate between the vulnerability 1002 and the target inspection file 1004 is 100% and exceeds the threshold, and thus provides an analysis result indicating that the target inspection file 1004 needs to be patched or that the target inspection file 1004 is a version before the patch is applied. Alternatively, the electronic device 101 may provide a matching rate between the vulnerability 1002 and the target inspection file 1004 of 100%.
[0097] exist Fig.10b , Fig.10c and Fig.10d In the embodiment of the present invention, the electronic device 101 can collect patch files 1011, 1021, and 1031 to respectively correct the vulnerability of CVE-2017-3735, the vulnerability of CVE-2016-7167, and the vulnerability of CVE-2014-3569. The electronic device 101 can classify the vulnerability 1012, the vulnerability 1022, the vulnerability 1032, and the correction 1013, the correction 1023, and the correction 1033 from the collected patch files 1011, 1021, and 1031. Fig.10b , Fig.10c and Fig.10dIn each of the embodiments, the electronic device 101 can recognize that all the strings of the vulnerability 1012 are identical to a portion of the target check file 1014, recognize that all the strings of the vulnerability 1022 are identical to a portion of the target check file 1024, or recognize that all the strings of the vulnerability 1023 are identical to a portion of the target check file 1034. Therefore, it can be recognized that the matching rate between the vulnerability 1012 and the target check file 1014, the matching rate between the vulnerability 1024 and the target check file 1024, or the matching rate between the vulnerability 1034 and the target check file 1034 is 100%. The electronic device 101 may recognize that no string in the revision 1013 is identical to the string in the target check file 1014, no string in the revision 1023 is identical to the string in the target check file 1024, or no string in the revision 1033 is identical to the string in the target check file 1034, and thus recognize that the matching rate between the revision 1013 and the target check file 1014, the matching rate between the revision 1023 and the target check file 1024, or the matching rate between the revision 1033 and the target check file 1034 is 0%. The electronic device 101 according to various embodiments may display the string 1005, the string 1015, the string 1025, the string 1026, and the string 1035 corresponding to the vulnerable code, distinguished from other strings, such as Fig.10a , Fig.10b , Fig.10c and Fig.10d shown.
[0098] Fig.11a and Fig.11b 2 is a diagram illustrating exemplary screens provided by an electronic device according to various embodiments.
[0099] Reference Fig.11a, the electronic device 101 may display a first screen 1100 through, for example, the output device 160. The first screen 1110 may be intended to provide search results for program A. The first screen 1100 may include identification information 1101, identification information 1103, and identification information 1105 related to at least one source code included in program A. The electronic device 101 may compare a comparison file corresponding to a first source code (e.g., source a) with the first source code, and display an object 1102 indicating that the first source code has been patched based on the comparison result. The electronic device 101 may identify that the first comparison file is used for comparison with the first source code by comparing the file identification information related to the first comparison file with the file identification information related to the first source code. For example, the electronic device 101 may identify that the ratio of the correction of the first comparison file reflected in the first source code exceeds a threshold value, and thus identifies that the first source code has been patched. The electronic device 101 may display an object 1102 indicating that the first source code has been patched at a position corresponding to the identification information 1101 related to the first source code. The electronic device 101 can identify the second comparison file corresponding to the second source code (e.g., source b) by using the identification information related to the second source code and identify the third comparison file corresponding to the third source code (e.g., source c) by using the identification information related to the third source code. The electronic device 101 can compare the second comparison file with the second source code, and recognize that the second source code includes the string of the vulnerability included in the second comparison file based on the comparison result. The electronic device 101 can display the object 1104 that has not been patched for the second source code at a position corresponding to the identification information 1103 related to the second source code. The electronic device 101 can compare the third comparison file with the third source code, and recognize that the third source code includes the corrected string included in the third comparison file and does not include the string of the vulnerability included in the third comparison file based on the comparison result. The electronic device 101 can display the object 1106 that has been patched for the third source code at a position corresponding to the identification information 1105 related to the third source code. The developer of program A can recognize from the first screen 1100 that the source code of program A is a version before patching. The developer of program A may adapt the electronic device 101 to apply the patch file to the second source code, thereby preventing the release of program A if the source code has an unpatched vulnerability. According to various embodiments, the electronic device 101 may automatically apply the patch file to the second source code identified as unpatched.
[0100] Reference Fig.11b, the electronic device 101 may display a second screen 1110 providing search results of program A. The second screen 1110 may include identification information 1111, identification information 1113, and identification information 1115 related to at least one source code included in program A. The electronic device 101 may display an object 1112 indicating a probability of patching the source code at a position corresponding to the identification information 1111, an object 1114 indicating a probability of patching the source code at a position corresponding to the identification information 1113, and an object 1116 indicating a probability of patching the source code at a position corresponding to the identification information 1115. Each of the probabilities indicated by the objects 1112, 1114, and 1116 may be determined, for example, as a ratio of the number of strings commonly included in the revision and the source code to the total number of strings included in the revision of the comparison file of the source code.
[0101] The electronic device 101 may display an object 1121 indicating the probability that the source code is not patched at a position corresponding to the identification information 1111, an object 1122 indicating the probability that the source code is not patched at a position corresponding to the identification information 1113, and an object 1123 indicating the probability that the source code is not patched at a position corresponding to the identification information 1115. Each of the probabilities indicated by the objects 1121, 1122, and 1123 may be determined, for example, as a ratio of the number of strings commonly included in the vulnerability and the source code to the total number of strings included in the vulnerabilities of the comparison files of the source code.
[0102] The various embodiments set forth herein may be implemented as software (e.g., a program) including one or more instructions stored in a storage medium (e.g., an internal memory or an external memory) that can be read by a machine (e.g., a computer). The machine may call at least one of the one or more instructions stored in the storage medium and execute the at least one instruction. The machine may include an electronic device (e.g., electronic device 101) according to the disclosed embodiments. When the instructions are executed by a processor (e.g., processor 120), other components may be used under the control of the processor to execute functions corresponding to the instructions. The one or more instructions may include code generated by a compiler or code that can be executed by an interpreter. A machine-readable storage medium may be provided in the form of a non-transitory storage medium. Among them, the term "non-transitory" only means that the storage medium is a tangible device and does not include a signal, but the term does not distinguish between data being semi-permanently stored in a storage medium and data being temporarily stored in a storage medium.
[0103] According to an embodiment, the method according to various embodiments of the present disclosure may be included and provided in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be published in the form of a machine-readable storage medium (e.g., a compact disk read-only memory (CD-ROM)), or may be published online via an application store (e.g., Play StoreTM). If published online, at least part of the computer program product may be temporarily generated, or at least part of the computer program product may be at least temporarily stored in a machine-readable storage medium (such as a memory of a manufacturer's server, an application store's server, or a relay server).
[0104] According to various embodiments, each component (e.g., module or program) in the above-mentioned components may include a single entity or multiple entities. According to various embodiments, one or more components in the above-mentioned components may be omitted, or one or more other components may be added. Alternatively or additionally, multiple components (e.g., module or program) may be integrated into a single component. In this case, according to various embodiments, the integrated component may still perform the one or more functions of each component in the multiple components in the same or similar manner as a corresponding component in the multiple components before integration. According to various embodiments, the operations performed by a module, program or another component may be performed sequentially, in parallel, repeatedly or in a heuristic manner, or one or more operations in the operations may be run or omitted in different orders, or one or more other operations may be added.
Claims
1. An electronic device, include: Output device; Memory; as well as processor, The memory stores instructions which, when executed by the processor, cause the electronic device to: storing at least one source code and a comparison file in the memory, the comparison file including fixes and vulnerabilities, wherein each of at least one string contained in a patch file corresponding to the at least one source code is classified as the fix or the vulnerability, loading the at least one source code stored in the memory, comparing the modified at least one first string contained in the comparison file corresponding to the at least one source code with a second string contained in the at least one source code, and identifying a first matching rate based on comparing the at least one first string with the second string, comparing at least one third string of the vulnerability contained in the comparison file with the second string, and identifying a second match rate based on comparing the at least one third string with the second string, and At least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information related to a vulnerability in the at least one source code is provided through the output device based on at least one of the first matching rate or the second matching rate.
2. The electronic device according to claim 1, in, The first matching ratio is a ratio of the number of first strings included in the at least one source code to the total number of the at least one first string included in the revision of the comparison file, and the second matching ratio is a ratio of the number of third strings included in the at least one source code to the total number of the at least one third string included in the vulnerability of the comparison file.
3. The electronic device of claim 1, wherein the instruction causes the electronic device to: Based on identifying that the second matching ratio is greater than a first threshold, it is identified that the at least one source code is not patched.
4. The electronic device of claim 1, wherein the instruction causes the electronic device to: As at least a part of providing, by the output device, at least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information related to a vulnerability in the at least one source code based on at least one of the first matching ratio or the second matching ratio, the second matching ratio is provided as a probability that the at least one source code has not been patched.
5. The electronic device of claim 1, wherein the instruction causes the electronic device to: Based on identifying that the first matching ratio is greater than a second threshold, it is identified that the at least one source code has been patched.
6. The electronic device of claim 1, wherein the instruction causes the electronic device to: As at least a part of providing, by the output device, at least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information related to a vulnerability in the at least one source code based on at least one of the first matching ratio or the second matching ratio, the first matching ratio is provided as the probability that the at least one source code has been patched.
7. The electronic device as claimed in claim 1, The instructions cause the electronic device to: as at least part of comparing the at least one third string of the vulnerability with the second string, identifying at least one partial string from the at least one second string included in the at least one source code that is at least partially identical to the at least one third string included in the vulnerability of the comparison file, and The instructions cause the electronic device to: As at least a part of providing, by the output device, at least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information related to a vulnerability in the at least one source code based on at least one of the first matching rate or the second matching rate, information related to a location of the identified at least one partial string is provided.
8. The electronic device as claimed in claim 1, The instructions cause the electronic device to: as at least part of comparing the at least one third string of the vulnerability with the second string, identifying at least one partial string from the at least one second string included in the at least one source code that is at least partially identical to the at least one third string included in the vulnerability of the comparison file; and The instructions cause the electronic device to: The at least one source code is displayed in a manner that the identified at least one partial string can be distinguished from other strings as at least a part of providing, through the output device, at least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information related to a vulnerability in the at least one source code based on at least one of the first matching rate or the second matching rate.
9. The electronic device of claim 1, wherein the instruction causes the electronic device to: identifying file identification information of the at least one source code, and The comparison file having file identification information corresponding to the file identification information of the at least one source code is identified.
10. A method for operating an electronic device, the method include: storing at least one source code and a comparison file, the comparison file including fixes and vulnerabilities, wherein each of at least one string included in a patch file corresponding to the at least one source code is classified as the fix or the vulnerability; loading the at least one source code stored in a memory of the electronic device; comparing the modified at least one first string contained in the comparison file corresponding to the at least one source code with a second string contained in the at least one source code, and identifying a first matching rate based on comparing the at least one first string with the second string, comparing at least one third string of the vulnerability contained in the comparison file with the second string, and identifying a second match rate based on comparing the at least one third string with the second string, and At least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information related to a vulnerability in the at least one source code is provided through an output device of the electronic device based on at least one of the first matching rate or the second matching rate.
11. The method according to claim 10, in, The first matching ratio is a ratio of the number of first strings contained in the at least one source code to the total number of the at least one first string contained in the revision of the comparison file, and the second matching ratio is a ratio of the number of third strings contained in the at least one source code to the total number of the at least one third string contained in the vulnerability of the comparison file.
12. The method of claim 10, further comprising: include: Based on identifying that the second matching ratio is greater than a first threshold, it is identified that the at least one source code is not patched.
13. The method of claim 10 , wherein at least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information about a vulnerability in the at least one source code is provided based on at least one of the first matching rate or the second matching rate. include: The second matching rate is provided as a probability that the at least one source code is not patched.
14. The method of claim 10, wherein the at least one source code is identified as having been patched based on identifying that the first matching ratio is greater than a second threshold.
15. The method of claim 10, wherein at least one of information indicating whether the at least one source code has been patched, a probability that the at least one source code has been patched, or information about a vulnerability in the at least one source code is provided based on at least one of the first matching rate or the second matching rate. include: The first matching rate is provided as a probability that the at least one source code has been patched. 16 . A non-transitory computer-readable storage medium storing instructions which, when executed by a processor of an electronic device, cause the electronic device to perform the method of claim 10 .
