Skip to content

Contributing

mendsec edited this page Jun 23, 2026 · 1 revision

Contributing to catnet

The Golden Rule

Do not implement scanning logic in catnet. All network operations must go through catnet-core. If you need new scanning behaviour, open an issue in catnet-core first.

Development Setup

git clone https://github.com/mendsec/catnet.git
cd catnet
go mod download
go build -o /tmp/catnet-test-bin ./cmd/catnet    # pre-requisite for integration tests
go test -race -v ./...

Running Tests

go test -race -v ./...                           # all tests
go test -run TestScanOutputJSON ./tests/         # single test
go test -bench=. -benchmem ./...                 # benchmarks

Code Style

gofmt -w .
go vet ./...
  • Tabs for .go files (see .editorconfig).
  • Spaces for YAML, JSON, and Markdown (2-space indent).

Commit Convention

We follow Conventional Commits:

Prefix Description
feat New user-visible feature
fix Bug fix
docs Documentation only
test Test additions or corrections
refactor Code restructuring, no behaviour change
chore CI, deps, config
perf Performance improvement

Breaking changes: append ! after the type (feat!:), and include a BREAKING CHANGE: footer in the commit body.

Pull Request Checklist

  • Changes follow the golden rule (no scanning logic)
  • gofmt -w . and go vet ./... pass
  • All existing tests pass (go test -race -v ./...)
  • New tests added for new functionality
  • Documentation updated (wiki, CLI reference, or output reference as applicable)
  • Commits follow the Conventional Commits convention

Issue Labels Reference

Label Description
enhancement New feature request
bug Confirmed defect
testing Test infrastructure work
documentation Docs-only change
catnet-core-dep Blocked on or related to catnet-core
good first issue Suitable for new contributors
maintenance CI, deps, housekeeping
distribution Packaging, Homebrew, release

Versioning Policy

catnet follows SemVer, adapted for its role as a consumer:

  • Minor bumps when catnet-core minor bumps or when CLI behaviour changes.
  • Patch bumps for bug fixes and documentation-only changes.
  • Major bumps for breaking CLI contract changes.

Clone this wiki locally