From 7b99ccb2734f34883e2ff094d5dfadcfc321e0c2 Mon Sep 17 00:00:00 2001 From: Akshay Pant Date: Fri, 12 Jun 2026 04:42:48 +0000 Subject: [PATCH] chore: add CVE fixer guidance file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generated by /onboard โ€” teaches the CVE fixer workflow how to create fix PRs matching this repo's conventions (branch naming, files that change together, co-upgrades, GOTOOLCHAIN pinning, etc.). Based on analysis of 16 merged CVE/security PRs. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Akshay Pant --- .cve-fix/examples.md | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .cve-fix/examples.md diff --git a/.cve-fix/examples.md b/.cve-fix/examples.md new file mode 100644 index 000000000..a8cda912e --- /dev/null +++ b/.cve-fix/examples.md @@ -0,0 +1,72 @@ + + +## Titles + +- `fix(security): backport fixes to ` (security code fixes, 3/16 PRs) +- `[release-v0.42.2] fix(deps): update to fix ` (GHSA dep bumps, 2/16 PRs) +- `chore(deps): bump from to ` (dependabot-style dep bumps, 8/16 PRs) +- Prefix `[DNM]` for work-in-progress backport PRs not yet ready to merge + +## Branches + +- Security code fixes: `security--` (e.g. `security-header-hijacking-v0-42-x`) +- Manual dep bumps: `deps/` or `update--security-fix` (e.g. `deps/go-jose`, `update-go-jose-security-fix`) +- Backport per release branch: one branch per release stream (e.g. `deps/go-jose-v0.42`) + +## Files + +- Go dependency CVEs: `go.mod`, `go.sum` (always together) +- GitHub App token / host-header security: `pkg/provider/github/app/token.go`, `pkg/provider/github/github.go`, `pkg/provider/github/parse_payload.go` +- Webhook security: `pkg/adapter/incoming.go`, `pkg/adapter/sinker.go` +- Remote task resolution: `pkg/resolve/remote.go` +- Tests always accompany code changes: `pkg/adapter/incoming_test.go`, `pkg/provider/github/app/token_test.go`, `pkg/resolve/remote_test.go` + +## Co-upgrades + +- When bumping `go-jose/v3`, also bump `go-jose/v4` (and vice versa) โ€” both must be at fixed versions together (12/16 dep PRs) +- Security backports to older release branches: also update `go-jose/v3`, `go-jose/v4`, and `tektoncd/pipeline` on that branch + +## PR Description + +Use the repo's standard template sections (in order): + +```markdown +## ๐Ÿ“ Description of the Change + + +### How this backport was done + + +### Commits +| Commit | Description | +|--------|-------------| +| `` | `` | + +## ๐Ÿ‘จ๐Ÿปโ€ Linked Jira + + +## ๐Ÿ”— Linked GitHub Issue +Fixes # (or N/A) + +## ๐Ÿงช Testing Strategy +- [x] Unit tests +- [ ] Integration tests +- [ ] End-to-end tests +- [ ] Manual testing +- [ ] Not Applicable + +Validation run locally: +- `make test` +- `make lint-go` +- `go test ./pkg/adapter` (for adapter/webhook changes) + +## ๐Ÿค– AI Assistance + +``` + +## Don'ts + +- โŒ Do not combine multiple release-branch backports in one PR โ€” one PR per release branch +- โŒ Do not skip `go.sum` when updating `go.mod` โ€” always commit both together +- โŒ Do not bump `go-jose/v3` without also bumping `go-jose/v4` in the same PR +- โŒ Do not use `GOTOOLCHAIN=local` โ€” pin `GOTOOLCHAIN` to the exact Go version in the branch's `go.mod` (e.g. `GOTOOLCHAIN=go1.24.2`)