$npx -y skills add sickn33/agentic-awesome-skills --skill aegisops-aiAutonomous DevSecOps & FinOps Guardrails. Orchestrates Gemini 3 Flash to audit Linux Kernel patches, Terraform cost drifts, and K8s compliance.
| 1 | # /aegisops-ai — Autonomous Governance Orchestrator |
| 2 | |
| 3 | AegisOps-AI is a professional-grade "Living Pipeline" |
| 4 | that integrates advanced AI reasoning directly into |
| 5 | the SDLC. It acts as an intelligent gatekeeper for |
| 6 | systems-level security, cloud infrastructure costs, |
| 7 | and Kubernetes compliance. |
| 8 | |
| 9 | ## Goal |
| 10 | |
| 11 | To automate high-stakes security and financial audits by: |
| 12 | 1. Identifying logic-based vulnerabilities (UAF, Stale |
| 13 | State) in Linux Kernel patches. |
| 14 | 2. Detecting massive "Silent Disaster" cost drifts in |
| 15 | Terraform plans. |
| 16 | 3. Translating natural language security intent into |
| 17 | hardened K8s manifests. |
| 18 | |
| 19 | ## When to Use |
| 20 | - **Kernel Patch Review:** Auditing raw C-based Git diffs for memory safety. |
| 21 | - **Pre-Apply IaC Audit:** Analyzing `terraform plan` outputs to prevent bill spikes. |
| 22 | - **Cluster Hardening:** Generating "Least Privilege" securityContexts for deployments. |
| 23 | - **CI/CD Quality Gating:** Blocking non-compliant merges via GitHub Actions. |
| 24 | |
| 25 | ## When Not to Use |
| 26 | |
| 27 | - **Web App Logic:** Do not use for standard web vulnerabilities (XSS, SQLi); use dedicated SAST scanners. |
| 28 | - **Non-C Memory Analysis:** The patch analyzer is optimized for C-logic; avoid using it for high-level languages like Python or JS. |
| 29 | - **Direct Resource Mutation:** This is an *auditor*, not a deployment tool. It does not execute `terraform apply` or `kubectl apply`. |
| 30 | - **Post-Mortem Analysis:** For analyzing *why* a previous AI session failed, use `/analyze-project` instead. |
| 31 | |
| 32 | --- |
| 33 | ## 🤖 Generative AI Integration |
| 34 | |
| 35 | AegisOps-AI leverages the **Google GenAI SDK** to implement a "Reasoning Path" for autonomous security and financial audits: |
| 36 | |
| 37 | * **Neural Patch Analysis:** Performs semantic code reviews of Linux Kernel patches, moving beyond simple pattern matching to understand complex memory state logic. |
| 38 | * **Intelligent Cost Synthesis:** Processes raw Terraform plan diffs through a financial reasoning model to detect high-risk resource escalations and "silent" fiscal drifts. |
| 39 | * **Natural Language Policy Mapping:** Translates human security intent into syntactically correct, hardened Kubernetes `securityContext` configurations. |
| 40 | |
| 41 | ## 🧭 Core Modules |
| 42 | |
| 43 | ### 1. 🐧 Kernel Patch Reviewer (`patch_analyzer.py`) |
| 44 | |
| 45 | * **Problem:** Manual review of Linux Kernel memory safety is time-consuming and prone to human error. |
| 46 | * **Solution:** Gemini 3 performs a "Deep Reasoning" audit on raw Git diffs to detect critical memory corruption vulnerabilities (UAF, Stale State) in seconds. |
| 47 | * **Key Output:** `analysis_results.json` |
| 48 | |
| 49 | ### 2. 💰 FinOps & Cloud Auditor (`cost_auditor.py`) |
| 50 | |
| 51 | * **Problem:** Infrastructure-as-Code (IaC) changes can lead to accidental "Silent Disasters" and massive cloud bill spikes. |
| 52 | * **Solution:** Analyzes `terraform plan` output to identify cost anomalies—such as accidental upgrades from `t3.micro` to high-performance GPU instances. |
| 53 | * **Key Output:** `infrastructure_audit_report.json` |
| 54 | |
| 55 | ### 3. ☸️ K8s Policy Hardener (`k8s_policy_generator.py`) |
| 56 | |
| 57 | * **Problem:** Implementing "Least Privilege" security contexts in Kubernetes is complex and often neglected. |
| 58 | * **Solution:** Translates natural language security requirements into production-ready, hardened YAML manifests (Read-only root FS, Non-root enforcement, etc.). |
| 59 | * **Key Output:** `hardened_deployment.yaml` |
| 60 | |
| 61 | ## 🛠️ Setup & Environment |
| 62 | |
| 63 | ### 1. Clone the Repository |
| 64 | |
| 65 | ```bash |
| 66 | git clone https://github.com/Champbreed/AegisOps-AI.git |
| 67 | cd AegisOps-AI |
| 68 | ``` |
| 69 | ## 2. Setup |
| 70 | |
| 71 | ```bash |
| 72 | python3 -m venv venv |
| 73 | source venv/bin/activate |
| 74 | pip install google-genai python-dotenv |
| 75 | ``` |
| 76 | ### 3. API Configuration |
| 77 | |
| 78 | Create a `.env` file in the root directory to securely |
| 79 | store your credentials: |
| 80 | |
| 81 | ```bash |
| 82 | printf 'GEMINI_API_KEY=%s\n' "$GEMINI_API_KEY" > .env |
| 83 | ``` |
| 84 | ## 🏁 Operational Dashboard |
| 85 | |
| 86 | To execute the full suite of agents in sequence and generate all security reports: |
| 87 | |
| 88 | ```bash |
| 89 | python3 main.py |
| 90 | ``` |
| 91 | ### Pattern: Over-Privileged Container |
| 92 | |
| 93 | * **Indicators:** `allowPrivilegeEscalation: true` or root user execution. |
| 94 | * **Investigation:** Pass security intent (e.g., "non-root only") to the K8s Hardener module. |
| 95 | |
| 96 | --- |
| 97 | |
| 98 | ## 💡 Best Practices |
| 99 | |
| 100 | * **Context is King:** Provide at least 5 lines of context around Git diffs for more accurate neural reasoning. |
| 101 | * **Continuous Gating:** Run the FinOps auditor before every infrastructure change, not after. |
| 102 | * **Manual Sign-off:** Use AI findings as a high-fidelity signal, but maintain human-in-the-loop for kernel-level merges. |
| 103 | |
| 104 | --- |
| 105 | |
| 106 | ## 🔒 Security & Safety Notes |
| 107 | |
| 108 | * **Key Management:** Use CI/CD secrets for `GEMINI_API_KEY` in production. |
| 109 | * **Least Privilege:** Test "Hardened" manifests in staging first to ensure no functional regressions. |
| 110 | |
| 111 | ## Links |
| 112 | |
| 113 | + - **Repository**: https://github.com/Champbreed/AegisOps-AI |
| 114 | + - **Documentation**: https://github.com/Champbreed/AegisOps-AI#rea |