Source Code Trustworthiness Assessment via Multi-Level Risk Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing rate of root-code execution security exploits in open-source libraries poses a significant risk due to the complexity of manual code review, high false positives in static source code analysis, and limitations of anti-virus scanners in text-based source code analysis, particularly in lacking contextual information and computational power for effective inter-procedural scans.

Innovation Solution

A computer-implemented method assesses the trustworthiness of source code by determining three levels of risk: based on storage context, change history, and nature of changes, combining these to generate a trust indication, which includes aggregating signals from storage type, change history, and contributor reputation, and using contextual data to provide a trustworthiness score for software developers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual code review is performed to mitigate security risks, then security reliability is improved, but review time and complexity increase significantly due to thousands of lines of code

Engineering Contradiction:
Improvesecurity reliabilityVSAvoidreview time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the code review process into multiple independent analysis components: static analysis, dynamic analysis, inter-procedural analysis, and contextual analysis. Each component handles specific aspects of security assessment, allowing parallel processing and reducing overall review time while maintaining comprehensive security checking

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary automated analysis system that acts as a mediator between the developer and the source code. This intermediary performs preliminary security assessments, filters out safe code patterns, and only presents suspicious sections requiring manual review, significantly reducing the time burden on developers

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If static source code analysis tools are used to mitigate security risks, then analysis coverage is improved, but false positive rate increases and slows down development

Engineering Contradiction:
Improveanalysis coverageVSAvoidfalse positive rate
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent implements feedback mechanisms where analysis results from multiple passes inform subsequent analysis configurations. False positives from initial static analysis are fed back to adjust analysis parameters and refine detection patterns, progressively improving precision while maintaining comprehensive coverage

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent employs dynamic analysis thresholds and adaptive detection rules that adjust based on code context, project history, and observed false positive patterns. This dynamic approach allows the system to maintain high sensitivity for security detection while adapting to reduce false alarms in specific contexts

Inventive Principle:
Principle #15Dynamics

3Reliability

If inter-procedural analysis is performed on moderately sized code bases to improve security assessment, then detection capability is improved, but computational power requirements increase significantly

Engineering Contradiction:
Improvedetection capabilityVSAvoidcomputational power
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent performs preliminary actions by conducting static analysis and generating call graphs before executing inter-procedural analysis. This preliminary preparation organizes code relationships in advance, allowing the inter-procedural analysis to focus only on relevant procedural connections rather than analyzing entire code bases, significantly reducing computational requirements

Inventive Principle:
Principle #10Preliminary action

4Reliability

If anti-virus scanners are used to detect known-bad patterns in source code, then protection against known threats is improved, but performance decreases and they are often disabled

Engineering Contradiction:
Improveprotection capabilityVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts and implements a lightweight pattern matching engine specifically optimized for source code analysis, separating it from heavy anti-virus scanning infrastructure. This extracted component provides essential protection against known bad patterns with minimal performance overhead, allowing it to run continuously without disabling other development tools

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12141290B2Source code trustworthiness assessment
Publication Date: 2024.11.12 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12141290B2 patent drawing
  • US12141290B2 patent drawing
  • US12141290B2 patent drawing

AI summary

A computer implemented method includes determining a first level of risk based on a context of source code as stored. A second level of risk is determined based on a change history of the source code. A third level of risk is determined by assessing a nature of changes to the source code. The first, second, and third levels of risk are combined to generate an indication of trust in the source code.