| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Adds request.body.read/.string, .params, .GET, .POST, .cookies, .env, .query_string, and .path_info as Http::Server::RequestInputAccess sources within Grape::API endpoints, plus matching Grape.ql test predicates and app.rb coverage. Also adds ConnectedToInjection.rb, exercising ActiveRecord connected_to role-switch blocks with captured variables as an SQL injection regression fixture. .expected files intentionally not yet updated pending a CodeQL CLI upgrade/test pass.
…089 tests Adds # $ Source / # $ Alert annotations to ConnectedToInjection.rb matching the sibling fixtures' convention. Regenerated Grape.expected/Flow.expected and SqlInjection.expected from verified actual output (codeql test run, CLI 2.27.0). All 3 tests pass: Flow.ql, Grape.ql, SqlInjection.qlref.
grapeRequestGET/grapeRequestPOST -> grapeRequestGet/grapeRequestPost, per CodeQL code-scanning naming-convention review comments on the PR.
There was a problem hiding this comment.
Three moderate source-modeling issues remain in Grape.qll.
Get a fresh assessment by requesting another Copilot review.
Review tier: Lite (auto)
Findings: 2
Note
Copilot is running an experiment and ran this review at Lite.
Extends Ruby Grape request modeling with remote-flow sources and adds regression coverage.
Changes:
| File | Description |
|---|---|
| ruby/ql/test/query-tests/security/cwe-089/SqlInjection.expected | Updates SQL-injection expectations. |
| ruby/ql/test/query-tests/security/cwe-089/ConnectedToInjection.rb | Adds connected_to SQL-injection regression cases. |
| ruby/ql/test/library-tests/frameworks/grape/Grape.ql | Queries the new source types. |
| ruby/ql/test/library-tests/frameworks/grape/Grape.expected | Records Grape test results. |
| ruby/ql/test/library-tests/frameworks/grape/Flow.expected | Records flow-test results. |
| ruby/ql/test/library-tests/frameworks/grape/app.rb | Adds request accessor flow cases. |
| ruby/ql/lib/codeql/ruby/frameworks/Grape.qll | Adds Grape request sub-accessor source models. |
| ruby/ql/lib/change-notes/2026-09-15-grape-request-sources.md | Documents the feature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was a problem hiding this comment.
QL formatting check fails; otherwise LGTM.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Follow-up to #20427 (Grape framework support). Models the request object's common sub-accessors within a Grape::API endpoint as remote flow sources, so taint tracking recognizes them the same way it already recognizes params, headers, cookies, and bare request.
Grape's request is a Rack::Request-like object; the following accessors are now modeled as sources:
Testing
All three tests pass (Flow.ql, Grape.ql, SqlInjection.qlref).
Change note
Added ruby/ql/lib/change-notes/2026-09-15-grape-request-sources.md (category feature).