Sentiment Analysis for Automated Source Code Vulnerability Review
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Automated source code vulnerability review is an exhaustive process due to the large number of lines of code, and existing automated code scanning methods lack effectiveness in identifying vulnerabilities in real-time.
Innovation Solution
The implementation of automated source code vulnerability review using sentiment analysis with magnitude of entities, which involves clustering code snippets, calculating entity scores, and applying sentiment analysis to determine vulnerability and remediation actions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If automated code scanning is performed using traditional methods, then code review can be automated to some extent, but the effectiveness in identifying vulnerabilities in real-time is insufficient
Solution Approach 1:
The patent replaces traditional mechanical code analysis methods with sentiment analysis and natural language processing techniques. Code snippets are treated as text data, and sentiment analysis algorithms are applied to detect vulnerabilities, enabling more effective real-time identification without relying on conventional static or dynamic analysis mechanisms
Solution Approach 2:
The patent transforms code analysis by changing the parameter space from traditional security rule matching to sentiment score calculation. By converting code characteristics into sentiment-related parameters (positive/negative scores based on vulnerability patterns), the system achieves improved detection effectiveness and real-time performance
2Reliability
If sentiment analysis is applied to code scanning, then vulnerability detection effectiveness is improved, but the complexity of the scanning system increases
Solution Approach 1:
The patent makes the sentiment analysis engine multi-functional by using it for both vulnerability detection and code quality assessment. The same sentiment analysis infrastructure serves multiple purposes, reducing overall system complexity despite the advanced techniques employed
Solution Approach 2:
The patent introduces sentiment scores as an intermediary layer between raw code and vulnerability detection. This mediator transforms complex code structures into simplified sentiment parameters, making the detection process more manageable and reducing system complexity while maintaining high accuracy
3Measurement precision
If manual code review is performed, then comprehensive vulnerability assessment can be achieved, but the process is exhaustive and time-consuming
Solution Approach 1:
The patent enables code to be self-assessed through sentiment analysis. Instead of requiring manual reviewers to examine each line, the system automatically analyzes code snippets, calculates sentiment scores, and identifies vulnerabilities, achieving comprehensive assessment at high speed without exhaustive manual intervention
Data Source
AI summary
Aspects of the present disclosure provide systems, methods, and computer-readable storage media that support automated source code review using sentiment analysis with magnitude of entities. Known compliant and non-compliant source code may be used to generate dictionaries for evaluating lines of code using AI and ML techniques, such as by clustering data entities (lines of software code) and performing sentiment analysis on the data entities (lines of software code) which accounts for a magnitude of the data entities in the software code. The dictionaries enable automated review and correction of non-compliant code, such as vulnerable or insecure code, during the coding process. For example, sentiment analysis may be performed using the dictionaries on in-development code to determine a polarity and magnitude score for each line of code. The scores for each line can be compared to one or more conditions to determine a remediation action for individual lines of code.


