AI Source Code Training Corpus Vulnerability Scanning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

AI-generated source code may inherit vulnerabilities from the initial training corpus, leading to potential security issues in the generated code.

Innovation Solution

Scanning the initial corpus of source code using a test suite to identify potential vulnerabilities, mitigating these vulnerabilities to produce a training corpus, and then training the AI algorithm using this sanitized corpus to generate source code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If AI algorithm is trained using initial corpus of source code, then code generation capability is improved, but vulnerabilities may be inherited in generated code

Engineering Contradiction:
Improvecode generation capabilityVSAvoidsecurity of generated code
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by scanning the initial corpus of source code for vulnerabilities before using it to train the AI algorithm. A test suite is executed against the initial corpus to identify potential vulnerabilities, and these vulnerabilities are then mitigated by removing or correcting the problematic code segments. This preliminary cleaning of the training data ensures that the AI algorithm learns from secure code examples, thereby generating secure code without inheriting vulnerabilities from the training corpus.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If vulnerabilities are scanned and mitigated in initial corpus, then security of generated code is improved, but processing time and complexity increase

Engineering Contradiction:
Improvesecurity of generated codeVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The vulnerability scanning and mitigation process is performed as a preliminary action before training the AI algorithm. By executing the test suite against the initial corpus and removing vulnerabilities in advance, the patent ensures that the subsequent training process works with clean, secure data. This preliminary action, while adding processing time, prevents vulnerabilities from being learned and generated, thereby ensuring long-term security without requiring continuous scanning during code generation.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If test suite is executed against initial corpus to identify vulnerabilities, then vulnerability detection is improved, but computational resources and time consumption increase

Engineering Contradiction:
Improvevulnerability detection accuracyVSAvoidcomputational resources
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The test suite is executed as a preliminary action against the initial corpus to identify vulnerabilities before training begins. This preliminary scanning phase uses computational resources to thoroughly analyze the training data and remove any vulnerable code segments. By concentrating the computational effort in this initial phase rather than continuously during training and code generation, the patent achieves high vulnerability detection accuracy while managing computational resource consumption efficiently.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250190576A1Scanning of Training Code to Prevent Vulnerabilities in Artificial Intelligence (AI) Generated Source Code
Publication Date: 2025.06.12 MICRO FOCUS LLC
  • US20250190576A1 patent drawing
  • US20250190576A1 patent drawing
  • US20250190576A1 patent drawing

AI summary

An initial corpus of source code is received. The initial corpus of source code is for training an Artificial Intelligence (AI) algorithm that generates source code. The initial corpus of source code is scanned, using a test suite, to identify one or more potential vulnerabilities in the initial corpus of the source code. The identified one or more potential vulnerabilities in the initial corpus of the source code are mitigated to produce a training corpus of source code. For example, the mitigation may comprise removing malware from the initial corpus. The mitigation is to remove the vulnerabilities so that the vulnerabilities do not show up in source code generated by the AI algorithm. The AI algorithm is then trained using the training corpus of source code. The trained AI algorithm is executed to produce generated source code.