How zupit/horusec works
Project type and purpose
• This is a Go-based, full-stack CLI tool (Horusec CLI) for static code analysis.
• It orchestrates multiple language analyzers (via Docker or local binaries), collects and formats findings, and can send results to an external Horusec Web API or output to the console/JSON/SARIF.
File structure
• Top-level:
• cmd/app – entrypoints for the CLI (generate, start, version)
• config – loading and defaulting of CLI config
• internal – the Go application core split into controllers, entities, enums, helpers, usecases, utils
• internal/services – adapters for Docker, Git, Horusec API, Sarif, SonarQube, and per-language engines and formatters
• deployments – Dockerfiles, release scripts, install scripts
• e2e – CLI end-to-end test suites
• examples, assets – demonstration code and images
• Patterns: layered architecture (presentation in cmd, application in controllers & usecases, domain in entities/enums, infrastructure in services).
• Config files (.golangci.yml, goreleaser.yml) and CI workflows in .github/workflows orchestrate builds, tests, releases.
README for additional insights
• Confirms core architecture: CLI → analysis engines → formatters → results → optional Horusec-Web API.
• Provides an “architecture” image showing CLI calling Docker containers for each tool, collecting and unifying results.
Details to capture
• Each CLI command (“generate”, “start”, “version”) entrypoint
• Config precedence (example JSON, defaults)
• Requirement checks before analysis
• Parallel execution of language engines
• Aggregation of vulnerabilities across all engines
• Formatting pipeline and optional API submission