You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/04/22 23:30:42 UTC
Re: [PR] fix(mcp): hide user directory metadata from responses [superset]
Copilot commented on code in PR #39576:
URL: https://github.com/apache/superset/pull/39576#discussion_r3127420094
##########
superset/mcp_service/utils/permissions_utils.py:
##########
@@ -34,24 +36,17 @@
"sql", # Raw SQL queries may contain sensitive logic
"extra", # May contain connection strings or credentials
"database_id", # Internal database references
- "changed_by_fk", # Internal user references
- "created_by_fk", # Internal user references
},
"chart": {
"query_context", # May contain sensitive filters or parameters
"cache_key", # Internal cache references
- "changed_by_fk", # Internal user references
- "created_by_fk", # Internal user references
},
"dashboard": {
"css", # May contain sensitive styling info
- "changed_by_fk", # Internal user references
- "created_by_fk", # Internal user references
},
"common": {
"uuid", # Internal identifiers (keep for some use cases)
- "changed_by_fk", # Internal user references
- "created_by_fk", # Internal user references
+ *USER_DIRECTORY_FIELDS,
},
}
Review Comment:
`SENSITIVE_FIELDS["common"]` now includes `USER_DIRECTORY_FIELDS`, but `get_allowed_fields()` will still allow any “sensitive” field that lacks an explicit entry in `SENSITIVE_FIELD_PERMISSIONS` for authenticated users (the current `elif not required_permission: allowed_fields.add(field)` branch). If the goal is defense-in-depth privacy (i.e., ensure user-directory fields are *always* stripped even if a tool accidentally includes them), consider explicitly denying/removing `USER_DIRECTORY_FIELDS` in `filter_sensitive_data()` (or adding explicit permission rules) rather than only classifying them as sensitive.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org