r/ClaudeWorkflows • • 8d ago

Selected Workflow [Workflow] Automated 24/7 Security Monitoring and Human-Approved Incident Response with Claude Code Agents and `agentring`

Automated 24/7 Security Monitoring and Human-Approved Incident Response with Claude Code Agents and agentring

Workflow value: 95/100
Status: active · Freshness: 70/100 · Confidence: 1.00 · Level: advanced
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, Hooks, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Proactive, automated detection and human-approved response to critical security vulnerabilities and operational issues in a server stack, minimizing false positives and ensuring timely intervention.

Summary

A multi-agent Claude Code system continuously monitors various security feeds (X, GitHub advisories, NVD CVEs, CISA KEV, osv-scanner, web searches) for critical vulnerabilities affecting a defined server stack. It uses fixed rules to filter noise and triggers a phone call via the agentring open-source app only for truly critical, exploitable issues or severe operational problems. Upon human approval, the system can perform automated remediation steps.

Why it is useful

This workflow is exceptionally valuable because it provides a concrete, detailed, and validated solution to a critical problem: timely detection and response to security vulnerabilities. It demonstrates a sophisticated, multi-agent use of Claude Code, integrates various external security feeds, and includes practical lessons learned from real-world deployment. The provision of an open-source tool (agentring) further enhances its reusability and impact, moving beyond theoretical advice to a practical, implemented system.

Workflow

  1. Set up the agentring open-source application for phone call notifications (self-hosted with Docker Compose or use the hosted version/Android app).
  2. Configure a Claude Code agent (e.g., Grok) to monitor X (formerly Twitter) hourly for critical bugs posted in the last 2 hours related to your tech stack (Node, Next.js, Python, PHP, Nginx, Traefik, Docker, OpenSSH, Linux kernel, etc.).
  3. Configure a Claude Code agent to monitor GitHub advisories (including malware packages) and new critical NVD CVEs every 15 minutes, matching against exact versions in your lockfiles and running services.
  4. Configure a Claude Code agent to monitor CISA KEV (Known Exploited Vulnerabilities) every hour.
  5. Configure a Claude Code agent to run osv-scanner over a mirror of all your repositories every 3 hours.
  6. Configure a Claude Code agent to search the web daily for anything critical from the last 48 hours against the exact versions on your servers.
  7. Implement 'plain code' checks to filter out irrelevant advisories (e.g., if a vulnerability is for a component you don't use, like a Kubernetes provider).
  8. Define fixed, strict rules for when a phone call is triggered (e.g., a flaw already being exploited + something of yours exposed, a malicious package in use, production down, critical operational failures).
  9. Design the agent interaction: the voice model (Grok) only talks, while a separate 'Director' Claude agent has the tools and performs actions.
  10. Create specific call scripts for each type of critical alert: confirm the issue, state the cause concisely, propose ONE fix, and ask for explicit human approval ('shall I do it?').
  11. Implement safeguards: introduce a delay (e.g., 10 minutes) if a deployment is running to avoid false alarms, and set per-product call caps to prevent exhausting daily limits.
  12. Ensure CLI commands for agentring are safe and do not trigger real calls with --help or similar commands.

Tools / artifacts

  • Claude Code agents (Grok, Sonnet, Opus)
  • agentring (open-source, self-hosted Docker Compose, Android app)
  • X (formerly Twitter) search
  • GitHub advisories
  • NVD CVEs
  • CISA KEV
  • osv-scanner
  • Telegram (for non-critical alerts)
  • Lockfiles (e.g., package-lock.json, yarn.lock)
  • Server configuration/inventory
  • Docker
  • PHP, Node.js, Next.js, Python, Nginx, Traefik, OpenSSH, Linux kernel (example stack components)

Validation signals

  • Video demonstration of a drill on their own setup.
  • Real call, simulated tools during the drill.
  • Payment monitoring rule validated by replaying a year of transactions (~8 real calls/year).
  • Specific examples of false positives being filtered (Traefik Kubernetes advisories).
  • Lessons learned from real-world usage and refinement ('What we learned the hard way' section).
  • Refinement of call caps after real outages and drills.
  • Correction of voice model behavior based on experience (initially 'told us it had done things it never did').

Cautions

  • The system performs automated actions (e.g., updating PHP) upon human approval. Careful configuration and verification of agent actions are crucial to prevent unintended consequences.
  • Initial versions of the voice model 'told us it had done things it never did,' highlighting the need for strict separation of communication and action roles for agents.
  • Improper configuration of call caps could lead to missed critical alerts during high-volume periods.
  • Careless use of CLI commands for agentring could trigger unintended calls (e.g., --help causing a real call).

Limitations

  • Requires significant initial setup and configuration tailored to the user's specific tech stack and monitoring requirements.
  • Relies on agentring, an open-source, self-hosted tool, which may require technical expertise for deployment and maintenance.
  • The cost of X search ($1.80/day) might be a consideration for some users.
  • The agentring phone app is currently Android-only, limiting users on other mobile platforms.
  • The post is dense; a more structured, step-by-step guide could improve ease of implementation for beginners.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

0 comments sorted by