[hermes] soteria: go:S1192 #25
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 literal "/cache" is hard-coded in three coupled places: the cache volume's MountPath in buildBackupJob, the same MountPath in buildRestoreJob, and the RESTIC_CACHE_DIR value in resticEnv. Restic's cache only works because all three agree, so the path belongs in a single package-level constant; today an edit to one site can silently break the other two.
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— Declare one package-level constant for the cache mount path (alongside the existing label/annotation constants used by this file) and reference it at all three sites. The generated Job manifests are byte-for-byte identical, so behaviour is unchanged. Note: restoreCommand also stages data under /cache/restore inside a larger shell string; Sonar does not flag that occurrence, and leaving it as-is keeps the diff minimal, but a maintainer may optionally build it from the same constant for full consistency.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_40919d426d00483395bc9a1a4ae12e12). Hermes has no write access to this repository; no files or infrastructure were changed.