Functional Language Vulnerability Scanner Using AST and Function Lists

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing security-analysis techniques fail to adequately identify impure functions in functional programming languages that may change underlying proprietary data or contain input/output calls outside the business product environment, leaving data vulnerable to security risks.

Innovation Solution

A code scanning system that generates an abstract syntax tree from source code and uses a white list of permitted pure functions and a black list of prohibited impure functions to perform static analysis, classifying functions as pure or impure, thereby identifying and flagging potential data vulnerabilities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional static testing is used to analyze source code for security vulnerabilities, then security weaknesses in the application itself can be identified, but impure functions that change underlying proprietary data or contain I/O calls outside the business product environment cannot be adequately identified

Engineering Contradiction:
Improvesecurity vulnerability identificationVSAvoidimpure function detection accuracy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The analysis is divided into two distinct segments: traditional static testing for application-level security vulnerabilities, and pure function analysis for detecting impure functions that access external I/O or modify proprietary data. Each segment targets specific types of vulnerabilities with specialized analysis techniques, allowing both security aspects to be thoroughly addressed without compromising detection accuracy in either area.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Pure function analysis serves as an intermediary layer between traditional static testing and the actual source code execution. It first identifies and analyzes impure functions (those with I/O calls or data modifications) separately, then integrates this analysis with traditional security scanning to provide comprehensive vulnerability detection. This intermediary approach enables precise detection of impure functions while maintaining overall security analysis effectiveness.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If employees manually create calculation instructions via computer programs using functional programming languages, then proprietary data analysis can be performed, but the programs may contain impure functions that leave proprietary data vulnerable to security risks

Engineering Contradiction:
Improvedata analysis capabilityVSAvoiddata vulnerability
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The system performs preliminary analysis of source code before execution to identify impure functions that may compromise proprietary data security. By detecting functions with I/O calls or data modification capabilities in advance, the system can flag potential security risks before they are executed, allowing preventive measures to be taken while maintaining the productivity benefits of functional programming for data analysis tasks.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system provides feedback to employees about impure functions detected in their code, enabling them to revise and improve their programs. This feedback mechanism allows employees to continue using functional programming languages for productive data analysis while being informed of security vulnerabilities, creating a continuous improvement cycle that enhances both productivity and data security.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11144643B1Functional language source code vulnerability scanner
Publication Date: 2021.10.12 STATE FARM MUTAL AUTOMOBILE INSURANCE COMPANY
  • US11144643B1 patent drawing
  • US11144643B1 patent drawing
  • US11144643B1 patent drawing

AI summary

A code scanning system has a syntax generation component that receives source code and generates an abstract syntax tree file. The system includes a white list of permitted pure functions, and a black list of prohibited impure functions. In addition, the system includes a static code analyzer for performing static analysis of the source code. The static code analyzer includes a function analyzer that receives the AST file and identifies the functions. Each function is compared to the white list, and if it is present, marked as permitted in a static analysis file. If the function is not on the white list, it is compared to the black list. If it is present on the black list, it is marked as prohibited in the static analysis file. If the function is not on the white or black list, it is marked as “unknown” and subjected to manual analysis.