[hermes] metis: go:S3776 #387
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 go:S3776 in
pkg/sentinel/collector.go. The build is green; this is a standing finding, not a failure.What is wrong
parseUSBScratchFstab combines managed-block scanning with entry parsing, causing nested branching that exceeds the cognitive-complexity limit of 15. This is a maintainability finding, not evidence of incorrect runtime behavior.
Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
pkg/sentinel/collector.go:131)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.
pkg/sentinel/collector.go— Replace parseUSBScratchFstab with the version below and add the helper alongside it. Extracting entry parsing removes its branches from the scanning loop, bringing both functions below the limit. This preserves marker handling, malformed-entry rejection, bind-target ordering, bind-before-tmpfs precedence, last-mount assignment, retained UUID/label values, and the nil/false result when the final mountpoint is empty.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_cc1d4f613bdf4463b8733353366f7983). Hermes has no write access to this repository; no files or infrastructure were changed.