This guide contains information for developers working on vulnx.
- Go 1.22 or later
- Git
# Build main cvemap binary
make build
# Build vulnx binary
make build-vulnx
# Build and run tests
make test
# Build everything
make allTo avoid CI failures and maintain code quality, choose one of these automation options:
# Uses our manual script directly as Git hook
make git-hooks# Install pre-commit framework
pip install pre-commit
# Set up hooks with advanced features
make pre-commit# Run all pre-commit checks
make pre-push
# Or run individual checks
make fmt # Format code
make test # Run tests
make lint # Run linter
make vet # Static analysis
make tidy # Tidy dependencies# Make executable and run
chmod +x scripts/pre-commit.sh
./scripts/pre-commit.shIf you encounter dependency issues (like "undefined: retryablehttp"), run:
make fix-deps # Fixes common Go module issues# Clean and rebuild
go clean
go mod tidy
make build# Run tests with verbose output
make test GOFLAGS=-v
# Run specific test
go test -v ./pkg/specific/package- Fork and clone the repository
- Create a feature branch from
main - Set up pre-commit hooks (see above)
- Make your changes with tests
- Run quality checks (
make pre-push) - Commit and push your changes
- Create a pull request
- Follow standard Go conventions
- Use
gofmtandgoimportsfor formatting - Add tests for new functionality
- Keep functions focused and small
- Use meaningful variable names
- Add comments for exported functions
# Run all tests
make test
# Run tests with coverage
go test -cover ./...
# Run specific test file
go test -v ./pkg/tools/renderer/# Run integration tests
make integrationcvemap/
├── cmd/
│ ├── cvemap/ # Main CLI application
│ ├── vulnx/ # Vulnerability exploration CLI
│ └── integration-test/ # Integration tests
├── pkg/
│ ├── runner/ # Core application logic
│ ├── service/ # API service layer
│ ├── types/ # Type definitions
│ ├── tools/ # CLI tools and MCP handlers
│ └── utils/ # Utility functions
├── static/ # Static assets
└── scripts/ # Build and development scripts
- Issues: Check existing issues before creating new ones
- Pull Requests:
- Keep them focused and small
- Include tests for new features
- Update documentation as needed
- Follow the existing code style
- Documentation: Update relevant docs for user-facing changes
- Update version in relevant files
- Run full test suite
- Create release notes
- Tag release
- Build and publish binaries
- Check existing issues and discussions
- Review the main README for user documentation
- Join our community for development questions
These checks include Go formatting, import fixing, testing, linting, and building. Running them locally prevents GitHub CI failures and keeps the codebase clean.