Static Code Analysis for Hidden Secret Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing techniques for detecting hidden secrets in source code are inefficient, often resulting in false positives and requiring dynamic analysis, while they fail to effectively identify secrets outside of predefined databases or detect hidden secrets in external files.
Innovation Solution
A method that performs static analysis of source code to generate a control flow representation, identifying functions and their sequences, and determines the probability of hidden secrets, with the option to automatically remediate through integration with secret management software.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If regular expressions are used to perform lexical searches against a database of search terms, then detection of known secrets is improved, but detection of secrets outside the database is lost and false positives increase
Solution Approach 1:
The patent segments the code analysis into multiple layers: lexical analysis using regular expressions for known patterns, control flow analysis for structural understanding, and data flow analysis for tracking secret usage. This multi-layered segmentation allows each technique to operate on its own strengths while collectively providing comprehensive detection coverage.
Solution Approach 2:
The patent transitions from single-dimensional lexical search to multi-dimensional analysis by adding control flow dimension (function calls, loops, conditionals) and data flow dimension (variable assignments, secret propagation). This dimensional expansion enables detection of secrets that evade traditional pattern-matching approaches.
2Adaptability or versatility
If entropy checks are used to detect unstructured secrets by measuring entropy level, then detection of unknown secrets is improved, but false positive detections increase significantly
Solution Approach 1:
The patent implements feedback mechanisms where entropy check results are fed into the control flow and data flow analysis stages. High-entropy regions trigger more intensive analysis, and results from subsequent analysis stages feed back to adjust entropy thresholds and priorities. This feedback loop refines false positive filtering while maintaining broad detection coverage.
Solution Approach 2:
The patent performs preliminary control flow and data flow analysis before applying entropy checks to narrow down suspicious regions. By pre-identifying areas with secret-like characteristics through structural analysis, the entropy checks are applied more selectively, reducing the search space and minimizing false positives while maintaining detection effectiveness.
3Measurement precision
If trained machine learning algorithms are used to improve detection accuracy and minimize false positives, then detection precision is improved, but periodic user training and correction are required
Solution Approach 1:
The patent implements self-service mechanisms where the system automatically learns from new secret patterns discovered during analysis and updates its detection models without requiring external retraining. The control flow and data flow analysis results automatically feed into refining the detection algorithms, enabling the system to adapt and improve autonomously over time.
Solution Approach 2:
The patent performs preliminary static analysis of control flow and data flow to extract features that train the machine learning models in advance. By pre-computing structural characteristics from the codebase, the system prepares training data that enables the ML algorithms to achieve high accuracy without requiring extensive periodic retraining, reducing maintenance complexity.
4Measurement precision
If dynamic analysis of code is performed to accurately detect secrets, then detection accuracy is improved, but analysis time and computational resources increase
Solution Approach 1:
The patent performs preliminary static analysis of control flow and data flow to identify suspicious regions and patterns before executing the code for dynamic analysis. By pre-filtering and prioritizing target areas based on structural characteristics, the subsequent dynamic analysis focuses only on high-risk regions, significantly reducing overall analysis time while maintaining high detection accuracy.
Solution Approach 2:
The patent segments the codebase into functional units and analyzes control flow between them, allowing parallel processing of independent code paths. This segmentation enables the system to perform comprehensive analysis more efficiently by distributing the workload and avoiding redundant dynamic execution of already-analyzed sections, reducing total analysis time while maintaining accuracy.
Data Source
AI summary
Disclosed embodiments relate to systems and methods for discovering and remediating hidden secrets in code files. Techniques include accessing an element of source code for analysis, performing a static analysis of the element of source code, and generating a control flow representation that identifies a plurality of functions and a sequence of functions associated with the element of the source code. The techniques may further include determining a probability of a hidden secret being included in the element of source code and performing a security action of at least one of: generating an alert, displaying a visual indication of the probability, generating a report associated with the hidden secret, sending data associated with the probability to a machine learning system for training the machine learning system, or a remediating action associated with the hidden secret.


