[hermes] soteria: go:S1192 #64
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 duplicated three times in internal/k8s/job_manifests.go: as the cache volume mount path in buildBackupJob and buildRestoreJob, and as the RESTIC_CACHE_DIR value in resticEnv. These three sites must stay in sync (the env var only works because it matches the mount path), so Sonar's go:S1192 correctly asks for a single named constant.
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— Introduce one package-level constant for the restic cache directory and use it at all three duplicated sites. This removes the duplication S1192 flags and makes the coupling between the volume mount path and RESTIC_CACHE_DIR explicit, without changing any generated manifest. Add the constant near the top of the file (after the imports), then replace the three "/cache" literals as shown.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_19014e35f9a54395b87e64c1f8d4572a). Hermes has no write access to this repository; no files or infrastructure were changed.