App¶
Package main provides the entry point for the Engine-AntiGinx security scanner command-line application.
This application performs security assessments on web targets by executing various security tests including HTTPS verification, HSTS analysis, and server header information disclosure detection.
Usage:
Example:
# Run HTTPS and HSTS tests on example.com
engine-antiginx test --target example.com --tests https hsts
# Run all available tests
engine-antiginx test --target example.com --tests https hsts serv-h-a
Available Tests:
- https: Verifies HTTPS protocol usage
- hsts: Analyzes HTTP Strict Transport Security headers
- serv-h-a: Server header analysis for information disclosure
The application follows a modular architecture:
- Parameter parser: Extracts command-line arguments
- Job Runner: Orchestrates test execution
- Test Registry: Provides access to available security tests
- Reporter: Outputs results to CLI or backend API
- GlobalHandler: Reports errors to CLI or Queue Consumer
Index¶
func main¶
main is the entry point of the Engine-AntiGinx security scanner. It bootstraps the application by determining the execution mode (CLI vs. Backend) and initializing the global error handling mechanism.
Mode Selection: The function checks for the existence of the "BACK_URL" environment variable:
- If PRESENT: Treats execution as a Backend Worker (cliMode = false). Errors will be formatted as JSON for machine consumption.
- If ABSENT: Treats execution as a standalone CLI tool (cliMode = true). Errors will be formatted as human-readable text blocks.
execution Flow:
- Detect execution mode via os.LookupEnv("BACK_URL").
- Initialize GlobalHandler with the calculated mode.
- Delegate full control to errorHandler.RunSafe(), which encapsulates argument parsing, job orchestration, and panic recovery.
Generated by gomarkdoc