[hermes] atlasbot: python:S2208 #87
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
atlasbot/engine/answerer/spine.py. The build is green; this is a standing finding, not a failure.What is wrong
spine.py uses
from ._base import *, a wildcard import. This pollutes the module namespace with every public/underscored name_base.pydefines, makes it impossible to tell from this file which names actually come from_base, and risks silent shadowing of the locally defined_spine_*/_format_*/_parse_*helpers if_baseever adds a same-named symbol. Nothing in the visible body of spine.py references a bare name that isn't stdlib,typing.Any,IntentMatch,summary_text, or one of its own locally defined_-prefixed functions, so the wildcard import's only apparent purpose is to feed_base's private helpers into this module'sglobals()so they get swept up by the trailing__all__ = [name for name in globals() if name.startswith("_") and not name.startswith("__")]re-export line.Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
atlasbot/engine/answerer/spine.py:9)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.
atlasbot/engine/answerer/spine.py— Replace the wildcard import with an explicit import of the specific names_baseprovides (or, if none are used directly, import the module object itself). Since the only observable purpose here is re-exporting_base's private helpers via__all__, importing the module and folding its own__all__/private names into this file's__all__preserves the exact same re-export surface without the wildcard. A maintainer with the actual contents of_base.pyshould replace<name1>, <name2>, ...with the real list of names_basedefines (or its own__all__if it has one) so the explicit im... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_0419aa356a3c43ce8ae5c37fb9c781c1). Hermes has no write access to this repository; no files or infrastructure were changed.