What's New in v1.1.0
Architecture
- Extract
scan.gofrommain.go— scan orchestration logic split into its own file (main.go: 1011 → 685 lines) - Context threading —
checkDNS,checkTCP,wrapTLSnow acceptcontext.Contextfor proper cancellation propagation - DialContext in neighborhood scan — replaced
DialTimeoutwithDialContextfor correct timeout semantics
Test Coverage
- 61 new test functions across 10 test files (total: 261 unit + 3 fuzz)
- Statement coverage: 40.5% → 61.6% (
cmd/kshark) - Key functions now covered:
checkDNS(100%),checkTCP(100%),wrapTLS(100%),runScan(66%),runConnectorProbe(64%),mtuCorrelation(100%),writeHTMLReport(77%) - Context cancellation tests for DNS and TCP probes
- New
connector_test.gocovering MongoDB, PostgreSQL, unsupported types, password redaction
Bug Fixes
- Fixed 4
go vetmutex-copy warnings indiff_test.goandtrend_test.go - Removed unused
crypto/tlsimport fromredis.go
Documentation
- Added Code Quality section to README with coverage metrics
- Updated Project Structure to reflect
scan.goextraction - Added MySQL, SQL Server, Oracle, Redis, Elasticsearch to Supported Connectors table
- Added acceptance protocol document
Quality Metrics
| Metric | Value |
|---|---|
| Coverage (cmd/kshark) | 61.6% |
| Coverage (connectapi) | 75.7% |
| Coverage (probe) | 72.3% |
| Test functions | 261 + 3 fuzz |
| go vet warnings | 0 |
| Race conditions | 0 |
Supported Connector Targets
MongoDB, PostgreSQL, IBM DB2, MySQL, SQL Server, Oracle, Redis, Elasticsearch