[hermes] ariadne: python:S2208 #16
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 which names actually come from the contract module and can silently pollute this module's namespace and its dynamically built__all__. The module only relies on four names from the contract:_NODE_WORKLOAD_TOPand_PROFILE_LIMIT(used in the profile builders) plusClusterStateSummaryandSignalContext(re-exported via the__all__comprehension at the bottom).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 star import with an explicit import of the only names this module uses or re-exports._NODE_WORKLOAD_TOPand_PROFILE_LIMITare referenced directly in_node_profiles,_namespace_profiles, and_workload_profiles;ClusterStateSummaryandSignalContextmust still be imported by name so the existing__all__comprehension (which picks them out ofglobals()) keeps re-exporting them unchanged. Note the two underscore-prefixed constants were only visible through the wildcard because the contract module lists them in its own__all__; importing them explicitly is the dire... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_b75c8bc909574a209d5f97941255d80b). Hermes has no write access to this repository; no files or infrastructure were changed.