[hermes] bstein_home: python:S2208 #44
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 python:S2208 flags because it hides which names actually enter this module's namespace and can silently shadow or drop symbols. The wildcard exists only so the facade module (passed as deps via sys.modules[name]) exposes access_request_state's public names as its own attributes for the registered routes and for test monkeypatching.
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 a module import plus an explicit re-export loop that mirrors access_request_state's public names onto the facade. The loop reproduces the wildcard's exact semantics (honours all when defined, otherwise all non-underscore names in the module namespace), so every attribute lookup and monkeypatch through deps = sys.modules[name] keeps working unchanged, while the rule's objection — an opaque star import — is gone and the noqa: F403 marker can be dropped. Note: access_request_state.py is not readable from this triage workspace, so the mirror is deliberately name-a... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_9b0d08e952f247f0aa1a1fabe39af966). Hermes has no write access to this repository; no files or infrastructure were changed.