Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/static-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: WillAbides/setup-go-faster@v1.14.0
- uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- uses: dominikh/staticcheck-action@v1.3.1
Expand Down
5 changes: 3 additions & 2 deletions backend/schedulerd/check_timer.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package schedulerd

import (
"crypto/md5"
"crypto/sha256"
"encoding/binary"

time "github.com/echlebek/timeproxy"
Expand Down Expand Up @@ -33,7 +33,8 @@ type IntervalTimer struct {
func NewIntervalTimer(name string, interval uint) *IntervalTimer {
// Calculate a check execution splay to ensure
// execution is consistent between process restarts.
sum := md5.Sum([]byte(name))
// Using SHA-256 for FIPS 140-3 compliance.
sum := sha256.Sum256([]byte(name))
splay := binary.LittleEndian.Uint64(sum[:])

timer := &IntervalTimer{splay: splay}
Expand Down