Repository navigation
fix(schemas): tighten guest dataset fields, external_url protocols, ssh creds, prophet bounds - #40640
Conversation
Code Review Agent Run #fcbf24Actionable Suggestions - 0Additional Suggestions - 2
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40640 +/- ##
==========================================
+ Coverage 64.07% 64.12% +0.05%
==========================================
Files 2653 2653
Lines 143602 143646 +44
Branches 33132 33140 +8
==========================================
+ Hits 92008 92115 +107
+ Misses 49979 49913 -66
- Partials 1615 1618 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR hardens several backend Marshmallow schemas to reduce accidental exposure of sensitive fields and to enforce safer/bounded inputs for externally managed objects and Prophet post-processing options.
Changes:
- Strip additional dataset fields from guest-user dashboard dataset responses to avoid leaking internal query/connection details.
- Add a reusable
external_urlvalidator to restrict schemes tohttp/httpsand apply it to chart/dashboard schemas. - Prevent SSH tunnel credentials from ever being serialized by schemas (
load_only=True) and bound Prophetperiodswith a configurable maximum.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_tests/databases/schema_tests.py | Adds coverage ensuring SSH tunnel credential fields load but never dump. |
| tests/unit_tests/dashboards/schema_tests.py | Adds coverage for guest dataset field stripping and external_url scheme validation. |
| tests/unit_tests/charts/test_schemas.py | Adds coverage for Prophet periods bounds and chart external_url scheme validation. |
| superset/utils/schema.py | Introduces validate_external_url restricting schemes to http/https. |
| superset/databases/schemas.py | Marks SSH tunnel credential fields as load_only to prevent serialization. |
| superset/dashboards/schemas.py | Expands guest-user dataset field removal and validates external_url. |
| superset/config.py | Adds MAX_PROPHET_PERIODS configuration default. |
| superset/charts/schemas.py | Adds bounded validation for Prophet periods and validates external_url. |
Code Review Agent Run #4d43a1Actionable Suggestions - 0Additional Suggestions - 1
Filtered by Review RulesBito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
9a35374 to
ce27878
Compare
Code Review Agent Run #7a1143Actionable Suggestions - 0Additional Suggestions - 3
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
aminghadersohi
left a comment
There was a problem hiding this comment.
PR #40640 — fix(schemas): tighten guest dataset fields, external_url protocols, ssh creds, prophet bounds
HEAD SHA: a5b8577
Scan Coverage — 19 scans run on all changed Python
Files: superset/utils/schema.py (+33), superset/charts/schemas.py (+43),
superset/dashboards/schemas.py (+67), superset/databases/schemas.py (+6),
superset/config.py (+4), plus all three new test files
Scan 1 (inline imports): 0 violations
Scan 2 (config.get with defaults): 1 match — get_max_prophet_periods uses
.config.get() with explicit fallback for
an optional config key; intentional, NIT only
Scan 3 (f-string logging): 0 violations
Scan 4 (broad exception handling): 0 violations — RuntimeError and
(TypeError, ValueError) are specific
Scan 5 (sensitive info in errors): 0 violations
Scan 6 (mutable module globals): 1 match — ALLOWED_URL_SCHEMES is a
mutable set; NIT only
Scan 7 (print statements): 0 violations
Scan 8 (db.session.commit in DAOs): 0 violations
Scan 9 (JWT without verification): 0 violations
Scan 10 (hardcoded values): 0 violations
Scan 11 (missing test type hints): 0 violations — all test functions -> None
Scan 12 (Any type usage): 0 violations in new code
Scan 13 (module-level app context): 0 violations — all current_app access
wrapped in try/except RuntimeError
Scan 14 (SQL injection / RLS bypass): 0 violations
Scan 15 (private symbol imports): 0 violations
Scan 16 (or-default collapsing falsy): 0 violations
Scan 17 (compound boolean sans parens): 0 violations
Scan 18 (migration boolean-filter risk): 0 violations — no migrations
Scan 19 (async HTTP without timeout): 0 violations
Security walk-through
validate_external_url — allowlist-based ({"http","https"}), fails closed on all
other schemes. urlparse normalises scheme to lowercase before the explicit .lower()
call; both checks are redundant but harmless. Correctly rejects javascript:,
data:, vbscript:, file:, scheme-relative //evil.com (empty scheme), and
host-less https:foo (netloc check). ✓
validate_prophet_periods — calls get_max_prophet_periods() at request time, not
import time, so the configurable ceiling applies even if the config is set after
module load. Range(min=1) blocks zero and negative periods. Confidence-interval
bound is (0, 1) exclusive, which is mathematically correct. ✓
SSH load_only=True — idiomatic Marshmallow pattern; prevents raw credential
values appearing in any schema dump path. PR description confirms the masked-
placeholder UI goes through SSHTunnel.data / mask_password_info directly, not
through schema dump. ✓
Guest dataset field stripping — six new sensitive fields (sql, select_star,
perm, edit_url, fetch_values_predicate, template_params) stripped via safe
.pop(key, None). ✓
validate_css — four patterns (expression(), script-scheme URI, @import,
url(+script-scheme)), case-insensitive, no ReDoS risk (no nested quantifiers). ✓
BLOCKER
None.
HIGH
None.
MEDIUM
[superset/dashboards/schemas.py:141] validate_css matches raw strings without CSS
escape expansion. url(\6a avascript:alert(1)) (CSS hex-encode of 'j') passes the
regex but a CSS parser expands the escape. Modern browsers do not execute JavaScript
via CSS url() background properties, so this is not an immediately exploitable
vector, and the docstring correctly labels this "lightweight input hardening". A
one-line note would prevent future maintainers from treating the validator as
comprehensive and removing other defences.
Suggestion: add to the docstring body: "CSS escape sequences (e.g. \\6a avascript:) are not expanded before matching; this validator is a first-line
filter, not a complete XSS sanitiser."
[superset/dashboards/schemas.py:360–361] Pre-existing (not introduced by this PR):
del serialized["owners"] / del serialized["database"] raise KeyError for a
dataset object whose database or owners attribute is absent from the Marshmallow
dump (Marshmallow omits Nested/List keys when the attribute is absent and no
dump_default is set). The six new fields in this same PR correctly use .pop(key, None), so there is a visible inconsistency in the same function body.
Suggestion: serialized.pop("owners", None) / serialized.pop("database", None)
to match the pattern used immediately below.
NIT
[superset/utils/schema.py:24] ALLOWED_URL_SCHEMES = {"http", "https"} — using
frozenset would signal immutability and prevent accidental mutation.
[tests/unit_tests/charts/test_schemas.py] test_chart_external_url_rejects_non_absolute
covers "https://" (empty host) but not "//evil.com" (scheme-relative, scheme="").
The code rejects it correctly but no test confirms this specific attack vector.
[tests/unit_tests/dashboards/schema_tests.py] validate_css is wired to
DashboardCopySchema (schemas.py:445) but only DashboardPostSchema and
DashboardPutSchema have CSS-rejection tests. DashboardCopySchema is untested.
0 BLOCKER · 0 HIGH · 2 MEDIUM · 3 NIT
CI: 22 success, 0 failures, 6 skipped, 2 neutral
mergeable=true, mergeable_state=blocked (needs approval only)
Labels: size/L, maintain — no hold label
…sh creds, prophet bounds Several schema-hardening improvements: - DashboardDatasetSchema: guest users no longer receive sql, select_star, perm, edit_url, fetch_values_predicate or template_params in addition to the previously removed owners/database. - external_url fields on chart and dashboard schemas now reject any scheme other than http/https via a reusable validate_external_url validator. - DatabaseSSHTunnel credential fields (password, private_key, private_key_password) are marked load_only so they are accepted on input but never serialized in responses; masked response paths are unaffected. - ChartDataProphetOptionsSchema.periods now has an upper bound read from the new MAX_PROPHET_PERIODS config (default 10000). Adds unit tests covering each behavior. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Add `from typing import Any` and use `dict[str, Any]` return type on `_dataset_payload()` to satisfy the `type-arg` mypy rule. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The dashboard `css` field is user-supplied and persisted verbatim, then re-served into the dashboard page. Add a lightweight marshmallow validator that rejects known-dangerous CSS constructs (expression(), script-scheme URIs, @import, and url() pointing at a script scheme) while leaving ordinary styling -- including image/relative/data: url() references -- untouched. Applied to the Post, Put, and Copy dashboard schemas. Covered by unit tests that assert legitimate CSS passes and dangerous constructs are rejected. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…_url Address review feedback: - get_max_prophet_periods now coerces the config value to int (handling string overrides such as os.getenv) and falls back to the default for invalid or non-positive values, avoiding a TypeError in Range. - validate_prophet_periods captures the configured max once. - validate_external_url now requires a non-empty netloc so hostless values like 'https:foo' are rejected. Co-Authored-By: Claude Opus 4.8 <[email protected]>
a5b8577 to
dca4967
Compare
|
| Language | Fuzzy before | Fuzzy after | New |
|---|---|---|---|
ar |
1139 | 1140 | +1 |
ca |
818 | 819 | +1 |
cs |
790 | 791 | +1 |
de |
1000 | 1001 | +1 |
fi |
4826 | 4827 | +1 |
fr |
1017 | 1018 | +1 |
ja |
325 | 326 | +1 |
lv |
298 | 299 | +1 |
mi |
810 | 811 | +1 |
nl |
1146 | 1147 | +1 |
ru |
296 | 297 | +1 |
sk |
777 | 778 | +1 |
sl |
966 | 967 | +1 |
th |
4826 | 4827 | +1 |
uk |
296 | 297 | +1 |
How to fix
1. Install dependencies (if not already set up):
pip install -r superset/translations/requirements.txt
sudo apt-get install gettext # or: brew install gettext2. Re-extract strings and sync .po files:
./scripts/translations/babel_update.shThis rewrites superset/translations/messages.pot from the current source files and merges the changes into every .po file. Strings whose msgid changed will be marked #, fuzzy.
3. Resolve the fuzzy entries in the affected language files (ar, ca, cs, de, fi, fr, ja, lv, mi, nl, ru, sk, sl, th, uk):
grep -n '#, fuzzy' superset/translations/<lang>/LC_MESSAGES/messages.poFor each fuzzy entry, either rewrite the msgstr to match the new string and remove the #, fuzzy line, or clear the msgstr to "" if you cannot provide a translation.
4. Commit your changes to the .po files.
The new Prophet `periods` validation message is close enough to existing translated strings that pybabel fuzzy-matches it onto them, which the translation-regression check flags as an invalidated translation. Add the new msgid to the .pot and per-locale catalogs as an untranslated entry so pybabel finds an exact match and no longer marks an existing translation fuzzy. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Code Review Agent Run #a0dd3d
Actionable Suggestions - 5
-
superset/translations/ru/LC_MESSAGES/messages.po - 1
- Missing Russian translation · Line 16991-16993
-
superset/translations/es/LC_MESSAGES/messages.po - 1
- Missing Spanish translation · Line 18136-18136
-
superset/translations/fr/LC_MESSAGES/messages.po - 1
- Missing French translation · Line 17947-17947
-
superset/translations/ja/LC_MESSAGES/messages.po - 1
- Incomplete Japanese translation · Line 15967-15969
-
superset/translations/mi/LC_MESSAGES/messages.po - 1
- Missing Māori translation for error message · Line 17346-17346
Additional Suggestions - 11
-
superset/utils/schema.py - 1
-
Missing unit tests for validator · Line 59-85The `validate_external_url` function lacks direct unit tests. Existing tests in `test_schemas.py` exercise the validator indirectly through schema loading, but don't test the validator function in isolation. Per BITO.md rule [11730], new tools/validators should have dedicated unit tests covering success paths, error scenarios, and edge cases.
-
-
superset/translations/de/LC_MESSAGES/messages.po - 1
-
Missing German translation · Line 17799-17800The German `msgstr` is empty. German users will see the untranslated English error message "`periods` must be between 1 and %(max)s" when Prophet validation fails. Provide a German translation maintaining the `%(max)s` format placeholder.
Code suggestion
--- a/superset/translations/de/LC_MESSAGES/messages.po +++ b/superset/translations/de/LC_MESSAGES/messages.po @@ -17797,6 +17797,7 @@ msgstr "'operation'-Eigenschaft des Nachbearbeitungsobjekts undefiniert" #, python-format msgid "`periods` must be between 1 and %(max)s" -msgstr "" +msgstr "Der Wert für \`periods\` muss zwischen 1 und %(max)s liegen" msgid "`prophet` package not installed"
-
-
superset/translations/lv/LC_MESSAGES/messages.po - 1
-
Missing translation string · Line 17007-17007The `msgstr` is empty, leaving Latvian users with untranslated English text. Provide the Latvian translation while preserving the `%(max)s` format variable as indicated by the `# python-format` comment.
Code suggestion
@@ -17005,3 +17005,3 @@ #, python-format msgid "`periods` must be between 1 and %(max)s" -msgstr "" +msgstr "`periods` jābūt starp 1 un %(max)s"
-
-
superset/translations/th/LC_MESSAGES/messages.po - 1
-
Empty Thai translation entry · Line 30105-30105The Thai translation for "`periods` must be between 1 and %(max)s" is empty (line 30105). Thai users will see raw English error text instead of a localized message. Similar messages in this file (e.g., confidence_interval on line 30081) have Thai translations. This empty `msgstr` defeats the purpose of i18n for the period validation error in Prophet charts.
-
-
superset/translations/pl/LC_MESSAGES/messages.po - 1
-
Missing Polish translation · Line 18192-18192The `msgstr` is empty for this validation error message. Polish users will see the untranslated English text when this error is triggered. Compare with similar range validation messages in the same file (e.g., "Przedział ufności musi...") for translation style consistency.
-
-
superset/translations/zh_TW/LC_MESSAGES/messages.po - 1
-
Missing zh_TW translation · Line 17214-17214The `msgstr` field is empty, so users with zh_TW locale will see the untranslated English message "`periods` must be between 1 and %(max)s" instead of Chinese. This affects the user experience for Prophet chart validation errors. Compare with similar validation messages in the same file that have proper translations.
-
-
superset/translations/zh/LC_MESSAGES/messages.po - 1
-
Missing Chinese translation · Line 17199-17201Please add a Chinese translation for the new `msgid "`periods` must be between 1 and %(max)s"` entry’s `msgstr`, for example:
msgstr "预测期数(periods)必须在 1 到 %(max)s 之间"
-
-
superset/translations/sl/LC_MESSAGES/messages.po - 1
-
Missing translation for error message · Line 17400-17402The translation for "`periods` must be between 1 and %(max)s" is empty. Slovenian-speaking users will see the untranslated English text. When providing the translation, ensure the `%(max)s` placeholder is preserved so the dynamic value is injected correctly at runtime.
-
-
superset/translations/ko/LC_MESSAGES/messages.po - 1
-
Missing Korean translation · Line 16858-16858The `msgstr` is empty, so Korean users will see the untranslated English error message "`periods` must be between 1 and %(max)s" when validation fails. Add a Korean translation to properly localize this user-facing error message.
-
-
superset/translations/ca/LC_MESSAGES/messages.po - 1
-
Missing Catalan translation · Line 17424-17425The `msgstr` is empty, so Catalan users will see the untranslated English error message. Consider adding a Catalan translation following the pattern of other translated messages in this file.
-
-
superset/translations/ar/LC_MESSAGES/messages.po - 1
-
Missing Arabic translation · Line 17415-17417The `msgstr` is empty, so Arabic users will see the English error message '`periods` must be between 1 and %(max)s' instead of a localized message. Consider adding an Arabic translation to complete the internationalization.
-
Review Details
-
Files reviewed - 35 · Commit Range:
a1645af..744701f- superset/charts/schemas.py
- superset/config.py
- superset/dashboards/schemas.py
- superset/databases/schemas.py
- superset/translations/ar/LC_MESSAGES/messages.po
- superset/translations/ca/LC_MESSAGES/messages.po
- superset/translations/cs/LC_MESSAGES/messages.po
- superset/translations/de/LC_MESSAGES/messages.po
- superset/translations/en/LC_MESSAGES/messages.po
- superset/translations/es/LC_MESSAGES/messages.po
- superset/translations/fa/LC_MESSAGES/messages.po
- superset/translations/fi/LC_MESSAGES/messages.po
- superset/translations/fr/LC_MESSAGES/messages.po
- superset/translations/it/LC_MESSAGES/messages.po
- superset/translations/ja/LC_MESSAGES/messages.po
- superset/translations/ko/LC_MESSAGES/messages.po
- superset/translations/lv/LC_MESSAGES/messages.po
- superset/translations/messages.pot
- superset/translations/mi/LC_MESSAGES/messages.po
- superset/translations/nl/LC_MESSAGES/messages.po
- superset/translations/pl/LC_MESSAGES/messages.po
- superset/translations/pt/LC_MESSAGES/messages.po
- superset/translations/pt_BR/LC_MESSAGES/messages.po
- superset/translations/ru/LC_MESSAGES/messages.po
- superset/translations/sk/LC_MESSAGES/messages.po
- superset/translations/sl/LC_MESSAGES/messages.po
- superset/translations/th/LC_MESSAGES/messages.po
- superset/translations/tr/LC_MESSAGES/messages.po
- superset/translations/uk/LC_MESSAGES/messages.po
- superset/translations/zh/LC_MESSAGES/messages.po
- superset/translations/zh_TW/LC_MESSAGES/messages.po
- superset/utils/schema.py
- tests/unit_tests/charts/test_schemas.py
- tests/unit_tests/dashboards/schema_tests.py
- tests/unit_tests/databases/schema_tests.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ 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 [email protected].
Documentation & Help
|
Oh, @rebenitez1802 you might not need to look at this, but it couldn't hurt! Just need a codeowner stamp from @sfirke on this one. |
|
@rusackas this is good to merge. Any reason why this was one omnibus PR instead of 4 smaller ones? It wasn't a problem but these problems don't seem intrinsically related. |
|
@sfirke when the PR list grew north of 100 open ones, some "just combine small things" may have occurred for a moment ;) But now the dust is finally settling. |
validate_css (added in apache#40640) blocked expression(), script-scheme URIs, and @import on dashboard create/update, but two gaps let it through: - ImportV1DashboardSchema.css had no validator at all, so a YAML/ZIP dashboard import bypassed the check entirely while the create/update API paths enforced it. Custom CSS is injected into the page unsanitised (injectCustomCss.ts sets style.innerHTML directly), so an imported @import genuinely executes at render. - DashboardPutSchema.css re-validated on every PUT, and a dashboard save resends the full object (renaming, moving a chart, editing a filter all go through the same PUT). A dashboard whose existing css already contained @import -- whether from before this check existed, or via the import bypass above -- became uneditable for any change, not just a change to css. This adds validate_css to the import schema to close the bypass, and moves PUT-path enforcement from the schema to UpdateDashboardCommand, which only validates css when the incoming value actually differs from what's stored. New css, or css changed to a different dangerous value, is still rejected exactly as before.
validate_css (added in apache#40640) blocked expression(), script-scheme URIs, and @import on dashboard create/update, but two gaps let it through: - ImportV1DashboardSchema.css had no validator at all, so a YAML/ZIP dashboard import bypassed the check entirely while the create/update API paths enforced it. Custom CSS is injected into the page unsanitised (injectCustomCss.ts sets style.innerHTML directly), so an imported @import genuinely executes at render. - DashboardPutSchema.css re-validated on every PUT, and a dashboard save resends the full object (renaming, moving a chart, editing a filter all go through the same PUT). A dashboard whose existing css already contained @import -- whether from before this check existed, or via the import bypass above -- became uneditable for any change, not just a change to css. This adds validate_css to the import schema to close the bypass, and moves PUT-path enforcement from the schema to UpdateDashboardCommand, which only validates css when the incoming value actually differs from what's stored. New css, or css changed to a different dangerous value, is still rejected exactly as before.
validate_css (added in apache#40640) blocked expression(), script-scheme URIs, and @import on dashboard create/update, but two gaps let it through: - ImportV1DashboardSchema.css had no validator at all, so a YAML/ZIP dashboard import bypassed the check entirely while the create/update API paths enforced it. Custom CSS is injected into the page unsanitised (injectCustomCss.ts sets style.innerHTML directly), so an imported @import genuinely executes at render. - DashboardPutSchema.css re-validated on every PUT, and a dashboard save resends the full object (renaming, moving a chart, editing a filter all go through the same PUT). A dashboard whose existing css already contained @import -- whether from before this check existed, or via the import bypass above -- became uneditable for any change, not just a change to css. This adds validate_css to the import schema to close the bypass, and moves PUT-path enforcement from the schema to UpdateDashboardCommand, which only validates css when the incoming value actually differs from what's stored. New css, or css changed to a different dangerous value, is still rejected exactly as before.
validate_css (added in apache#40640) blocked expression(), script-scheme URIs, and @import on dashboard create/update, but two gaps let it through: - ImportV1DashboardSchema.css had no validator at all, so a YAML/ZIP dashboard import bypassed the check entirely while the create/update API paths enforced it. Custom CSS is injected into the page unsanitised (injectCustomCss.ts sets style.innerHTML directly), so an imported @import genuinely executes at render. - DashboardPutSchema.css re-validated on every PUT, and a dashboard save resends the full object (renaming, moving a chart, editing a filter all go through the same PUT). A dashboard whose existing css already contained @import -- whether from before this check existed, or via the import bypass above -- became uneditable for any change, not just a change to css. This adds validate_css to the import schema to close the bypass, and moves PUT-path enforcement from the schema to UpdateDashboardCommand, which only validates css when the incoming value actually differs from what's stored. New css, or css changed to a different dangerous value, is still rejected exactly as before.
SUMMARY
This PR applies four small, independent schema-hardening fixes:
Guest dataset field filtering (
superset/dashboards/schemas.py):DashboardDatasetSchema.post_dumppreviously removed onlyownersanddatabasefor guest users. It now also removessql,select_star,perm,edit_url,fetch_values_predicateandtemplate_params, soguest tokens never receive internal connection or query details. Removal
is guarded with
pop(..., None)for absent keys.External URL protocol validation (
superset/charts/schemas.py,superset/dashboards/schemas.py): theexternal_urlfield accepted anystring. A reusable
validate_external_urlvalidator (insuperset/utils/schema.py) now restricts accepted values tohttp/httpsschemes, rejecting
javascript:,data:,vbscript:, etc. Empty/Nonevalues remain allowed since the field is optional.
external_urlon theseexternally-managed objects is always an absolute URL, so requiring an
http(s) scheme is safe.
SSH tunnel credential output-safety (
superset/databases/schemas.py):password,private_keyandprivate_key_passwordonDatabaseSSHTunnelare now
load_only=True— accepted on input but never serialized inresponses. Verified that every response path which surfaces these to the
client does so via explicit masking (
SSHTunnel.dataandmask_password_infoinsuperset/databases/api.py), which overwrites orbypasses the schema's own dump. The masked-placeholder UX is therefore
unaffected;
load_onlyonly prevents the schema from ever emitting rawvalues on its own.
Prophet periods bound (
superset/charts/schemas.py):ChartDataProphetOptionsSchema.periodslacked an upper bound. It nowvalidates
1 <= periods <= MAX_PROPHET_PERIODS, where the max is read froma new
MAX_PROPHET_PERIODSconfig (default10000, added tosuperset/config.py).confidence_intervalalready had a bound.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — backend schema changes only.
TESTING INSTRUCTIONS
Run the schema unit tests:
New tests cover: guest filtering removes the new fields (and non-guests keep
them);
external_urlrejectsjavascript:/data:/vbscript:and acceptshttps; prophet
periodsover max and below min raiseValidationErrorwhilevalid values pass; SSH tunnel credential fields load but never dump.
ADDITIONAL INFORMATION
🤖 Generated with Claude Code