Repository navigation
Harden pipeline summary filter handling - #36010
Conversation
Bind the pipeline summary, metrics, and execution/runtime-trend filter values (service, serviceType, status, tier) as query parameters instead of inlining them into the SQL text, keeping the handling uniform across MySQL and PostgreSQL. Also evaluate the view-authorization context the summary endpoint already constructs, matching the metrics and trend endpoints.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
74ddb13 to
3bae27c
Compare
Code Review ✅ Approved🔴 High risk · Adding VIEW_BASIC authorization to the pipeline summary endpoint could block users without that permission from accessing summaries. Routes pipeline summary, metrics, and execution/runtime trend filter values through a single SQL string-literal escaper and applies the standard view authorization check on the summary endpoint to match the metrics and trend endpoints. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
|
||
| OperationContext operationContext = | ||
| new OperationContext(entityType, MetadataOperation.VIEW_BASIC); | ||
| authorizer.authorize(securityContext, operationContext, getResourceContext()); |
There was a problem hiding this comment.
Summary access check lacks coverage
The new authorization check has no regression integration test. The existing HTTP summary test uses an administrator, and the filter test calls the repository directly. Both still pass if this check is removed.
The repository review guide requires an authorization fix to include an integration test that fails before the fix. Before merging, add a request from a user denied VIEW_BASIC and assert HTTP 403, alongside an allowed request.
Context Used: CLAUDE.md (source)
|
🚦 Removed from the merge queue —
|
Backport of #36010 to the 2.0 branch. Route the pipeline summary, metrics, and execution/runtime trend filter values through bound SQL parameters (:psService, :psServiceType, :psStatus, :psTier) instead of interpolated string literals, so the escaping is consistent and complete across engines, and apply the standard VIEW_BASIC authorization check on the summary endpoint to match the metrics and trend endpoints. Adapted to 2.0: the DAO methods live in CollectionDAO (the TimeSeriesDAOs split came later on main), and the summary path's serviceType filters are bound here too since 2.0 interpolated them raw.



Route the pipeline summary, metrics, and execution/runtime trend filter values through a single SQL string-literal escaper so the escaping is consistent and complete across engines, and apply the standard view authorization check on the summary endpoint to match the metrics and trend endpoints.
Describe your changes:
Fixes #
I worked on ... because ...
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording:
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.docs/decisions/(see itsREADME.md). This description is gone fromgit logafter the squash-merge.Add the required summary authorization regression integration test before merging.
Findings
Summary
Replaces interpolated pipeline filter values with bound SQL parameters across summaries, metrics, and execution/runtime trends. Adds a
VIEW_BASICcheck to the summary endpoint.Reviews (1) · Last reviewed commit: "Harden pipeline summary filter handling" · Reviewed by Greptile