Skip to content

Harden library for production-critical workloads - #3

Draft
gearnode wants to merge 2 commits into
masterfrom
cursor/harden-library-bafd
Draft

gearnode wants to merge 2 commits into
masterfrom
cursor/harden-library-bafd

Conversation

@gearnode

@gearnode gearnode commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • harden PostgreSQL pooling, TLS validation, advisory-locked migrations, and SQL trace redaction
  • prevent HTTP SSRF proxy bypasses, bound client waits, sanitize telemetry, and reduce metric/span cardinality
  • remove connection-level spans so unrelated keep-alive requests remain in independent traces
  • improve application shutdown, secure OTLP defaults, configuration validation, secret redaction, and worker cancellation/panic handling
  • upgrade vulnerable dependencies and strengthen CI with pinned tools, race tests, and govulncheck

Notable behavior changes

  • metrics bind to 127.0.0.1:9090 by default
  • OTLP/HTTP uses verified TLS at localhost:4318 by default; local plaintext collectors must set insecure: true
  • outbound HTTP clients default to a 30-second total timeout and 15-second response-header timeout
  • SQL query text is omitted from spans unless pg.WithTraceQueryText() is supplied
  • tracing sampling defaults to 10%

Verification

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • staticcheck ./...
  • golangci-lint run ./...
  • govulncheck ./... (zero reachable vulnerabilities)
  • goimports -d .
  • git diff --check

PostgreSQL-backed tests retain their existing skip behavior when no database is available.

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 19, 2026 09:49
Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants