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

kobotoolbox / kpi / 29431514116 / 6
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-2427-reprocess-failed-root-uuid-xforms
DEFAULT BRANCH: master
Ran 15 Jul 2026 04:21PM UTC
Files 892
Run time 38s
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

15 Jul 2026 04:13PM UTC coverage: 50.932% (-8.0%) from 58.961%
29431514116.6

push

github

web-flow
feat(search): switch relational-lookup validation from blacklist to allowlist for q search DEV-2417 (#7243)

### ๐Ÿ“ฃ Summary
Implemented the allowlist approach for the q search endpoint to replace
the old blacklist method plus super users bypass the allowlist

### ๐Ÿ“– Description
Changes included in this PR:
* Added `ALLOWED_LOOKUP_FIELDS` and `DENIED_LOOKUP_FIELDS` to
`kpi/constants.py` mapping out which explicitly allowed fields are
available per model (used Gemini to find this list and included the
prompt used)
* Updated `QueryParseActions._validate_field` inside
`kpi/utils/query_parser/query_parser.py` to stop using the previous
blacklist and solely rely on the new allowlist mapping
* Kept the native JSONField validation and Django transform parsing,
meaning validation stops appropriately at a JSONField (leaving nested
keys unprocessed for relation logic) and implicit lookup filters like
`__icontains` bypass relationship checks
* Extended the `parse()` method to accept a `user` argument and updated
`kpi/filters.py` to pass `request.user` downstream to allow superusers
to bypass the allowlist checks

### ๐Ÿ‘€ Preview steps
Covered in unit tests, no need to test blocked queries

---------

Co-authored-by: Olivier Lรฉger <olivierleger@gmail.com>

4544 of 12472 branches covered (36.43%)

18887 of 37083 relevant lines covered (50.93%)

0.51 hits per line

Source Files on job 29431514116.6
  • Tree
  • List 892
  • Changed 237
  • Source Changed 0
  • Coverage Changed 237
Coverage โˆ† File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 29431514116
  • 9efbb9aa on github
  • Prev Job for on release/2.026.27 (#29029441589.5)
  • Next Job for on release/2.026.27 (#29435767219.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc