Description
Set configuration.insecure_ssl = false so GitHub verifies the HTTPS receiver’s certificate for the organization webhook.
Potential impact
With true, a connection may still be encrypted, but GitHub cannot authenticate the receiver. Events can reach an unintended server.
Remediation
Install a certificate that GitHub trusts and that matches the receiver hostname. Check a test event in the delivery history. At the receiver, verify webhook signatures using a securely supplied shared secret.
Examples
Both examples send issues events to the same URL. The first includes the historical name = "web" argument. The second omits it because integrations/github 6.13.0 does not accept it.
Before
hcl
resource "github_organization_webhook" "webhook" {
name = "web"
configuration {
url = "https://example.com/webhook"
content_type = "form"
insecure_ssl = true
}
events = ["issues"]
}
After
hcl
resource "github_organization_webhook" "webhook" {
configuration {
url = "https://example.com/webhook"
content_type = "form"
insecure_ssl = false
}
events = ["issues"]
}