Static Code Analysis for Hidden Secret Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvesecret detection accuracyVSAvoiddetection coverage
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

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

Engineering Contradiction:
Improvedetection coverageVSAvoidfalse positive rate
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

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.

Inventive Principle:
Principle #23Feedback

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvesecret detection accuracyVSAvoidsystem maintenance complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

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.

Inventive Principle:
Principle #25Self-service

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.

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvesecret detection accuracyVSAvoidanalysis time
Core Design Contradiction:
Measurement precisionVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11550569B2Discovering and remediating hidden secrets in code files
Publication Date: 2023.01.10 CYBER ARK SOFTWARE LTD
  • US11550569B2 patent drawing
  • US11550569B2 patent drawing
  • US11550569B2 patent drawing

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.