korbit-ai[bot] commented on code in PR #31796:
URL: https://github.com/apache/superset/pull/31796#discussion_r1920667279


##########
docker/pythonpath_dev/superset_config.py:
##########
@@ -107,6 +108,18 @@ class CeleryConfig:
 log_level_text = os.getenv("SUPERSET_LOG_LEVEL", "INFO")
 LOG_LEVEL = getattr(logging, log_level_text.upper(), logging.INFO)
 
+if os.getenv("CYPRESS_CONFIG") == "true":
+    # When running the service as a cypress backend, we need to import the 
config
+    # located @ tests/integration_tests/superset_test_config.py
+    base_dir = os.path.dirname(__file__)
+    module_folder = os.path.abspath(
+        os.path.join(base_dir, "../../tests/integration_tests/")
+    )
+    sys.path.insert(0, module_folder)
+    from superset_test_config import *  # noqa

Review Comment:
   Hi @mistercrunch, I understand your usage of `# noqa` to suppress linter 
warnings. However, the comment about the relative and wildcard imports isn't 
about linting — it's more of a security concern. While `# noqa` will keep 
linters from complaining, it won't address the potential security risks tied to 
your import. My suggestion would be to replace the wildcard import with 
explicit imports of the attributes you really need, and switch to absolute path 
when importing the `superset_test_config.py`. Appreciate your efforts!



-- 
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]

Reply via email to