• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tecnickcom / gogen / 29030091920
100%

Build:
DEFAULT BRANCH: main
Ran 09 Jul 2026 03:39PM UTC
Jobs 1
Files 182
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jul 2026 03:31PM UTC coverage: 99.987%. Remained the same
29030091920

push

github

nicolaasuni
feat(filter)!: faster reflect.Value evaluation, secure-by-default limits, and a smaller public API

Performance:
- Evaluate rules on a reflect.Value instead of boxing every element and field into an any, and resolve each rule's field path once per Apply for concrete slices instead of a per-element cache lookup; Equal_10000 drops from ~1.85ms to ~0.44ms (~4x) and per-element allocations from ~2/element (20020 for 10k) to a constant (20).

Security (secure by default):
- Add WithMaxValueLength (default 4096) to reject oversized rule string/regexp values before compilation, WithMaxFilterBytes (default 64 KiB) to reject oversized payloads before json.Unmarshal, and WithMaxFieldDepth (default 32) to bound field-selector nesting and reflection-path cache growth on recursive element types.
- Add Processor.ParseJSON as the bounded, config-aware decoder (ParseURLQuery delegates to it) and cap the number of OR groups in a rule set.
- Add ErrInvalidFilter wrapping every client-attributable error so handlers can reject bad filters generically (e.g. HTTP 400) without surfacing client input or internal type names.
- Document RE2's linear-time matching (no ReDoS) and the caller's authorization responsibility in a package Security section, and add a FuzzFilterApply panic-safety harness.

API surface:
- Unexport the package-level ParseJSON (use Processor.ParseJSON), the Evaluator interface, and the Rule.Evaluate method; Rule is now a pure data struct and the only remaining decode entry points are the size-limited ones.

Behavior:
- A nil interface slice element with a field selector is now a non-match (filtered out), consistent with nil-pointer handling, rather than an error.

Retains 100% test coverage and passes strict golangci-lint.

BREAKING CHANGE: Evaluator.Evaluate now takes a reflect.Value instead of any. The package-level ParseJSON function, the Evaluator interface, and the Rule.Evaluate method are no longer exported — decode untrusted input via Processor.Par... (continued)

15526 of 15528 relevant lines covered (99.99%)

993.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29030091920.1 09 Jul 2026 03:38PM UTC 182
99.99
GitHub Action Run
Source Files on build 29030091920
  • Tree
  • List 182
  • Changed 17
  • Source Changed 17
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29030091920
  • 7f792408 on github
  • Prev Build on main (#29015029994)
  • Next Build on main (#29093025972)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc