IaC Compliance Correction via Automated Scanning and Merging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for provisioning infrastructure in cloud computing environments often lead to unnecessary resource allocation and security risks due to reactive approaches in detecting and correcting compliance rule violations, which can result in infrastructure being non-compliant for a period before correction.

Innovation Solution

A system that proactively scans infrastructure as code (IaC) files in a code repository for compliance rule violations using natural language processing and machine learning, modifies the files to correct these violations, and merges the corrected files back into the repository, thereby preventing non-compliant infrastructure from being provisioned.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If reactive approaches are used to detect and correct compliance rule violations, then infrastructure can be provisioned quickly, but security risks increase and resources are wasted due to non-compliant infrastructure remaining in place

Engineering Contradiction:
Improveinfrastructure securityVSAvoidtime for compliance correction
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary scanning and correction of compliance violations in IaC files before infrastructure provisioning occurs. By detecting and correcting issues in advance during the code review stage, the system prevents non-compliant infrastructure from being deployed, thereby improving security without delaying actual provisioning operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces an intermediary compliance checking layer between code commit and infrastructure provisioning. This intermediary scan acts as a gatekeeper that automatically detects and corrects violations before they reach the provisioning stage, resolving the contradiction by adding a security checkpoint that doesn't block legitimate deployments.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If comprehensive compliance scanning is performed on all IaC files, then security and compliance are improved, but processing time and computational resources increase

Engineering Contradiction:
Improvecompliance assuranceVSAvoidfile processing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs compliance scanning as a preliminary action during the code review phase, using lightweight natural language processing to quickly identify obvious violations without requiring full infrastructure provisioning. This early detection approach ensures compliance checking occurs before resources are committed, maintaining both thoroughness and efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts scanning parameters based on file characteristics and risk profiles. By modifying the depth and intensity of scanning based on the specific IaC file type and content, the system maintains high compliance assurance while optimizing processing speed for different scenarios.

Inventive Principle:
Principle #35Parameter changes

3Manufacturing precision

If automatic correction of compliance violations is implemented, then compliance rate improves, but risk of introducing errors increases

Engineering Contradiction:
Improvecompliance adherenceVSAvoidcode correctness
Core Design Contradiction:
Manufacturing precisionVSReliability

Solution Approach 1:

The system implements partial automatic correction, applying automated fixes only for well-defined, low-risk compliance violations with clear correction patterns. For more complex or ambiguous violations, the system maintains manual review processes, thereby achieving high compliance adherence while minimizing the risk of introducing errors through automation.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system incorporates feedback mechanisms where corrected files undergo validation to ensure the corrections are appropriate and do not introduce new errors. This feedback loop allows the system to learn from correction outcomes and improve the safety of automatic corrections over time, balancing compliance precision with code reliability.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20240012909A1Correction of non-compliant files in a code repository
Publication Date: 2024.01.11 CAPITAL ONE SERVICES LLC
  • US20240012909A1 patent drawing
  • US20240012909A1 patent drawing
  • US20240012909A1 patent drawing

AI summary

In some implementations, a device may perform a scan of a content of one or more files in a code repository for violations of one or more compliance rules, where the one or more files indicate a configuration for infrastructure to be provisioned in a cloud computing environment. The device may identify that the content of the one or more files includes at least one violation of the one or more compliance rules. The device may modify the content of the one or more files to correct the at least one violation in accordance with the one or more compliance rules. The device may determine a probability as to whether a build of code of the code repository, using the one or more files with the content modified, is likely to pass. The device may transmit a request to merge the one or more files into the code repository.