Skip to content

xmp00/Secure-AI-Ops-Middleware-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

96 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Markdown

Secure AI-Ops Middleware Framework

Build Status Python Security Standard License

πŸ“‹ Executive Summary

Secure AI-Ops Middleware is a specialized forensic and operational framework designed to enable the safe use of Large Language Models (LLMs) within critical infrastructure environments.

In high-security sectors (Banking, Government, IP Protection), direct data transmission to external AI services poses a severe risk of data exfiltration. This framework establishes a strict Sanitization & Pre-processing Perimeter, ensuring that sensitive telemetry is anonymized locally before any external analysis occurs.

Mission: To leverage AI-driven mean-time-to-resolution (MTTR) reduction while maintaining a Zero-Trust data privacy posture.


πŸ—οΈ Architectural Data Flow

The system implements a "Sanitization-First" architecture. No data leaves the secure zone without passing through the Redaction Engine.

+---------------------+       +---------------------------+       +-------------------------+
|  SECURE PERIMETER   |       |    MIDDLEWARE LAYER       |       |    EXTERNAL / AI ZONE   |
|                     |       |                           |       |                         |
|  [Raw Logs]         |       |  [ 1. Ingest Engine ]     |       |                         |
|  /var/log/auth.log  +------->  - Stream Processing      |       |                         |
|  /opt/opentext/logs |       |                           |       |                         |
|                     |       |  [ 2. Sanitizer Core ]    |       |                         |
|                     |       |  - PII Detection (Regex)  |       |                         |
|  [System Configs]   +------->  - IP/Host Redaction      +------->  [ Anonymized Vector ]  |
|  /etc/hosts         |       |  - Tokenization           |       |  (Safe for Analysis)    |
|                     |       |                           |       |            |            |
|                     |       |  [ 3. Context Enricher ]  |       |            v            |
|                     |       |  - Metadata Tagging       |       |     [ LLM / GPT-4 ]     |
|                     |       |                           |       |            |            |
+---------------------+       +---------------------------+       +------------+------------+
                                                                               |
                                    <--- Insight / RCA Recommendation ---------+
πŸ›‘οΈ Core Modules
1. Data Privacy Engine (log_sanitizer.py)
Acts as the primary firewall for information leakage.

Zero PII: Automatically detects and masks Email addresses, User IDs, and Phone numbers.

Infrastructure Obfuscation: Replaces IPv4/IPv6 addresses and internal hostnames with generic tokens (e.g., [ASSET_01], [IP_REDACTED]).

Custom Dictionaries: Supports project-specific "Stop Words" to protect trade secrets (e.g., Project Codenames).

2. Infrastructure Forensics (JumpHost_Session_Forensics.py)
Provides behavioral analytics for jump servers and critical nodes.

Session Correlation: Maps SSH logins to disk I/O usage.

Anomaly Detection: Flags user sessions that exceed standard duration baselines.

Dormant Account Sweep: Identifies provisioned but inactive accounts that increase the attack surface.

3. OpenText Operational Intelligence (OT_License_Census.py)
specialized parsers for OpenText Content Server environments.

License Optimization: Differentiates between Named and Concurrent usage peaks.

Audit Summarization: Aggregates massive audit trails into actionable user behavior metrics.

πŸš€ Quick Start
Prerequisites
Python 3.8+

Standard libraries only (No external heavy dependencies required for core security modules).

Installation
Bash

git clone [https://github.com/your-repo/secure-ai-ops.git](https://github.com/your-repo/secure-ai-ops.git)
cd secure-ai-ops
Usage Example: Sanitizing a Crash Dump
To prepare a raw application log for AI-assisted root cause analysis:

Bash

# Run the sanitizer on a target log file
python log_sanitizer.py --input /var/log/app/crash.log --output ./clean_context.txt

# Output:
# [SUCCESS] Processed 15,000 lines.
# [SECURE] Redacted 42 IP addresses and 12 User IDs.
# [READY] Output saved to ./clean_context.txt
πŸ”’ Compliance & Standards
This toolkit is engineered to support alignment with the following frameworks:

GDPR (Art. 5): Adheres to data minimization principles.

ISO/IEC 27001: Supports controls for information masking and operational logging.

NIST SP 800-53: Assists in Audit and Accountability (AU) controls.

🀝 Roadmap
[ ] Vector DB Integration: Local embedding storage for RAG (Retrieval-Augmented Generation).

[ ] Real-time Stream: Piping tail -f directly through the sanitizer.

[ ] EVTX Parser: Native Windows Event Log support.

About

My script base

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages