Skip to content

fix(api): improved request handling and embedded dashboard scoping - #42930

Merged
rusackas merged 9 commits into
masterfrom
fix/request-and-embedded-hardening
Aug 18, 2026
Merged

rusackas merged 9 commits into
masterfrom
fix/request-and-embedded-hardening

Conversation

@rusackas

@rusackas rusackas commented Aug 9, 2026

Copy link
Copy Markdown
Member

SUMMARY

A set of correctness fixes to request handling, embedded-dashboard scope, and per-user response caching.

  • Data-URL dataset imports validate the connected peer address (not just the hostname) on every hop, so a name that re-resolves between validation and fetch cannot reach an internal address.
  • The database OAuth2 callback binds token storage to the authenticated user that initiated the flow.
  • Redirect-safety normalises backslashes to slashes before its checks, matching how browsers treat them, so mixed slash/backslash prefixes are correctly rejected.
  • The task list fails closed for a request-bound principal with no user id, rather than returning everything.
  • Embedded (guest) requests are scoped correctly: annotation-layer reads require read access, native-filter series terms are validated like other value-returning terms, deck.gl multi-layer child charts bind to their own datasource, guest metric-macro dataset resolution is limited to datasets reachable through a granted dashboard, and annotation data is cached per requesting user.
  • Per-user extension storage responses are marked non-cacheable and excluded from shared-cache rewriting.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable (backend behavior).

TESTING INSTRUCTIONS

pytest tests/unit_tests/utils/test_link_redirect.py tests/unit_tests/tasks/test_filters.py tests/unit_tests/extensions/ tests/unit_tests/commands/databases/oauth2_test.py tests/unit_tests/datasets/commands/importers/v1/import_test.py tests/unit_tests/security/manager_test.py tests/unit_tests/common/test_query_context_processor.py tests/unit_tests/jinja_context_test.py

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration
  • Introduces new feature or API

@bito-code-review

bito-code-review Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #ac918f

Actionable Suggestions - 0
Additional Suggestions - 3
  • superset/common/query_context_processor.py - 1
    • CWE-284: Chart access bypass in annotation cache · Line 292-316
      `_annotation_cache_context` at line 308 calls `ChartDAO.find_by_id(layer_value)` for "line"/"table" annotation layers without verifying the user has access to that chart. Any user who can submit a query with annotation data can trigger this lookup and derive RLS clauses from the chart's datasource, including charts they lack explicit access to. The existing `can_access("can_read", "Annotation")` check at line 672 only guards "NATIVE" layers. Add a chart-read permission gate before line 308. ([CWE-284](https://cwe.mitre.org/data/definitions/284.html))
  • tests/unit_tests/utils/test_link_redirect.py - 1
    • CWE-601: SSRF via Backslash-Normalized Absolute URL · Line 183-183
      This test case expects `is_safe_redirect_url` to reject `https:/\evil.com`, but tracing shows the normalization (line 147) converts it to `https://evil.com`. If base_hosts doesn't include 'evil.com', the check at line 167 would return False (correct behavior by accident). The implementation's logic for absolute URLs with backslashes needs explicit hardening.
  • superset/extensions/storage/api.py - 1
    • Missing test for cache header · Line 94-104
      The new cache-control behavior on `self.response()` is not verified in any existing test. Current tests only check status codes and JSON body content (e.g., lines 73-75, 128). A missing assertion means the cache header could regress silently.
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • tests/unit_tests/utils/test_link_redirect.py - 1
    • CWE-601: SSRF via Control Char Normalization · Line 182-182
  • tests/unit_tests/datasets/commands/importers/v1/import_test.py - 1
