▾ modified cmd/update_check.go +3 -0 Viewed
@@ -276,6 +276,9 @@ func updateStampPath(host string) (string, error) { 276 276 // interval. A missing or unreadable stamp is stale (check again); a future 277 277 // stamp (clock moved back) is treated as fresh so it cannot pinball the probe. 278 278 func stampIsFresh ( path string ) bool { 279 + // #nosec G304 -- path is the CLI's own stamp under the config directory 280 + // (config.Path + a sanitized host key), the same class as the config read 281 + // in internal/config; it is never assembled from request or command input. 279 282 data , err := os . ReadFile ( path ) 280 283 if err != nil { 281 284 return false
@@ -276,6 +276,9 @@ func updateStampPath(host string) (string, error) { 276 // interval. A missing or unreadable stamp is stale (check again); a future 276 // interval. A missing or unreadable stamp is stale (check again); a future 277 // stamp (clock moved back) is treated as fresh so it cannot pinball the probe. 277 // stamp (clock moved back) is treated as fresh so it cannot pinball the probe. 278 func stampIsFresh ( path string ) bool { 278 func stampIsFresh ( path string ) bool { 279 + // #nosec G304 -- path is the CLI's own stamp under the config directory 280 + // (config.Path + a sanitized host key), the same class as the config read 281 + // in internal/config; it is never assembled from request or command input. 279 data , err := os . ReadFile ( path ) 282 data , err := os . ReadFile ( path ) 280 if err != nil { 283 if err != nil { 281 return false 284 return false