Skip to content

gitlab interceptor: warn when secretRef is not set - #2198

Open
cvas22 wants to merge 1 commit into
tektoncd:mainfrom
cvas22:feat/2030-warn-no-secretref
Open

cvas22 wants to merge 1 commit into
tektoncd:mainfrom
cvas22:feat/2030-warn-no-secretref

Conversation

@cvas22

@cvas22 cvas22 commented Oct 23, 2026 •

Copy link
Copy Markdown

Changes

Part of #2030 (see the scope notes below)

The GitLab interceptor skips token verification when secretRef is not set and accepts every request without any indication. As proposed in the issue, this logs a warning on each request processed without a secretRef, and the docs for the GitLab and Bitbucket server interceptors now say that omitting secretRef disables verification.

Notes on scope:

  • The GitHub interceptor already requires secretRef, so it needs no change.
  • I did not add the warning to the Bitbucket interceptor: Bitbucket Cloud does not support shared secrets at all, so every cloud user would get a warning they cannot act on. Happy to add it for server-style requests if there is a reliable way to tell them apart.
  • The admission webhook warning from the issue (item 2) is not part of this PR.

Tests: TestInterceptor_Process_WarnsWithoutSecretRef checks that the warning is logged without a secretRef and not with one. go test ./pkg/interceptors/gitlab/ passes.

/kind feature

Submitter Checklist

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Tested your changes locally (unit tests only)
  • Follows the commit message standard
  • Meets the Tekton contributor standards
  • Has a kind label

Release Notes

The GitLab interceptor logs a warning when it processes a request without a secretRef, because the webhook token is then not verified.

Log a warning when the GitLab interceptor processes a request without a
secretRef, since the token is then not verified. Document the behavior
for the GitLab and Bitbucket server interceptors.

Fixes tektoncd#2030

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 23, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: cvas22 / name: Srinivas Chippagiri (08c12ce)

@tekton-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign khrm after the PR has been reviewed.
You can assign the PR to them by writing /assign @khrm in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants