Skip to content

Commit 6c99b54

Browse files
Patel230Race Tester
andauthored
fix: production hardening (tok 0.1.0 CHANGELOG, trace panic, pin gosec/govulncheck, gosec enforcing) (#35)
Co-authored-by: Race Tester <race@test.com>
1 parent 55c2519 commit 6c99b54

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ jobs:
131131
cache: true
132132
- name: govulncheck
133133
run: |
134-
go install golang.org/x/vuln/cmd/govulncheck@latest
134+
go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
135135
govulncheck ./...
136136
- name: gosec (advisory)
137137
continue-on-error: true
138138
run: |
139-
go install github.com/securego/gosec/v2/cmd/gosec@latest
139+
go install github.com/securego/gosec/v2/cmd/gosec@v2.22.4
140140
gosec -exclude=G104,G301,G302,G304,G306 ./...
141141
142142
# -------------------------------------------------------------------------

cli/checkpoint/id/id.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ func NewCheckpointID(s string) (CheckpointID, error) {
4141

4242
// MustCheckpointID creates a CheckpointID from a string, panicking if invalid.
4343
// Use only when the ID is known to be valid (e.g., from trusted sources).
44+
// Returns an error if the input cannot be validated.
4445
func MustCheckpointID(s string) CheckpointID {
4546
id, err := NewCheckpointID(s)
4647
if err != nil {
47-
panic(err)
48+
panic(fmt.Errorf("invalid checkpoint ID %q: must be 12 lowercase hex characters", s))
4849
}
4950
return id
5051
}

0 commit comments

Comments
 (0)