[hermes] ariadne: python:S2208 #132
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
ariadne/services/cluster_state_profiles.py. The build is green; this is a standing finding, not a failure.What is wrong
Line 5 uses a wildcard import (
from .cluster_state_contract import *), which hides where names come from and pulls in everything the contract module exports. This module actually needs only four of those names:_NODE_WORKLOAD_TOPand_PROFILE_LIMIT(used in the profile-building functions) plusClusterStateSummaryandSignalContext(re-exported via the dynamic__all__at the bottom of the file).Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
ariadne/services/cluster_state_profiles.py:5)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.
ariadne/services/cluster_state_profiles.py— Replace the wildcard import on line 5 with an explicit import of the names this module references._NODE_WORKLOAD_TOPand_PROFILE_LIMITare the only contract names used directly in the code, andClusterStateSummaryandSignalContextmust also be imported explicitly because the__all__comprehension at the end of the file only re-exports names that are present inglobals()— importing them keeps that re-export behaviour identical. No other line changes; the dynamic__all__still picks up the same set of names.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_dee17b6ceac946f5a971d589e7549c78). Hermes has no write access to this repository; no files or infrastructure were changed.