Skip to content

Commit a00936d

Browse files
committed
fix: handle Write error in secretForCacheKey to satisfy gosec
1 parent 60f90c3 commit a00936d

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,19 @@ someValue: "default"
202202
Using `# --` on every line causes helm-docs to treat each line as a
203203
separate parameter description, producing garbled output.
204204

205+
### Pull request titles and commit messages
206+
207+
The repository enforces semantic PR titles via [.github/workflows/pr-title.yaml](.github/workflows/pr-title.yaml) (the `amannn/action-semantic-pull-request` action).
208+
209+
- Allowed types: `feat`, `fix`, `docs`, `ci`, `refactor`, `test`, `chore`, `perf`, `build`, `revert`.
210+
- The subject (text after `type: `) **must start with a lowercase letter** (`subjectPattern: ^[a-z].+$`).
211+
- Good: `fix: e2e nightly RealisticLoad timeout + safe cache keys for secrets (no SHA256)`
212+
- Bad: `fix: E2E nightly ...` (capital E fails the regex and blocks the PR immediately).
213+
- The check runs on PR open/edit/synchronize and validates the PR title (and frequently the head commit message).
214+
- Dependabot PRs are automatically exempted by the workflow.
215+
216+
When creating branches, commits, or PRs, make the first line a valid semantic title so the gate passes on the first attempt. This avoids immediate CI failures and repeated title edits.
217+
205218
### MkDocs documentation links
206219

207220
MkDocs strict mode rejects relative links that resolve outside the `docs/`

internal/controller/prometheus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func secretForCacheKey(val string) string {
161161
return ""
162162
}
163163
h := fnv.New64a()
164-
h.Write([]byte(val))
164+
_, _ = h.Write([]byte(val))
165165
return fmt.Sprintf("%x", h.Sum64())
166166
}
167167

0 commit comments

Comments
 (0)