Skip to content

git/gitlab: default project webhooks to SSL verification when creating hooks #3731

@Vi-shub

Description

@Vi-shub

Summary

pkg/git/gitlab/gitlab.go creates project hooks with EnableSSLVerification set to false (&f), which disables TLS certificate verification for the webhook URL.

	webhook := &gitlab.AddProjectHookOptions{
		EnableSSLVerification: &f,
		PushEvents:            &t,
		Token:                 &webhookSecret,
		URL:                   &payloadURL,
	}

Problem
For HTTPS payload URLs, disabling SSL verification is an insecure default and is inconsistent with tightening GitHub repository webhooks (pkg/git/github).

Proposal
Default EnableSSLVerification to true for HTTPS webhook targets (or always true unless an explicit opt-in exists for dev/self-signed).
This idea came as followup of #3714

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions