[hermes] bstein_home: python:S2208 #80

Open
opened 2026-09-23 01:26:06 +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 hides which names this facade exposes. Because the facade itself is passed as deps and preserves a monkeypatch surface, removing apparently unused imports or passing the state module instead could change behavior.

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 only the wildcard-import line, including its noqa comment, with explicit same-name re-exports of the state module's existing exports; leave register() and the surrounding import order unchanged. The state module's contents were not supplied, so its export names cannot safely be guessed. Run this read-only helper in the backend Python environment and paste its printed import block in place of the wildcard line—not the helper itself. It respects all when present, otherwise selects public module names, and uses explicit re-export aliases to preserve the facade's attributes without unu
... (truncated)

import importlib

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

if names:
    print("from .access_request_state import (")
    for name in names:
        print(f"    {name} as {name},")
    print(")")
else:
    print("from . import access_request_state as _access_request_state")
    print("del _access_request_state")

Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_cf41787aa54d47baace80fc63419efba). 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 hides which names this facade exposes. Because the facade itself is passed as deps and preserves a monkeypatch surface, removing apparently unused imports or passing the state module instead could change behavior. 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 only the wildcard-import line, including its noqa comment, with explicit same-name re-exports of the state module's existing exports; leave register() and the surrounding import order unchanged. The state module's contents were not supplied, so its export names cannot safely be guessed. Run this read-only helper in the backend Python environment and paste its printed import block in place of the wildcard line—not the helper itself. It respects __all__ when present, otherwise selects public module names, and uses explicit re-export aliases to preserve the facade's attributes without unu ... (truncated) ``` import importlib state = importlib.import_module("atlas_portal.routes.access_request_state") try: names = list(state.__all__) except AttributeError: names = [name for name in vars(state) if not name.startswith("_")] if names: print("from .access_request_state import (") for name in names: print(f" {name} as {name},") print(")") else: print("from . import access_request_state as _access_request_state") print("del _access_request_state") ``` ## 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_cf41787aa54d47baace80fc63419efba](https://triage.bstein.dev/chat?resume=run_cf41787aa54d47baace80fc63419efba)). 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#80
No description provided.