[PR #2453] [MERGED] fix: strip BasicAuth credentials from webhook API responses #9997

Closed
opened 2026-04-23 09:20:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2453
Author: @tink-bot
Created: 3/23/2026
Status: Merged
Merged: 3/23/2026
Merged by: @kolaente

Base: mainHead: fix-webhook-creds-exposure


📝 Commits (4)

  • cb6a5b1 test: add BasicAuth credentials to webhook fixture
  • f9617d5 test: add failing test for webhook BasicAuth credential exposure
  • 4e7dba3 fix: strip BasicAuth credentials from project webhook API responses
  • 3607efc fix: strip BasicAuth credentials from user webhook API responses

📊 Changes

4 files changed (+54 additions, -0 deletions)

View changed files

📝 pkg/db/fixtures/webhooks.yml (+3 -0)
📝 pkg/models/webhooks.go (+2 -0)
📝 pkg/routes/api/v1/user_webhooks.go (+2 -0)
pkg/webtests/webhook_test.go (+47 -0)

📄 Description

The ReadAll method in webhooks.go and GetUserWebhooks in user_webhooks.go cleared the Secret field but not BasicAuthUser and BasicAuthPassword, leaking credentials in API responses. This adds clearing of both fields in both locations.

Includes test fixtures with BasicAuth credentials and a web test that verifies the fields are stripped from responses.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2453 **Author:** [@tink-bot](https://github.com/tink-bot) **Created:** 3/23/2026 **Status:** ✅ Merged **Merged:** 3/23/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-webhook-creds-exposure` --- ### 📝 Commits (4) - [`cb6a5b1`](https://github.com/go-vikunja/vikunja/commit/cb6a5b1014c055712473d0672a724ff24a1fd04e) test: add BasicAuth credentials to webhook fixture - [`f9617d5`](https://github.com/go-vikunja/vikunja/commit/f9617d5e7a07e76c87671e29475e22b3039b3e5d) test: add failing test for webhook BasicAuth credential exposure - [`4e7dba3`](https://github.com/go-vikunja/vikunja/commit/4e7dba3e429b7f8fab9b0caca9e0332ea87270ea) fix: strip BasicAuth credentials from project webhook API responses - [`3607efc`](https://github.com/go-vikunja/vikunja/commit/3607efc7650af018bcc6dfa5129c449217baea77) fix: strip BasicAuth credentials from user webhook API responses ### 📊 Changes **4 files changed** (+54 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkg/db/fixtures/webhooks.yml` (+3 -0) 📝 `pkg/models/webhooks.go` (+2 -0) 📝 `pkg/routes/api/v1/user_webhooks.go` (+2 -0) ➕ `pkg/webtests/webhook_test.go` (+47 -0) </details> ### 📄 Description The `ReadAll` method in `webhooks.go` and `GetUserWebhooks` in `user_webhooks.go` cleared the `Secret` field but not `BasicAuthUser` and `BasicAuthPassword`, leaking credentials in API responses. This adds clearing of both fields in both locations. Includes test fixtures with BasicAuth credentials and a web test that verifies the fields are stripped from responses. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 09:20:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#9997