[hermes] bstein_home: python:S2208 #42
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 hides which names actually enter this module's namespace. The facade depends on those names being present onsys.modules[__name__](passed to the register functions asdeps), so they need to be imported explicitly by name rather than via*.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 star import with an explicit named import of every public name thataccess_request_stateexports (its__all__if defined, otherwise its public module-level names). This keeps the exact same set of attributes on the facade module, sosys.modules[__name__]still exposes everything the register functions and any test patches (access_requests.<name>) rely on, while satisfying S2208. The# noqa: F403comment can be dropped since there is no longer a wildcard import; the names are re-exported (not locally used), so keep a short comment noting they are intentional re-exports for... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_354b87fda9a3495fbf3d803e5683b94b). Hermes has no write access to this repository; no files or infrastructure were changed.