Skip to content

Harden pipeline summary filter handling - #36010

Merged
TeddyCr merged 1 commit into
mainfrom
pipeline-summary-filter-hardening
Oct 23, 2026
Merged

TeddyCr merged 1 commit into
mainfrom
pipeline-summary-filter-hardening

Conversation

@TeddyCr

@TeddyCr TeddyCr commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

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:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
  • Decision check: if this PR decides something the next contributor could undo — a schema field, REST path or format another component or repo must agree with, a new default or limit, an ordering that must hold, or a rule stated only in this description — it adds a record under docs/decisions/ (see its README.md). This description is gone from git log after the squash-merge.

RetriggerView in GreptileConfidence Score: 4/5

Add the required summary authorization regression integration test before merging.

Findings

  1. P2 Summary access check lacks coverage ▶

Summary

Replaces interpolated pipeline filter values with bound SQL parameters across summaries, metrics, and execution/runtime trends. Adds a VIEW_BASIC check to the summary endpoint.

  • Pipeline filters reach SQL as bound values.
  • Pipeline summaries check basic view access.

Reviews (1) · Last reviewed commit: "Harden pipeline summary filter handling" · Reviewed by Greptile

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.
@TeddyCr
TeddyCr requested a review from a team as a code owner October 22, 2026 19:06
@TeddyCr
TeddyCr requested review from manerow and a balanced review from Copilot and removed request for Copilot October 22, 2026 19:06
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 22, 2026
Copilot AI balanced review requested due to automatic review settings October 22, 2026 19:07
@TeddyCr
TeddyCr force-pushed the pipeline-summary-filter-hardening branch from 74ddb13 to 3bae27c Compare October 22, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
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.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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)

@sonarqubecloud

Copy link
Copy Markdown

@TeddyCr
TeddyCr added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-22T22:24:25Z)

Blocked the queue: integration-tests-mysql-elasticsearch

@TeddyCr
TeddyCr added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit db26438 Oct 23, 2026
96 of 99 checks passed
@TeddyCr
TeddyCr deleted the pipeline-summary-filter-hardening branch October 23, 2026 02:24
TeddyCr added a commit that referenced this pull request Oct 23, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants