Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Harden custom sensor test fixture permissions

rcourtman4bca38395a4e
diff --git a/internal/hostagent/custom_sensors_test.go b/internal/hostagent/custom_sensors_test.go
index 7c1912d615..e50bb17c82 100644
--- a/internal/hostagent/custom_sensors_test.go
+++ b/internal/hostagent/custom_sensors_test.go
@@ -19,6 +19,11 @@ import (
func writeCustomSensorFixture(t *testing.T, configBody string) (string, string) {
t.Helper()
directory := t.TempDir()
+ if runtime.GOOS != "windows" {
+ if err := os.Chmod(directory, 0o700); err != nil {
+ t.Fatalf("secure custom sensor fixture directory: %v", err)
+ }
+ }
commandPath := filepath.Join(directory, "sensor-command")
if runtime.GOOS == "windows" {
commandPath += ".exe"