[hermes] bstein_home: python:S2208 #664
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 *), so this file no longer says which names the facade re-exports, and any new public name added to access_request_state silently becomes part of this module's surface. The wildcard is deliberate — it binds the state module's names onto this module so sys.modules[name] works as the deps/monkeypatch object — but the identical effect is achieved by importing the same names explicitly.
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 on line 8 with an explicit parenthesised import of the exact set of names the wildcard currently binds: access_request_state's all if it defines one, otherwise every top-level name not starting with an underscore. Each explicitly imported name becomes a module attribute exactly as the wildcard made it, so register() passing sys.modules[name] as deps and any tests that monkeypatch through access_requests keep working unchanged. The list must be complete — not just the names the three register_* modules happen to call — because omitting a name that tests patch or... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_44f6936a50f74939975aa720e4bbfa01). Hermes has no write access to this repository; no files or infrastructure were changed.