Active

TMM Created

RHEL CVE Remediation

AI triage with Lightspeed MCP


Description

When a CVE alert arrives, an AI triage agent queries Red Hat Lightspeed for errata availability and reads the host environment from AAP inventory. Dev hosts with a fix available auto-patch through Gitea and AAP. Production hosts pause for human approval with a full audit trail. When no remediation exists, a second agent investigates CVSS, Advisor recommendations, and installed packages, then posts a structured report to Mattermost.

Why it matters

  • Lightspeed MCP supplies live vulnerability and remediation data, so routing is based on errata availability and host environment, not guesswork.
  • Production patches require explicit approval; dev patches run unattended. Governance matches how enterprises actually operate.
  • The investigate path gives SREs actionable context when Red Hat has not yet shipped a fix, instead of a dead-end alert.

AO building blocks

Automation orchestrator step types this workflow uses on the canvas. See all building blocks

Interactive Experience

Workflow

flowchart LR
  A@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/manual-trigger.png", label: "CVE Alert", pos: "b", h: 96, constraint: "on" } --> B@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/task-agent.png", label: "AI Triage Agent", pos: "b", h: 96, constraint: "on" }
  B --> C@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/switch-node.png", label: "Route Decision", pos: "b", h: 96, constraint: "on" }
  C -->|Auto-Patch Dev| D1@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Fetch & Commit to Gitea", pos: "b", h: 96, constraint: "on" }
  D1 --> D2@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Sync & Deploy via AAP", pos: "b", h: 96, constraint: "on" }
  D2 --> D3@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Run CVE Remediation", pos: "b", h: 96, constraint: "on" }
  C -->|Approval Prod| E0@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/approval-node.png", label: "Approve Production Patch", pos: "b", h: 96, constraint: "on" }
  E0 -->|Approved| E1@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Fetch & Commit to Gitea", pos: "b", h: 96, constraint: "on" }
  E1 --> E2@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Sync & Deploy via AAP", pos: "b", h: 96, constraint: "on" }
  E2 --> E3@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Run CVE Remediation", pos: "b", h: 96, constraint: "on" }
  C -->|Investigate| F1@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/task-agent.png", label: "No Known Remediation", pos: "b", h: 96, constraint: "on" }
  F1 --> F2@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/script-node.png", label: "Parse Investigation Result", pos: "b", h: 96, constraint: "on" }
  F2 --> F3@{ img: "https://ansible-tmm.github.io/aap-orchestrator-demos/assets/icons/launch-aap-job-template.png", label: "Notify Mattermost", pos: "b", h: 96, constraint: "on" }
  classDef noBorder fill:transparent,stroke:transparent
  class A,B,C,D1,D2,D3,E0,E1,E2,E3,F1,F2,F3 noBorder

Switch routing

Route Condition Action
auto_patch Dev host + errata available Fetch playbook from Lightspeed, commit to Gitea, sync AAP, run patch
approved_patch Production host + errata available Human approval, then same fetch-sync-run pipeline
investigate No errata or host not affected AI investigation → structured Mattermost report for SRE review

Playbooks

Playbook What it does Runs on
cve_fetch_and_commit.yml Downloads the Lightspeed-generated remediation playbook and commits it to Gitea for AAP project sync. localhost (Lightspeed MCP + Gitea)
cve_sync_and_deploy.yml Syncs the AAP project from Gitea, creates a scoped job template for the CVE playbook, and launches it. localhost (AAP API)
notify_mattermost_cve.yml Posts a structured CVE investigation report to Mattermost when no errata is available. localhost (Mattermost API)

Demo video