Skip to content

git/github: default GitHub webhooks to TLS verification#3714

Open
Vi-shub wants to merge 1 commit into
knative:mainfrom
Vi-shub:fix/github-webhook-tls-verify-default
Open

git/github: default GitHub webhooks to TLS verification#3714
Vi-shub wants to merge 1 commit into
knative:mainfrom
Vi-shub:fix/github-webhook-tls-verify-default

Conversation

@Vi-shub
Copy link
Copy Markdown

@Vi-shub Vi-shub commented May 12, 2026

  • Default GitHub repository webhooks created by pkg/git/github to insecure_ssl: "0" so GitHub verifies TLS when delivering to HTTPS payload URLs.
  • Remove the prior insecure default ("1") and the associated TODO in CreateWebHook.

/kind bug

Fixes #3713

GitHub’s webhook insecure_ssl setting was hard-coded to "1", which disables TLS certificate verification for HTTPS webhook targets. The secure default is "0" for normal HTTPS endpoints. Users whose controller URL uses a certificate that GitHub does not trust (for example self-signed TLS in lab environments) may need a follow-up opt-in if hook creation or deliveries fail.

@davidhadas @lkingland can you please review this. Thanks for your time.

Set repository webhook HookConfig insecure_ssl to 0 so GitHub verifies
TLS when delivering to HTTPS payload URLs

Signed-off-by: Vi-shub <smsharma3121@gmail.com>
@knative-prow knative-prow Bot added the kind/bug Bugs label May 12, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 12, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Vi-shub
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

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

@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 12, 2026 20:39
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 12, 2026

Welcome @Vi-shub! It looks like this is your first PR to knative/func 🎉

@knative-prow knative-prow Bot added size/L 🤖 PR changes 100-499 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels May 12, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 12, 2026

Hi @Vi-shub. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@matejvasek matejvasek requested review from gauron99 and lkingland May 12, 2026 21:25
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 0% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.91%. Comparing base (c28a5dc) to head (1e5ad39).

Files with missing lines Patch % Lines
pkg/git/github/github.go 0.00% 47 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3714      +/-   ##
==========================================
+ Coverage   56.18%   56.91%   +0.73%     
==========================================
  Files         181      181              
  Lines       20928    20929       +1     
==========================================
+ Hits        11758    11912     +154     
+ Misses       8007     7809     -198     
- Partials     1163     1208      +45     
Flag Coverage Δ
e2e 36.15% <0.00%> (+0.01%) ⬆️
e2e go 32.75% <0.00%> (?)
e2e node 28.48% <0.00%> (?)
e2e python 33.11% <0.00%> (?)
e2e quarkus 28.62% <0.00%> (?)
e2e rust 27.96% <0.00%> (-0.06%) ⬇️
e2e springboot 26.52% <0.00%> (+0.02%) ⬆️
e2e typescript 28.59% <0.00%> (ø)
e2e-config-ci 17.88% <0.00%> (?)
integration 17.44% <0.00%> (-0.03%) ⬇️
unit macos-14 44.99% <0.00%> (ø)
unit macos-latest 44.99% <0.00%> (+<0.01%) ⬆️
unit ubuntu-24.04-arm 45.16% <0.00%> (-0.01%) ⬇️
unit ubuntu-latest 45.84% <0.00%> (ø)
unit windows-latest 44.97% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matejvasek
Copy link
Copy Markdown
Contributor

@lkingland @gauron99 do you recall why we would disable tls here? Tests maybe?

@davidhadas
Copy link
Copy Markdown
Contributor

davidhadas commented May 14, 2026

@Vi-shub welcome,
Why is the entire file show as different?
Are you replacing \n with \r\n or similar?
(If \r\n is the cause, I am surprised that we do not have a test for it)

Please recommit with one line changed.

As for the actual change - I see it was written like this 3 years ago (#1594) when first added and there is no comments about it in the PR besides the code comment. I suggest the func team review this and take a decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Bugs needs-ok-to-test 🤖 Needs an org member to approve testing size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git/github: default repository webhook insecure_ssl to TLS verification ("0")

3 participants