Review Details
  • Files reviewed - 18 · Commit Range: e5dbc31..5ad0a57
    • superset/commands/database/oauth2.py
    • superset/commands/dataset/importers/v1/utils.py
    • superset/common/query_context_processor.py
    • superset/extensions/cache_middleware.py
    • superset/extensions/storage/api.py
    • superset/jinja_context.py
    • superset/security/manager.py
    • superset/tasks/filters.py
    • superset/utils/link_redirect.py
    • superset/utils/network.py
    • tests/unit_tests/commands/databases/oauth2_test.py
    • tests/unit_tests/common/test_query_context_processor.py
    • tests/unit_tests/datasets/commands/importers/v1/import_test.py
    • tests/unit_tests/extensions/test_cache_middleware.py
    • tests/unit_tests/jinja_context_test.py
    • tests/unit_tests/security/manager_test.py
    • tests/unit_tests/tasks/test_filters.py
    • tests/unit_tests/utils/test_link_redirect.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot Bot added api Related to the REST API authentication Related to authentication embedded global:jinja Related to Jinja templating infra:caching Infra setup and configuration related to caching labels Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.86598% with 69 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.63%. Comparing base (2773bc9) to head (62e4d46).
⚠️ Report is 20 commits behind head on master.

Files with missing lines Patch % Lines
superset/commands/dataset/importers/v1/utils.py 46.42% 15 Missing ⚠️
superset/common/query_context_processor.py 6.25% 13 Missing and 2 partials ⚠️
superset/jinja_context.py 10.00% 8 Missing and 1 partial ⚠️
superset/tasks/decorators.py 0.00% 6 Missing ⚠️
superset/commands/database/oauth2.py 28.57% 5 Missing ⚠️
superset/security/manager.py 0.00% 4 Missing ⚠️
superset/tasks/filters.py 42.85% 3 Missing and 1 partial ⚠️
superset/utils/network.py 20.00% 4 Missing ⚠️
superset/extensions/storage/api.py 0.00% 3 Missing ⚠️
superset/tasks/context.py 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42930      +/-   ##
==========================================
- Coverage   66.66%   66.63%   -0.03%     
==========================================
  Files        2873     2874       +1     
  Lines      163654   163856     +202     
  Branches    37771    37814      +43     
==========================================
+ Hits       109093   109182      +89     
- Misses      52432    52530      +98     
- Partials     2129     2144      +15     
Flag Coverage Δ
hive 38.12% <19.58%> (-0.05%) ⬇️
mysql 57.80% <28.86%> (-0.04%) ⬇️
postgres 57.83% <28.86%> (-0.04%) ⬇️
presto 40.06% <19.58%> (-0.06%) ⬇️
python 59.22% <28.86%> (-0.04%) ⬇️
sqlite 57.47% <28.86%> (-0.04%) ⬇️
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread superset/commands/dataset/importers/v1/utils.py Outdated
@bito-code-review

Copy link
Copy Markdown
Contributor

The flagged issue is correct. The current implementation of _PeerValidatingHTTPConnection and _PeerValidatingHTTPSConnection only validates the peer address after the connection is established. If an HTTP(S) proxy is configured, urllib establishes the connection to the proxy server, and _raise_for_unsafe_peer validates the proxy's IP address rather than the final destination's IP address, which can lead to SSRF vulnerabilities.

To resolve this, you should explicitly disable proxy usage for these connections by setting the proxy argument to None in the connect method or by configuring the opener to ignore proxies for these specific requests.

Would you like me to fetch all other comments on this PR to validate them and implement a comprehensive fix?

superset/commands/dataset/importers/v1/utils.py

class _PeerValidatingHTTPConnection(HTTPConnection):
    """HTTP connection that validates the peer address on connect."""

    def connect(self) -> None:
        # Explicitly disable proxy usage for this connection
        self.proxy = None
        super().connect()
        _raise_for_unsafe_peer(self.sock)

@rusackas rusackas changed the title fix(api): correct request handling and embedded dashboard scoping fix(api): improved request handling and embedded dashboard scoping Aug 9, 2026
@rusackas rusackas added the merge-if-green If approved and tests are green, please go ahead and merge it for me label Aug 9, 2026
@bito-code-review

bito-code-review Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #cb2fbc

Actionable Suggestions - 0
Review Details
  • Files reviewed - 7 · Commit Range: e5dbc31..487a838
    • superset/commands/dataset/importers/v1/utils.py
    • superset/tasks/context.py
    • superset/tasks/decorators.py
    • superset/tasks/manager.py
    • superset/tasks/scheduler.py
    • tests/unit_tests/daos/test_tasks.py
    • tests/unit_tests/databases/api_test.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@sha174n sha174n 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.

Reviewed the request-handling and embedded-scoping changes. The controls hold together well.

