Add Go-based nmap agent for ZEPSEC vulnerability scanning#1
Open
peteralcock wants to merge 1 commit intomainfrom
Open
Add Go-based nmap agent for ZEPSEC vulnerability scanning#1peteralcock wants to merge 1 commit intomainfrom
peteralcock wants to merge 1 commit intomainfrom
Conversation
Implements a standalone Go agent that integrates with the ZEPSEC platform's existing remote agent (RA) protocol. The agent receives scan jobs dispatched by the Rails server via POST /scans, executes nmap locally, parses XML output, and reports structured results back to /api/v1/ra_api. Features: - Server-dispatched mode: accepts scan jobs from ZEPSEC server - Autonomous scheduled mode: periodic scans without server coordination - Bearer token authentication matching ZEPSEC agent model - Nmap XML parsing with full service/port/host extraction - External IP detection for source_ip reporting - TLS support, YAML+env var configuration, Docker packaging - Health check and status endpoints - Graceful shutdown with signal handling - Cross-platform builds via Makefile https://claude.ai/code/session_01LVKNMhijABe5c9ApiLqzJZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new Go-based remote scanning agent for the ZEPSEC vulnerability tracking platform. The agent deploys to target machines to execute nmap scans and report results back to the ZEPSEC server for centralized network monitoring.
Key Changes
main.go,server.go): HTTP server that receives scan jobs from ZEPSEC viaPOST /scans, executes nmap, and reports results back to/api/v1/ra_apiscanner.go): Executes nmap with configurable options, parses XML output, and converts results to ZEPSEC API formatreporter.go): Submits scan results to ZEPSEC server with retry logic and exponential backoffscheduler.go): Autonomous periodic scanning mode for continuous network monitoring without server coordinationnetwork.go): External IP detection, local interface enumeration, and connectivity checksconfig.go,config.example.yml): YAML-based config with environment variable overrides for all settingsMakefile,Dockerfile): Multi-platform builds (Linux, macOS, Windows) and Docker image with non-root user and sudo nmap accessREADME.md): Architecture overview, quick start, configuration guide, API endpoints, and security notesNotable Implementation Details
Testing
The agent is ready for integration testing with a ZEPSEC Rails server instance. Configuration examples and deployment instructions are provided in the README.
https://claude.ai/code/session_01LVKNMhijABe5c9ApiLqzJZ