Static Program Analysis for ORM Framework Security

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static program analysis tools struggle to generate a full propagation path for security vulnerabilities in source code that involves database operations, particularly when using structured query language (SQL), as they lack the capability for semantic analysis of SQL blocks, leading to incomplete execution flow emulation.

Innovation Solution

A static program analyzer is enhanced to emulate the full execution flow of a user-controlled object from a source to a sink via an object-relational mapping (ORM) framework, identifying ORM operations like WRITE and READ, and generating a propagation path that includes database operations, thereby increasing the accuracy of identifying security vulnerabilities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If static program analysis tools use conventional semantic analysis methods, then they can analyze standard programming languages, but they cannot perform semantic analysis of SQL blocks in database operations

Engineering Contradiction:
Improvecapability to analyze different programming languagesVSAvoidaccuracy of security vulnerability detection
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary component that translates SQL operations into equivalent ORM operation sequences. This intermediary enables the static program analysis tool to analyze SQL-based database operations by converting them into a format that the analysis engine can process, thereby extending language adaptability while maintaining analysis accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If static program analysis tools emulate execution flow without database operation support, then they can analyze simple code paths, but they cannot generate complete propagation paths for database-related security vulnerabilities

Engineering Contradiction:
Improvespeed of security analysisVSAvoidcompleteness of propagation path
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent performs preliminary action by pre-defining templates for common database operations and their corresponding ORM operation sequences. When analyzing code, the tool matches database operations against these pre-defined templates, allowing it to quickly generate complete propagation paths without having to manually trace complex database interaction sequences during the analysis process.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If static program analysis tools focus on comprehensive code coverage, then they can identify more potential vulnerabilities, but they increase false positives and analysis complexity

Engineering Contradiction:
Improveaccuracy of vulnerability identificationVSAvoidcomplexity of analysis system
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the security analysis process into distinct modules: code parsing, database operation identification, ORM operation mapping, and propagation path generation. Each module handles a specific aspect of the analysis, which reduces overall system complexity while maintaining comprehensive code coverage and accurate vulnerability identification through specialized processing in each segment.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10331894B2Static program analysis in an object-relational mapping framework
Publication Date: 2019.06.25 MICRO FOCUS LLC
  • US10331894B2 patent drawing
  • US10331894B2 patent drawing
  • US10331894B2 patent drawing

AI summary

Example implementations relate to static program analysis. For example, an apparatus includes a processor to perform static program analysis on a set of processor executable instructions associated with an object-relational mapping (ORM) framework. The first set of processor executable instructions includes an object. The processor is also to generate a propagation path of the object based on an execution flow of the object. The propagation path includes a first node and a second node. The first node corresponds to a first ORM operation to store the object in a database. The second node corresponds to a second ORM operation to retrieve the object from the database. The second node is linked to the first node based on a common attribute of the object. In response to a determination that the propagation path includes a sink, the processor is to output a security risk warning.