[hermes] soteria: go:S1192 #59
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:S1192 in
internal/k8s/job_manifests.go. The build is green; this is a standing finding, not a failure.What is wrong
The string literal "/cache" is hard-coded in three independent places — the backup job's cache VolumeMount, the restore job's cache VolumeMount, and the RESTIC_CACHE_DIR env var in resticEnv — so the restic cache path can silently drift if one copy is edited. go:S1192 asks for a single named constant as the one source of truth.
Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
internal/k8s/job_manifests.go:45)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.
internal/k8s/job_manifests.go— Add a package-level constant (alongside the existing label/annotation constants used by this file) and reference it at all three sites. This removes the duplication without changing the generated manifests: the mount paths and env value stay byte-identical. The "/cache/restore" occurrences inside restoreCommand are a different literal and are not flagged, so they can stay as-is.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_72e1dc762507494e8bb10df9cb94678c). Hermes has no write access to this repository; no files or infrastructure were changed.