Library / Code, Git & Developer Tools
Code, Git & Developer Tools
Review and remediate Kubernetes manifests in GitHub PRs with GPT-4.1
When something happens in a connected app, it automates developer work with OpenAI / ChatGPT using GitHub, Postgres, Slack.
What it does
## AI Kubernetes Security & Policy Agent — Manifest Analysis, Auto-Remediation & PR Review This is a manifest-review agent, not a fixed linter pipeline. A GitHub pull request touching Kubernetes YAML manifests triggers the flow. An LLM AGENT decides for itself which checks to run against the changed manifests — it can call a privileged-container scanner, an RBAC/permissions analyzer, an exposed-services detector, a resource-limits checker, and a policy/RAG tool over your org's Pod Security Standards / OPA-Gatekeeper policies — before writing a structured findings report. Wherever it finds an issue, the agent also generates a corrected, secure version of the manifest. Findings + secure manifests are logged for audit, posted back to the PR as a review comment, and a human must approve before the agent's suggested fix is committed to a remediation branch and opened as its own PR (or pushed as a suggested-change commit) — nothing is auto-merged. ### How it works 1. GitHub Trigger - PR Opened/Updated fires on pull_request events (opened, synchronize) for repos containing Kubernetes manifests 2. Set - Config extracts PR number, repo, branch, changed file paths, and a sessionId (PR number) for continuity across pushes 3. Get - PR Manifest Files pulls the actual changed YAML content from GitHub before handing it to the agent 4. AI Agent - K8s Security Reviewer (GPT-4.1 + session memory) is given five tools — Tool - Scan Privileged Containers, Tool - Scan RBAC Permissions, Tool - Scan Exposed Services, Tool - Scan Resource Limits, Tool - RAG Search Security Policies — and decides on its own which to call, possibly more than once across multiple manifests, before writing findings AND a generated secure manifest for each flagged file 5. Set - Parse Agent Output extracts the agent's structured JSON (findings per manifest/category, overallRisk, verdict, securedManifests) 6. Postgres - Log Security Review persists every review into a k8s_manifest_reviews table for audit history and trend tracking 7. GitHub - Post Review Comment always posts the full findings (plus a diff-style preview of proposed fixes) back to the PR, regardless of verdict 8. IF - Issues Found only continues toward remediation when the agent actually flagged something; clean manifests just get the passing comment and stop 9. Slack - Request Remediation Approval posts the proposed secure manifests to the
The steps
- GitHub Trigger - PR Opened/Updated
- Set - Config
- Get - PR Manifest Files
- Tool - Scan Privileged Containers
- Tool - Scan RBAC Permissions
- Tool - Scan Exposed Services
- Tool - Scan Resource Limits
- Tool - RAG Search Security Policies
- OpenAI Chat Model
- Window Buffer Memory
- AI Agent - K8s Security Reviewer
- Set - Parse Agent Output
- Postgres - Log Security Review
- GitHub - Post Review Comment
22 steps in total.
Similar automations
AI Agents & AssistantsTriage and remediate Kubernetes incidents using Claude and Slack21 stepsCode, Git & Developer ToolsDraft customer-facing changelogs from merged GitHub PRs with OpenAI and Gmail20 stepsAI Agents & AssistantsTriage and remediate DevOps alerts with Claude, ClickUp, GitHub and Slack24 stepsCode, Git & Developer ToolsReview Terraform pull requests with GitHub, GPT-4.1, Postgres and Slack20 steps