1c33225b08
fix: 14 bug fixes across agent, websocket, mikrotik, checks, and hostkeys
...
Test / test (push) Failing after 53s
- agent.go: fix buffer pool leak on protobuf marshal error
- agent.go: reject malformed/phx_error join replies as failures
- agent.go: add sessionCtx.Done() to main loop select
- agent.go/websocket.go: prevent double-close race in WSConn
- websocket.go: fix case-insensitive header parsing truncation
- websocket.go: fix IPv6 literal host parsing missing default port
- mikrotik.go: fix per-word read deadline reset (DoS vector)
- mikrotik.go: use context with deadline for TLS dial
- checks.go: fix sslRootCAs caching errors forever via sync.Once
- checks.go: use context-aware dial for TCP checks
- checks.go: fix responseTimeMs=0 sentinel ambiguity
- checks.go: report regex compile error as UNKNOWN not CRITICAL
- hostkeys.go: log JSON unmarshal errors in known_hosts.json
- ssh_test.go: isolate tests with resetHostKeyStore to prevent TOFU contamination
2026-06-21 14:34:24 -05:00
b308c3dc2e
move to codeberg
2026-06-06 13:00:59 -05:00
e99f681c87
fix: harden trust and transport validation
2026-03-26 12:21:39 -05:00
24b77116dc
add ssl/tls certificate expiration check type
...
add SslCheckConfig protobuf message and executeSSLCheck function that
connects via crypto/tls, reads the peer certificate expiry, and returns
OK/WARNING/CRITICAL based on a configurable warning_days threshold.
2026-03-17 16:05:44 -05:00
adad473485
fix: handle errcheck lint violations in test files
2026-03-05 12:13:05 -06:00
aef770ea83
test: achieve 92%+ coverage with comprehensive integration and edge case tests
...
Cover WebSocket session lifecycle (result channels, SNMP batch flushing,
heartbeats, restart), MikroTik TLS TOFU verification mismatch, worker pool
exhaustion, plaintext WebSocket rejection, HTTP/TCP/DNS check execution,
IPv4 fallback, and customer network edge cases.
Make heartbeat intervals and toWebSocketURL exit injectable for testing.
2026-03-04 16:06:29 -06:00