bito-code-review[bot] commented on code in PR #36010:
URL: https://github.com/apache/superset/pull/36010#discussion_r2496366833
##########
superset/config.py:
##########
@@ -1869,7 +1869,8 @@ def EMAIL_HEADER_MUTATOR( # pylint:
disable=invalid-name,unused-argument # noq
CONTENT_SECURITY_POLICY_WARNING = True
# Do you want Talisman enabled?
-TALISMAN_ENABLED = utils.cast_to_boolean(os.environ.get("TALISMAN_ENABLED",
True))
+# TALISMAN_ENABLED = utils.cast_to_boolean(os.environ.get("TALISMAN_ENABLED",
True))
+TALISMAN_ENABLED = False
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Hardcoded security configuration</b></div>
<div id="fix">
Hardcoding TALISMAN_ENABLED to False prevents the environment variable from
controlling the security feature. This could disable CSP protection when it
should be enabled, potentially exposing the application to XSS attacks. The
initialization code in `superset/initialization/__init__.py` relies on this
config to enable Talisman.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
@@ -1869,7 +1869,4 @@n CONTENT_SECURITY_POLICY_WARNING = Truen n # Do you
want Talisman enabled?n TALISMAN_ENABLED =
utils.cast_to_boolean(os.environ.get("TALISMAN_ENABLED", True))n n # If you
want Talisman, how do you want it configured??
```
</div>
</details>
</div>
<small><i>Code Review Run <a
href=https://github.com/apache/superset/pull/36010#issuecomment-3493747560>#eb2061</a></i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]