The data-URL import re-checks the connected peer address on the socket for every hop, not just the initial hostname, and disables proxies so the check applies to the real destination, with the redirect handler re-validating each hop. The OAuth2 callback requires an authenticated non-guest session whose id matches the signed state, which is the right enforcement point given the callback route is unauthenticated by necessity. Guest scoping is tightened consistently: the deck.gl child leg binds the requested datasource to the child chart, native-filter series columns and the series-limit term are validated like other value-returning terms, and the jinja metric macro constrains a guest to datasets reachable through a granted dashboard. Annotation data shares the dataframe cache entry, so binding the requesting user and per-source RLS into the key is the correct fix. The task list fails closed for a request-bound principal with no user id, while the internal executor keeps loading its task by uuid.

Two non-blocking notes: disabling proxies for the import fetch is right for the default config but will affect deployments that need an egress proxy to reach legitimate external URLs, so a short release note would help; and patch coverage is on the low side, mostly on the importer connection path, so a couple of integration tests there would raise confidence. Looks good to me.

@rusackas

Copy link
Copy Markdown
Member Author

Went through Bito's three "Additional Suggestions" on this one.

The annotation cache-key one is a misread. _annotation_cache_context only feeds security_manager.get_rls_cache_key() into QueryObject.cache_key(), which hashes the whole dict before it ever leaves the server. No RLS clause or chart data makes it back to the requester, so there's nothing to derive.

Same for the backslash-redirect test. is_safe_redirect_url normalizes backslashes to slashes before any structural check, so an absolute URL like https:/\evil.com goes through the exact same netloc allowlist as every other absolute URL. It's not passing "by accident", that's the actual design.

The missing cache-header test was fair though, added one in 2e2cdb0.

@bito-code-review

bito-code-review Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #8966e6

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • tests/unit_tests/extensions/storage/test_api.py - 1
Review Details
  • Files reviewed - 1 · Commit Range: 487a838..2e2cdb0
    • tests/unit_tests/extensions/storage/test_api.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@sha174n sha174n 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.

Reviewed the embedded-dashboard scoping and request-handling changes — the guest access paths stay correctly bounded (dashboard-membership + dataset allowlist) and several term/validation checks are tightened. LGTM.

@rusackas

Copy link
Copy Markdown
Member Author

@sha174n added an UPDATING.md note on the proxy-disabling behavior, and a test covering load_data's opener construction for the importer connection path.

@bito-code-review

bito-code-review Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #ebb973

Actionable Suggestions - 0
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • tests/unit_tests/datasets/commands/importers/v1/import_test.py - 1
Review Details
  • Files reviewed - 1 · Commit Range: 2e2cdb0..11aeb2f
    • tests/unit_tests/datasets/commands/importers/v1/import_test.py
  • Files skipped - 1
    • UPDATING.md - Reason: Filter setting
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas
rusackas force-pushed the fix/request-and-embedded-hardening branch from 11aeb2f to d5cf4c6 Compare August 13, 2026 22:53
@rusackas
rusackas requested a review from sadpandajoe as a code owner August 13, 2026 22:53

@bito-code-review bito-code-review Bot 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.

Code Review Agent Run #315649

Actionable Suggestions - 4
  • tests/unit_tests/jinja_context_test.py - 1
  • superset/utils/network.py - 1
  • tests/unit_tests/extensions/storage/test_api.py - 1
  • tests/unit_tests/daos/test_tasks.py - 1
Additional Suggestions - 3
  • tests/unit_tests/tasks/test_filters.py - 1
    • Incorrect fixture parameter type · Line 28-28
      The `app_context` parameter is annotated as `None`, but the fixture's actual return type is `Iterator[None]`. Update the parameter type to `Iterator[None]` for accurate type checking and to prevent mypy warnings.
  • superset/extensions/storage/api.py - 1
    • CWE-356: Cache-Disabling Product UI · Line 100-100
      Inline import of `jsonify` should move to module-level per BITO.md rule [12745]: imports should only be inline to prevent circular dependencies, and such cases must include an explanatory comment. Since `from flask import g, request` is already at module level without circular import issues, `jsonify` should follow the same pattern for consistency.
  • tests/unit_tests/commands/databases/oauth2_test.py - 1
    • Incomplete security validation coverage · Line 218-235
      The test covers `get_user_id` returning `None` and user ID mismatch, but the third security check in `validate()` — `security_manager.is_guest_user()` — is untested. Add a case where `get_user_id` returns 1 (matching state) but the user is a guest.
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset/extensions/cache_middleware.py - 1
    • Incomplete _info endpoint exclusion · Line 32-33
