How ruvnet/agentic-security works
Main Components
• User Interface Layer:
– Command Line Interface (CLI): Represented by the commands (scan, analyze, run, validate) shown in the README.
– Graphical User Interface (GUI): Located in the “gui” folder; note its cyberpunk aesthetic.
• Core Security Pipeline (Backend Engine):
– This is implemented within the "src/agentic_security" directory. Components include:
▪ Scanning and Security Modules (e.g., security_pipeline.py, security_cli.py, prompts.py).
▪ Fix & Remediation Logic (modules like fix_cycle.py, progress.py).
▪ Caching (cache.py).
• External Security & AI Integrations:
– Vulnerability Scanners (OWASP ZAP, Nuclei, Dependency-Check).
– AI Engines (GPT-4 and Claude-3 integrations for analysis, fix suggestions and test generation).
– GitHub Integration for auto branch creation and PR generation (see modules in gui: git_handler.py, github_handler.py).
– Notification Services (Slack, via provided API keys).
• Supporting Components and Artifacts:
– Docker and Docker Compose configurations (Dockerfile, docker-compose.yml) denote containerization.
– CI/CD pipelines (present under .github/workflows and scripts like run_pipeline.sh) to automate scanning and deployment.
– Testing Suite (tests folder, along with sample files) which portrays how the system is validated.
Relationships and Data Flow
• The Pipeline directs a scan that interfaces with external scanners (OWASP ZAP, Nuclei, dependency analysis tools).
• Results from scanning feed into AI modules for vulnerability assessment and remediation suggestions.
• The AI components analyze code, generate fixes and validate changes (iterative, recursive fix logic).
• A Git integration module then creates fix branches and triggers pull requests.
• Notification flows (directed towards Slack or similar channels) inform administrators.
• CI/CD components (GitHub Actions workflows and shell scripts) continuously trigger, update, and deploy the changes.
Architectural Patterns and Key Technologies
• Modular “pipeline” architecture: separate modules (scanning, analysis, remediation, and reporting) are coordinated by the core engine.
• Integration of AI-driven components: these interact with external APIs (OpenAI, Anthropic).
• Containers for deployment: Dockerfile and docker-compose.yml illustrate deployment boundaries.
• CI/CD integration: Automated workflow nodes (GitHub workflows) reside outside the main codebase but interact closely.
• Testing and validation: The tests directory signals an emphasis on end-to-end and security-based testing.
Elements
• User Interfaces: "CLI Interface", "Cyberpunk GUI".
• Core Engine Components: "Security Pipeline", "AI Analysis Module", "Remediation Engine", "Cache Service".
• External Services: "OWASP ZAP", "Nuclei", "OpenAI/Anthropic AI", "GitHub Integration", "Slack Notifications".
• CI/CD and Deployment: "Docker Environment", "GitHub Actions / CI Pipeline".
• Data/instruction flow from interfaces to processing modules.
• Dependency lines from core modules to external scanners and AI services.
• Iteration or feedback:
• Recursive or iterative fix logic that loops back into the analysis cycle.
• Insert colorful annotations or legends to differentiate between internal components, external services, and infrastructure/deployment elements.