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

ruby-grape / grape / 30490575051
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/adversarial-sweep-2026-08
DEFAULT BRANCH: master
Ran 29 Jul 2026 08:59PM UTC
Jobs 32
Files 167
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

29 Jul 2026 08:59PM UTC coverage: 96.964% (-0.01%) from 96.976%
30490575051

push

github

ericproulx
Tag path params as UTF-8 instead of leaving them binary

Mustermann decodes path captures out of PATH_INFO, which Rack hands over
tagged ASCII-8BIT, and nothing re-tagged the result. Query and body params
arrive UTF-8 because Rack tags those itself, so the same value reached the
endpoint with a different encoding depending on where it came from.

That made an API's declarations disagree with themselves — a binary string
never equals the UTF-8 literal it was written as:

    params { requires :id, type: String, values: ['café'] }

    GET /?id=café   ->  200
    GET /café       ->  400 "id does not have a valid value"

The same held for same_as, except_values and any comparison an endpoint made
against a non-ASCII literal. It also leaked into serialization: a non-ASCII
path param rendered into a JSON response drew an encoding warning from the
json gem, which that gem says will become an error in json 3.0.

Re-tag in Route#params_for, the single funnel for path-extracted values, the
way Rails does after unescaping a path. Only the encoding changes: the bytes
are untouched, so an invalid sequence stays invalid and is still caught
downstream instead of being silently scrubbed into something the client never
sent. Unnamed splats capture into an Array, so those are walked too.

No extra allocations — the captures are freshly built and unfrozen, so the
re-tag happens in place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

1202 of 1291 branches covered (93.11%)

Branch coverage included in aggregate %.

6 of 7 new or added lines in 1 file covered. (85.71%)

1 existing line in 1 file now uncovered.

3812 of 3880 relevant lines covered (98.25%)

26788.9 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.36
-3.64% lib/grape/router/route.rb

Coverage Regressions

Lines Coverage ∆ File
1
96.36
-3.64% lib/grape/router/route.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_3_1.gemfile - 30490575051.1 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
2 run-3.4-gemfiles/rack_3_2.gemfile - 30490575051.2 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
3 run-3.3-gemfiles/rails_8_0.gemfile - 30490575051.3 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
4 run-4.0-gemfiles/hashie.gemfile - 30490575051.4 29 Jul 2026 08:59PM UTC 166
61.99
GitHub Action Run
5 run-3.3-gemfiles/rack_2_2.gemfile - 30490575051.5 29 Jul 2026 08:59PM UTC 166
95.55
GitHub Action Run
6 run-4.0-gemfiles/rails_7_2.gemfile - 30490575051.6 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
7 run-4.0-gemfiles/dry_validation.gemfile - 30490575051.7 29 Jul 2026 08:59PM UTC 166
58.08
GitHub Action Run
8 run-4.0-gemfiles/multi_json_1_20.gemfile - 30490575051.8 29 Jul 2026 08:59PM UTC 166
47.76
GitHub Action Run
9 run-3.4-gemfiles/rack_3_1.gemfile - 30490575051.9 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
10 run-3.3-gemfiles/rails_8_1.gemfile - 30490575051.10 29 Jul 2026 09:00PM UTC 167
95.59
GitHub Action Run
11 run-3.4-gemfiles/rails_7_2.gemfile - 30490575051.11 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
12 run-4.0-gemfiles/rails_8_1.gemfile - 30490575051.12 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
13 run-3.3-Gemfile - 30490575051.13 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
14 run-4.0-gemfiles/rack_3_2.gemfile - 30490575051.14 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
15 run-4.0-gemfiles/rack_2_2.gemfile - 30490575051.15 29 Jul 2026 08:59PM UTC 166
95.55
GitHub Action Run
16 run-3.4-gemfiles/rails_8_0.gemfile - 30490575051.16 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
17 run-3.4-gemfiles/rack_3_0.gemfile - 30490575051.17 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
18 run-3.3-gemfiles/rack_3_0.gemfile - 30490575051.18 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
19 run-3.4-gemfiles/rails_8_1.gemfile - 30490575051.19 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
20 run-4.0-Gemfile - 30490575051.20 29 Jul 2026 09:00PM UTC 166
95.59
GitHub Action Run
21 run-4.0-gemfiles/multi_xml.gemfile - 30490575051.21 29 Jul 2026 08:59PM UTC 166
47.12
GitHub Action Run
22 run-4.0-gemfiles/rack_3_1.gemfile - 30490575051.22 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
23 run-3.4-gemfiles/rack_2_2.gemfile - 30490575051.23 29 Jul 2026 08:59PM UTC 166
95.55
GitHub Action Run
24 run-4.0-gemfiles/rails_8_0.gemfile - 30490575051.24 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
25 run-3.3-gemfiles/rails_7_2.gemfile - 30490575051.25 29 Jul 2026 08:59PM UTC 167
95.59
GitHub Action Run
26 run-4.0-gemfiles/grape_entity.gemfile - 30490575051.26 29 Jul 2026 08:59PM UTC 166
50.42
GitHub Action Run
27 run-3.3-gemfiles/rack_3_2.gemfile - 30490575051.27 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
28 run-3.4-Gemfile - 30490575051.28 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
29 run-4.0-gemfiles/multi_xml_0_8.gemfile - 30490575051.29 29 Jul 2026 08:59PM UTC 166
47.16
GitHub Action Run
30 run-4.0-gemfiles/rack_3_0.gemfile - 30490575051.30 29 Jul 2026 08:59PM UTC 166
95.59
GitHub Action Run
31 run-4.0-gemfiles/multi_json.gemfile - 30490575051.31 29 Jul 2026 08:59PM UTC 166
47.73
GitHub Action Run
32 run-4.0-gemfiles/grape_swagger.gemfile - 30490575051.32 29 Jul 2026 08:59PM UTC 166
55.39
GitHub Action Run
Source Files on build 30490575051
  • Tree
  • List 167
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30490575051
  • b3d9d12d on github
  • Prev Build on master (#30486032579)
  • Next Build on fix/path-param-encoding (#30490601901)
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