AI安全运维平台

AISO 是一个基于MCP的平台,使用Terraform提供、扫描和自动修复云基础设施,内置DevSecOps安全功能。

  • by cypher-1802
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 cypher-1802/AISO

使用说明

AISO-人工智能安全运营

一个基于MCP的平台,使用具有内置DevSecOps安全性的Terraform提供、扫描和自动修复云基础设施。

概述

AISO是一个综合性的基础设施安全自动化平台,它结合了:

  • 基础设施即代码:基于Terraform的配置,带有安全模块
  • 策略强制:具有自动合规性的IAM和网络策略
  • 安全扫描:地形代码扫描和漂移检测
  • 自动修复:针对违规行为的智能自动修复
  • 零信任架构:具有受限网络访问的Bastion主机模式

特性

核心能力

  • 🏗️ 安全基础架构模块:用于EC2、VPC、IAM和零信任架构的预构建、加固的Terraform模块
  • 🔒 策略引擎:在创建基础设施期间自动执行安全策略
  • 🔍 地形扫描仪:检测全球开放访问和缺少加密等安全问题
  • 📊 漂移检测:使用Config监控AWS合规性并识别配置偏差
  • 🛠️ 自动修复:自动修复安全违规和合规问题
  • 🚀 一键部署:基于FastAPI的API,用于无缝基础设施部署

项目结构

aiso/
├── mcp_server/              # MCP Server & Command Router
│   ├── main.py             # FastAPI application
│   ├── intent_parser.py    # Natural language intent parsing
│   └── command_router.py   # Command routing & orchestration
├── security/               # Security & Compliance Engine
│   ├── policy_engine.py    # Policy enforcement
│   ├── terraform_scanner.py # Code scanning
│   ├── drift_detector.py   # Drift detection & IAM monitoring
│   └── auto_remediator.py  # Auto-healing logic
├── terraform/              # Infrastructure as Code
│   ├── live/              # Production infrastructure
│   └── modules/           # Reusable secure modules
│       ├── vpc-secure/    # Hardened VPC with IGW & routing
│       ├── ec2-secure/    # IMDSv2 & encrypted instances
│       ├── iam-secure/    # Least privilege IAM roles
│       └── zero-trust/    # Bastion + private subnet pattern
├── policies/              # Security policies
│   ├── iam_policies.json
│   └── network_policies.yaml
└── requirements.txt       # Python dependencies

API终点

配置

  • 发布 /mcp -自然语言基础设施配置

    {"prompt": "create ec2 instance"}
    
  • 发布 /deploy -应用地形更改

    curl -X POST http://localhost:8000/deploy
    

安全与合规

  • 获取 /drift-check -检测并自动修正配置偏差
  • 获取 /iam-check -扫描风险IAM角色(管理策略)
  • 获取 /zero-trust-status -验证零信任架构状态

关键模块

VPC安全

为强化VPC提供以下配置:

  • 供公众访问的互联网网关
  • 具有受控交通模式的路线表

EC2安全

通过以下方式部署强化EC2实例:

  • IMDSv2实施(元数据保护)
  • EBS默认加密
  • 具有最低权限的IAM实例配置文件

IAM安全

通过以下方式创建安全角色:

  • EC2服务假设策略
  • CloudWatch仅记录权限
  • 可审计性和最低特权

零信任

实施零信任网络设计:

  • 工作负载专用子网
  • 跳转主机的Bastion子网
  • 受限制的安全组(仅限堡垒的SSH)

入门指南

先决条件

  • Python 3.8+
  • 地形1.0+
  • AWS CLI已配置凭据
  • 用于AWS API访问的boto3

安装

pip install -r requirements.txt

运行服务器

python -m uvicorn mcp_server.main:app --reload

部署基础设施

cd terraform/live
terraform init
terraform apply

安全功能

✅ 默认情况下加密EBS卷
✅ 在所有EC2实例上实施IMDSv2
✅ 最低权限IAM策略
✅ 零信任网络架构
✅ 自动合规性扫描
✅ 配置漂移检测
✅ 违规行为的自动补救

许可证

GNU通用公共许可证v3(GPLv3)-请参阅 许可证 详情