[hermes] bstein_home: python:S2208 #279

Open
opened 2026-09-24 10:24:34 +00:00 by hermes-automation · 0 comments

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

The wildcard import makes this facade's exported dependency names implicit. Those names must remain available on the facade itself because register() passes that module to the route registrars, preserving its existing patch surface.

Ariadne opened no pull request for it: no automated patch was possible for this finding.

Facts

  • gitea — Import only needed names or import the module and then use its members. (CRITICAL, 5min estimated) (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-import line with explicit same-name re-exports of every name it currently imports, leaving the other imports and register() unchanged. The defining module was not supplied, so inventing an import list would risk changing behavior. This is a maintainer-only helper, not replacement application code: run it in the project environment with backend importable, then paste its printed import block over the wildcard-import line. It follows all when defined and otherwise selects non-underscore names, matching wildcard-import selection. Review access_request_state.py for environ
... (truncated)

from importlib import import_module

state = import_module("atlas_portal.routes.access_request_state")
try:
    exported_names = list(state.__all__)
except AttributeError:
    exported_names = [name for name in vars(state) if not name.startswith("_")]

if not exported_names:
    raise SystemExit("No exports found; review the state module before editing.")

print("from .access_request_state import (")
for name in exported_names:
    print(f"    {name} as {name},")
print(")")

Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_610c0655081b4bbfb60036d216cd4b7f). Hermes has no write access to this repository; no files or infrastructure were changed.

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 The wildcard import makes this facade's exported dependency names implicit. Those names must remain available on the facade itself because register() passes that module to the route registrars, preserving its existing patch surface. Ariadne opened no pull request for it: no automated patch was possible for this finding. ## Facts - **gitea** — Import only needed names or import the module and then use its members. (CRITICAL, 5min estimated) (`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-import line with explicit same-name re-exports of every name it currently imports, leaving the other imports and register() unchanged. The defining module was not supplied, so inventing an import list would risk changing behavior. This is a maintainer-only helper, not replacement application code: run it in the project environment with backend importable, then paste its printed import block over the wildcard-import line. It follows __all__ when defined and otherwise selects non-underscore names, matching wildcard-import selection. Review access_request_state.py for environ ... (truncated) ``` from importlib import import_module state = import_module("atlas_portal.routes.access_request_state") try: exported_names = list(state.__all__) except AttributeError: exported_names = [name for name in vars(state) if not name.startswith("_")] if not exported_names: raise SystemExit("No exports found; review the state module before editing.") print("from .access_request_state import (") for name in exported_names: print(f" {name} as {name},") print(")") ``` ## Links - SonarQube finding: https://quality.bstein.dev/project/issues?resolved=false&id=bstein_home&open=AZ2y3BYyKy9i4pkIpR-L - Full evidence bundle and audit trail live in Ariadne at `/api/admin/audit/events`, event types `hermes_autotriage_incident` and `hermes_autotriage_diagnosis`. Filed automatically by Ariadne from a Hermes Agent diagnosis (run [run_610c0655081b4bbfb60036d216cd4b7f](https://triage.bstein.dev/chat?resume=run_610c0655081b4bbfb60036d216cd4b7f)). Hermes has no write access to this repository; no files or infrastructure were changed. <!-- hermes-triage job=bstein_home classification=python:S2208 incident=sonar/bstein_home/python:S2208/AZ2y3BYyKy9i4pkIpR-L -->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bstein/bstein-dev-home#279
No description provided.