Machine Learning Source Code Secret Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional source code analysis techniques often result in false positives and are unable to adapt to changing code environments, requiring manual review and being inefficient in detecting secret information.
Innovation Solution
A method using machine learning to analyze source codes by retrieving files, parsing features, training models, and determining characteristics such as secret or non-secret, obsolete, and production/development, to automatically identify and manage risk weighting and severity levels, facilitating efficient detection of secret information.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional source code analysis techniques are used, then the detection process is simple and straightforward, but the accuracy of secret information detection is low and produces many false positives
Solution Approach 1:
The patent replaces conventional keyword-based detection methods with machine learning models that automatically learn patterns from training data. The system uses trained models to analyze source code and identify secret information, substituting manual rule-based approaches with adaptive computational intelligence that improves detection accuracy while reducing false positives.
Solution Approach 2:
The system changes the detection parameters by using multiple features (token counts, entropy values, structural properties) rather than fixed keywords. The machine learning models evaluate multiple parameters simultaneously and adaptively weight them based on learned patterns, enabling more accurate detection of secret information in diverse code environments.
2Adaptability or versatility
If predetermined keywords are used for flagging secret information, then the analysis process is fast and efficient, but the system cannot adapt to changing code environments
Solution Approach 1:
The system performs preliminary action by training machine learning models on extensive datasets before deployment. The models learn patterns of secret information across various code environments during the training phase, enabling them to adaptively detect secrets in new environments without requiring manual rule updates or extensive manual review.
Solution Approach 2:
The machine learning models enable the system to serve itself by automatically adapting to changing code environments. The models continuously learn from new data and improve their detection capabilities without human intervention, eliminating the need for manual rule updates and reducing dependency on expert knowledge for maintaining detection accuracy.
3Productivity
If manual review of positive detections is performed, then the accuracy of secret information identification is high, but the time investment and resource requirements are large
Solution Approach 1:
The patent replaces manual review processes with automated machine learning-based detection. The trained models directly identify secret information in source code with high accuracy, eliminating the need for manual review while maintaining detection quality. This substitution dramatically improves productivity by automating the entire detection workflow.
4Reliability
If conventional analysis techniques are used, then the implementation is simple and straightforward, but the false positive rate is high
Solution Approach 1:
The system uses composite detection approaches by combining multiple machine learning models and feature types (token-based features, entropy-based features, structural features). This composite approach integrates diverse detection strategies into a unified system that maintains high reliability while managing complexity through modular model architecture and coordinated feature evaluation.
Data Source
AI summary
A method for facilitating identification of secrets in source code by using machine learning is provided. The method includes retrieving a plurality of files from a repository, each of the plurality of files including a source code file; parsing the source code file to identify a training feature; associating a predetermined label with the training feature, the predetermined label corresponding to a secret label and a non-secret label; training a model by using the training feature and the corresponding predetermined label; receiving, via a graphical user interface, a test file, the test file including a set of source codes; parsing the set of source codes to identify a feature; and determining, by using the model, a first characteristic of the feature.


