[hermes] bstein_home: python:S2208 #475
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SonarQube reports python:S2208 in
backend/atlas_portal/routes/access_requests.py. The build is green; this is a standing finding, not a failure.What is wrong
Line 8 uses a wildcard import (
from .access_request_state import *), which SonarQube flags because it hides which names the module actually pulls in and can silently shadow or leak names. The star import is load-bearing here: it re-exports access_request_state's public names as attributes of this module so tests can patch them viadeps = sys.modules[__name__], so the fix must enumerate those same names explicitly rather than drop the re-export.Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
backend/atlas_portal/routes/access_requests.py:8)Suggested fix (not applied)
Hermes could not open a pull request for this, so the change below was not written, validated, or pushed anywhere. It is a starting point for whoever picks this up, not a reviewed patch.
backend/atlas_portal/routes/access_requests.py— Replace the wildcard with an explicit import of every public name from access_request_state (its__all__if defined, otherwise every top-level name not starting with an underscore). This keeps each name bound as a module attribute on access_requests, so the existing patch surface used bydeps = sys.modules[__name__]and by tests that monkeypatchaccess_requests.<name>is preserved exactly, while satisfying S2208 and letting the# noqa: F403be removed. The maintainer must fill in the real name list from access_request_state.py, which was not available to me for verification.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_65f5f39217534ae386592953aa8bba90). Hermes has no write access to this repository; no files or infrastructure were changed.