[hermes] bstein_home: python:S2208 #807

Open
opened 2026-10-02 10:22:27 +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

Line 8 uses from .access_request_state import *, a wildcard import. This pulls an unbounded, implicit set of names into the facade's namespace, making it impossible to tell from this file which symbols are actually used/re-exported, and it risks silently shadowing other names if access_request_state's public surface changes. The noqa: F403 comment only silences Flake8's star-import warning; it does not satisfy SonarQube's S2208, which wants the import converted to explicit names (or a qualified module import).

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 with an explicit name list so the facade's re-exported patch surface is self-documenting and SonarQube can verify what's imported. The exact names must match every public symbol currently defined in access_request_state (its module-level functions/constants/classes, or the contents of its __all__ if it defines one) so that deps = sys.modules[__name__] continues to expose exactly the same attributes to register_access_request_submission/status/onboarding and to any tests that monkeypatch this module. Enumerate that list from access_request_state.py directly (e.
... (truncated)

from __future__ import annotations

"""Access request route registration facade."""

import sys

from .access_request_onboarding import register_access_request_onboarding
from .access_request_state import (
    # TODO(maintainer): replace with the exact public names currently
    # re-exported by `from .access_request_state import *`, e.g.:
    # NAME_ONE,
    # NAME_TWO,
    # helper_function,
)
from .access_request_status import register_access_request_status
from .access_request_submission import register_access_request_submission


def register(app) -> None:
    """Register public access-request and onboarding routes."""

    deps = sys.modules[__name__]
    register_access_request_submission(app, deps)
    register_access_request_status(app, deps)
    register_access_request_onboarding(app, deps)

Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_8084f9c7b6524da788d9e01d36acff58). 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 Line 8 uses `from .access_request_state import *`, a wildcard import. This pulls an unbounded, implicit set of names into the facade's namespace, making it impossible to tell from this file which symbols are actually used/re-exported, and it risks silently shadowing other names if access_request_state's public surface changes. The `noqa: F403` comment only silences Flake8's star-import warning; it does not satisfy SonarQube's S2208, which wants the import converted to explicit names (or a qualified module import). 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 with an explicit name list so the facade's re-exported patch surface is self-documenting and SonarQube can verify what's imported. The exact names must match every public symbol currently defined in `access_request_state` (its module-level functions/constants/classes, or the contents of its `__all__` if it defines one) so that `deps = sys.modules[__name__]` continues to expose exactly the same attributes to register_access_request_submission/status/onboarding and to any tests that monkeypatch this module. Enumerate that list from access_request_state.py directly (e. ... (truncated) ``` from __future__ import annotations """Access request route registration facade.""" import sys from .access_request_onboarding import register_access_request_onboarding from .access_request_state import ( # TODO(maintainer): replace with the exact public names currently # re-exported by `from .access_request_state import *`, e.g.: # NAME_ONE, # NAME_TWO, # helper_function, ) from .access_request_status import register_access_request_status from .access_request_submission import register_access_request_submission def register(app) -> None: """Register public access-request and onboarding routes.""" deps = sys.modules[__name__] register_access_request_submission(app, deps) register_access_request_status(app, deps) register_access_request_onboarding(app, deps) ``` ## 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_8084f9c7b6524da788d9e01d36acff58](https://triage.bstein.dev/chat?resume=run_8084f9c7b6524da788d9e01d36acff58)). 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#807
No description provided.