Review Details
  • Files reviewed - 25 · Commit Range: 44bf81c..d5cf4c6
    • superset/commands/database/oauth2.py
    • superset/commands/dataset/importers/v1/utils.py
    • superset/common/query_context_processor.py
    • superset/extensions/cache_middleware.py
    • superset/extensions/storage/api.py
    • superset/jinja_context.py
    • superset/security/manager.py
    • superset/tasks/context.py
    • superset/tasks/decorators.py
    • superset/tasks/filters.py
    • superset/tasks/manager.py
    • superset/tasks/scheduler.py
    • superset/utils/link_redirect.py
    • superset/utils/network.py
    • tests/unit_tests/commands/databases/oauth2_test.py
    • tests/unit_tests/common/test_query_context_processor.py
    • tests/unit_tests/daos/test_tasks.py
    • tests/unit_tests/databases/api_test.py
    • tests/unit_tests/datasets/commands/importers/v1/import_test.py
    • tests/unit_tests/extensions/storage/test_api.py
    • tests/unit_tests/extensions/test_cache_middleware.py
    • tests/unit_tests/jinja_context_test.py
    • tests/unit_tests/security/manager_test.py
    • tests/unit_tests/tasks/test_filters.py
    • tests/unit_tests/utils/test_link_redirect.py
  • Files skipped - 1
    • UPDATING.md - Reason: Filter setting
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Comment thread tests/unit_tests/jinja_context_test.py
Comment thread superset/utils/network.py
Comment thread tests/unit_tests/extensions/storage/test_api.py Outdated
Comment thread tests/unit_tests/daos/test_tasks.py
@bito-code-review

bito-code-review Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #4181d0

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: d5cf4c6..cee3f80
    • tests/unit_tests/extensions/storage/test_api.py
    • tests/unit_tests/utils/test_network.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

rusackas and others added 8 commits August 15, 2026 03:55
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…proxies on guarded import fetch

TaskFilter fails closed for request-bound principals; internal executor reads use the existing skip_base_filter path so task execution still loads its own task. Import fetch disables proxies so peer validation checks the destination.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sts for session binding

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stored values are scoped to the requesting user, so the cache-control
header on ExtensionStorageRestApi.response() needs coverage to catch a
silent regression.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses review feedback: adds a unit test asserting load_data's opener
disables proxy usage when DATASET_IMPORT_ALLOW_INTERNAL_DATA_URLS is False,
and documents the behavior change for deployments relying on an egress
proxy for dataset import URLs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…inding

The callback now requires an authenticated user whose id matches the one
carried in the OAuth2 state, so this test (added on master after this
branch was cut) short-circuited before reaching the token exchange and
never emitted the log line it asserts on. Patch `get_user_id` the same
way the four sibling tests in this file already do.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…code

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rusackas
rusackas force-pushed the fix/request-and-embedded-hardening branch from cee3f80 to b30d92f Compare August 15, 2026 11:08
@bito-code-review

bito-code-review Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #aa69d1

