Skip to content

Add configurable redaction of body keys and query params - Support redacting custom body keys and query parameters - Add sanitization logic to logger package - Integrate redaction into HAR middleware - Include comprehensive tests for new functionality#322

Merged
moshloop merged 2 commits into
masterfrom
feat/har-capture-and-logger-improvements
Jun 29, 2026

Conversation

@moshloop

Copy link
Copy Markdown
Member

No description provided.

@moshloop moshloop enabled auto-merge (rebase) June 29, 2026 02:40
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@moshloop, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 42 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8f0445aa-7be8-4af1-9304-f628a25a78d5

📥 Commits

Reviewing files that changed from the base of the PR and between 340276a and 7db632d.

📒 Files selected for processing (8)
  • har/har.go
  • har/middleware.go
  • har/middleware_test.go
  • http/http_test.go
  • http/http_tls_test.go
  • logger/sanitize.go
  • logger/sanitize_test.go
  • lookup/lookup.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/har-capture-and-logger-improvements
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/har-capture-and-logger-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration
lint: golangci-lint 0 1 0 785.886µs
collections 49 0 0 3.0s
files 41 0 0 44ms
github.com/flanksource/commons/certs 4 0 0 520ms
github.com/flanksource/commons/cmd/hx 8 0 0 -
github.com/flanksource/commons/cmd/hx/parse 26 0 0 -
github.com/flanksource/commons/collections/syncmap 10 0 0 -
github.com/flanksource/commons/context 1 0 0 -
github.com/flanksource/commons/duration 2 0 0 -
github.com/flanksource/commons/files 16 0 0 -
github.com/flanksource/commons/har 30 0 0 -
github.com/flanksource/commons/hash 13 0 0 -
github.com/flanksource/commons/http 95 0 2 13.4s
github.com/flanksource/commons/logger 40 0 0 10ms
github.com/flanksource/commons/logger/httpretty/internal/color 15 0 0 -
github.com/flanksource/commons/logger/httpretty/internal/header 1 0 0 -
github.com/flanksource/commons/lookup 7 0 0 -
github.com/flanksource/commons/test 5 0 1 10ms
github.com/flanksource/commons/text 1 0 0 -
github.com/flanksource/commons/tokenizer 3 0 0 -
lint: betterleaks 0 0 1 -
logger 41 0 0 1ms
set 7 0 0 511.394µs

Totals: 415 passed · 1 failed · 4 skipped · 17.1s

Failing linters

golangci-lint — error

golangci-lint execution failed: fork/exec /home/runner/work/commons/commons/.gavel/golangci-lint: exec format error
Output:

View full results

- Replace deprecated reflect.Ptr alias with reflect.Pointer in lookup
  (govet inline analyzer in golangci-lint v2.12.2 flags the alias)
- Bind TLS test listeners synchronously via startTLSServer helper to
  fix a connection-refused race in TestTLSLogging/TestTLSConfig where
  the server was signaled ready before the port was bound
- Replace the flaky external expired.badssl.com call in
  TestHTTP/Skip_SSL_Verification with a local expired-cert server, and
  assert a verifying client rejects it so the test proves skip-verify
@moshloop moshloop merged commit 516bc6d into master Jun 29, 2026
8 checks passed
@moshloop moshloop deleted the feat/har-capture-and-logger-improvements branch June 29, 2026 04:01
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.

1 participant