Actionable Suggestions - 0
Additional Suggestions - 6
  • superset/jinja_context.py - 2
    • CWE-345: Weak allowlist validation for token datasets · Line 1291-1293
      The `isinstance(allowed_datasets, list)` check accepts any list (e.g., `[str, str]`), while `security_manager._guest_token_allows_dataset` additionally validates `all(isinstance(d, int) for d in allowed_datasets)`. An attacker who somehow crafts a token with non-integer IDs in `datasets` would bypass the allowlist restriction here but fail the other guard, creating inconsistent authorization across the codebase.
    • Missing unit test for new authorization helper · Line 1275-1300
      The new `guest_user_can_access_dataset` function lacks its own unit test — coverage relies on the `metric_macro` integration test. Without direct tests, future refactors may break the authorization logic undetected.
  • superset/commands/dataset/importers/v1/utils.py - 1
    • Missing tests for SSRF helpers · Line 82-120
      No unit tests exist for `_raise_for_unsafe_peer`, `_PeerValidatingHTTPSConnection`, `_PeerValidatingHTTPHandler`, or `_PeerValidatingHTTPSHandler`. The existing `test_peer_validating_connection_blocks_rebound_peer` covers only `_PeerValidatingHTTPConnection` for link-local (169.254.0.0/16). The other 4 new symbols are completely untested, including all other unsafe network categories and the HTTPS path.
  • tests/unit_tests/databases/api_test.py - 3
    • Missing explanation for mock · Line 713-716
      Consider adding a brief comment above the `get_user_id` mock (e.g., `# Simulate authenticated user — client fixture has no Flask session context`) so future maintainers understand why this patch exists and why it is safe.
    • Missing explanation for mock · Line 793-796
      Apply the same explanatory comment (see feedback on lines 713-716) for consistency across all three OAuth2 test functions.
    • Missing explanation for mock · Line 878-881
      Apply the same explanatory comment (see feedback on lines 713-716) for consistency across all three OAuth2 test functions.
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • tests/unit_tests/datasets/commands/importers/v1/import_test.py - 1
  • superset/utils/link_redirect.py - 1
    • CWE-20: Single backslash slips protocol-relative guard · Line 147-150
Review Details
  • Files reviewed - 26 · Commit Range: b7c4c9b..b30d92f
    • superset/commands/database/oauth2.py
    • superset/commands/dataset/importers/v1/utils.py
    • superset/common/query_context_processor.py
    • superset/extensions/cache_middleware.py
    • superset/extensions/storage/api.py
    • superset/jinja_context.py
    • superset/security/manager.py
    • superset/tasks/context.py
    • superset/tasks/decorators.py
    • superset/tasks/filters.py
    • superset/tasks/manager.py
    • superset/tasks/scheduler.py
    • superset/utils/link_redirect.py
    • superset/utils/network.py
    • tests/unit_tests/commands/databases/oauth2_test.py
    • tests/unit_tests/common/test_query_context_processor.py
    • tests/unit_tests/daos/test_tasks.py
    • tests/unit_tests/databases/api_test.py
    • tests/unit_tests/datasets/commands/importers/v1/import_test.py
    • tests/unit_tests/extensions/storage/test_api.py
    • tests/unit_tests/extensions/test_cache_middleware.py
    • tests/unit_tests/jinja_context_test.py
    • tests/unit_tests/security/manager_test.py
    • tests/unit_tests/tasks/test_filters.py
    • tests/unit_tests/utils/test_link_redirect.py
    • tests/unit_tests/utils/test_network.py
  • Files skipped - 1
    • UPDATING.md - Reason: Filter setting
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@villebro villebro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The `skip_base_filters changes look concerning. Let's make sure they're safe, so if you could double check that those paths are safe and don't cause privilege escalation.

Comment thread superset/tasks/context.py
Comment thread superset/tasks/decorators.py

@villebro villebro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit ae54c8a
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a83ae9547a405000898dc15
😎 Deploy Preview https://deploy-preview-42930--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

…ilter

TaskFilter's docstring now states the request-scoped vs. internal-
plumbing split explicitly, and each skip_base_filter=True call site in
the executor/scheduler points back to it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@rusackas
rusackas force-pushed the fix/request-and-embedded-hardening branch from ae54c8a to 62e4d46 Compare August 18, 2026 01:07
@bito-code-review

bito-code-review Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #ce93b8

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: b30d92f..62e4d46
    • superset/tasks/context.py
    • superset/tasks/decorators.py
    • superset/tasks/filters.py
    • superset/tasks/manager.py
    • superset/tasks/scheduler.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas
rusackas merged commit 13eb47a into master Aug 18, 2026
73 of 75 checks passed
@rusackas
rusackas deleted the fix/request-and-embedded-hardening branch August 18, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API authentication Related to authentication global:jinja Related to Jinja templating infra:caching Infra setup and configuration related to caching merge-if-green If approved and tests are green, please go ahead and merge it for me preset-io size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants