-
Bug
-
Resolution: Done
-
Critical
-
Pipelines 1.17.0
-
1
-
False
-
-
False
-
The controller no longer crashes when validating GitHub webhook secrets with an invalid or expired token. Instead, it now surfaces a clear error in the logs and continues running, ensuring webhooks keep working and the controller stays available.
-
Bug Fix
-
Done
-
-
-
Pipelines Sprint Crookshank 32
-
Critical
-
Customer Facing, Customer Reported
Description of problem:
pipelines-as-code-controller panicking with invalid memory address or nil pointer dereference for checkWebhookSecretValidity function:
2025-06-25T18:07:08.666197544Z panic: runtime error: invalid memory address or nil pointer dereference 2025-06-25T18:07:08.666356794Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fa8374] 2025-06-25T18:07:08.666792674Z 2025-06-25T18:07:08.666815674Z goroutine 236 [running]: 2025-06-25T18:07:08.667070044Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).checkWebhookSecretValidity(0xc0000f6dc0, {0x2ce1718?, 0xc000823440?}, {0x2ceb3a0, 0x45c6380}) 2025-06-25T18:07:08.667649554Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:244 +0x54 2025-06-25T18:07:08.667914334Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).SetClient(0xc0000f6dc0, {0x2ce1718, 0xc000823440}, 0xc00001a000, 0xc000603dc0, 0xc000150000, 0xc000ed85b8) 2025-06-25T18:07:08.668525444Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:290 +0x15c 2025-06-25T18:07:08.668759144Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).verifyRepoAndUser(0xc000b1d140, {0x2ce1718, 0xc000823440}) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:112 +0x594 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR(0xc000b1d140, {0x2ce1718, 0xc000823440}) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:24 +0x26 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0xc000b1d140, {0x2ce1718, 0xc000823440}) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:57 +0x3a 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0xc000b9fb60, {0x2ce1718, 0xc000823440}, 0x0?) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60 +0x3a8 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:199 +0x2c 2025-06-25T18:07:08.670223243Z created by github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2 in goroutine 223 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:198 +0x9d7
Prerequisites (if any, like setup, operators/versions): OpenShift Pipelines 1.17.0
Actual results:
# omc get po -l app=pipelines-as-code-controller -o json | jq '.items[] | .metadata.name' -r | while read PAC_CONTROLLER; do printf "\n==> $PAC_CONTROLLER\n"; omc logs $PAC_CONTROLLER -p | tail -20; done ==> pipelines-as-code-controller-5d96ddd845-5mvgx 2025-06-25T18:07:08.666197544Z panic: runtime error: invalid memory address or nil pointer dereference 2025-06-25T18:07:08.666356794Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fa8374] 2025-06-25T18:07:08.666792674Z 2025-06-25T18:07:08.666815674Z goroutine 236 [running]: 2025-06-25T18:07:08.667070044Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).checkWebhookSecretValidity(0xc0000f6dc0, {0x2ce1718?, 0xc000823440?}, {0x2ceb3a0, 0x45c6380}) 2025-06-25T18:07:08.667649554Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:244 +0x54 2025-06-25T18:07:08.667914334Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).SetClient(0xc0000f6dc0, {0x2ce1718, 0xc000823440}, 0xc00001a000, 0xc000603dc0, 0xc000150000, 0xc000ed85b8) 2025-06-25T18:07:08.668525444Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:290 +0x15c 2025-06-25T18:07:08.668759144Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).verifyRepoAndUser(0xc000b1d140, {0x2ce1718, 0xc000823440}) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:112 +0x594 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR(0xc000b1d140, {0x2ce1718, 0xc000823440}) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:24 +0x26 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0xc000b1d140, {0x2ce1718, 0xc000823440}) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:57 +0x3a 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0xc000b9fb60, {0x2ce1718, 0xc000823440}, 0x0?) 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60 +0x3a8 2025-06-25T18:07:08.670223243Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:199 +0x2c 2025-06-25T18:07:08.670223243Z created by github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2 in goroutine 223 2025-06-25T18:07:08.670223243Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:198 +0x9d7 ==> pipelines-as-code-controller-5d96ddd845-6k9qh 2025-06-25T15:32:21.790436337Z panic: runtime error: invalid memory address or nil pointer dereference 2025-06-25T15:32:21.790628907Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fa8374] 2025-06-25T15:32:21.790815427Z 2025-06-25T15:32:21.790837267Z goroutine 39766 [running]: 2025-06-25T15:32:21.790966997Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).checkWebhookSecretValidity(0xc000476be0, {0x2ce1718?, 0xc000893da0?}, {0x2ceb3a0, 0x45c6380}) 2025-06-25T15:32:21.791435317Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:244 +0x54 2025-06-25T15:32:21.791694717Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).SetClient(0xc000476be0, {0x2ce1718, 0xc000893da0}, 0xc000196180, 0xc002089500, 0xc000346160, 0xc00112cc78) 2025-06-25T15:32:21.792106907Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:290 +0x15c 2025-06-25T15:32:21.792258647Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).verifyRepoAndUser(0xc002324240, {0x2ce1718, 0xc000893da0}) 2025-06-25T15:32:21.792471957Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:112 +0x594 2025-06-25T15:32:21.792643217Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR(0xc002324240, {0x2ce1718, 0xc000893da0}) 2025-06-25T15:32:21.792855707Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:24 +0x26 2025-06-25T15:32:21.792998317Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0xc002324240, {0x2ce1718, 0xc000893da0}) 2025-06-25T15:32:21.793241937Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:57 +0x3a 2025-06-25T15:32:21.793402767Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0xc0023241e0, {0x2ce1718, 0xc000893da0}, 0xc0022b37e0?) 2025-06-25T15:32:21.793692477Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60 +0x3a8 2025-06-25T15:32:21.793917377Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 2025-06-25T15:32:21.794003967Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:199 +0x2c 2025-06-25T15:32:21.794193157Z created by github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2 in goroutine 39783 2025-06-25T15:32:21.794339797Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:198 +0x9d7 ==> pipelines-as-code-controller-5d96ddd845-fwxw6 2025-06-25T16:04:22.911090119Z panic: runtime error: invalid memory address or nil pointer dereference 2025-06-25T16:04:22.911250059Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fa8374] 2025-06-25T16:04:22.911462239Z 2025-06-25T16:04:22.911462239Z goroutine 620 [running]: 2025-06-25T16:04:22.911462239Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).checkWebhookSecretValidity(0xc00051a3c0, {0x2ce1718?, 0xc000793bc0?}, {0x2ceb3a0, 0x45c6380}) 2025-06-25T16:04:22.911705509Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:244 +0x54 2025-06-25T16:04:22.911705509Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).SetClient(0xc00051a3c0, {0x2ce1718, 0xc000793bc0}, 0xc0002160c0, 0xc000ee48c0, 0xc0003c6000, 0xc001f31608) 2025-06-25T16:04:22.911705509Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:290 +0x15c 2025-06-25T16:04:22.911705509Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).verifyRepoAndUser(0xc0008850e0, {0x2ce1718, 0xc000793bc0}) 2025-06-25T16:04:22.911705509Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:112 +0x594 2025-06-25T16:04:22.911726889Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR(0xc0008850e0, {0x2ce1718, 0xc000793bc0}) 2025-06-25T16:04:22.911726889Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:24 +0x26 2025-06-25T16:04:22.911739099Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0xc0008850e0, {0x2ce1718, 0xc000793bc0}) 2025-06-25T16:04:22.911748949Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:57 +0x3a 2025-06-25T16:04:22.911758799Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0xc000743440, {0x2ce1718, 0xc000793bc0}, 0x0?) 2025-06-25T16:04:22.911777859Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60 +0x3a8 2025-06-25T16:04:22.911787639Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 2025-06-25T16:04:22.911787639Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:199 +0x2c 2025-06-25T16:04:22.911797419Z created by github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2 in goroutine 617 2025-06-25T16:04:22.911807059Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:198 +0x9d7 ==> pipelines-as-code-controller-5d96ddd845-kqkcm 2025-06-25T15:34:53.368948908Z panic: runtime error: invalid memory address or nil pointer dereference 2025-06-25T15:34:53.369062568Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fa8374] 2025-06-25T15:34:53.369062568Z 2025-06-25T15:34:53.369062568Z goroutine 2183 [running]: 2025-06-25T15:34:53.369062568Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).checkWebhookSecretValidity(0xc000d3c1e0, {0x2ce1718?, 0xc000536e70?}, {0x2ceb3a0, 0x45c6380}) 2025-06-25T15:34:53.369121208Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:244 +0x54 2025-06-25T15:34:53.369121208Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).SetClient(0xc000d3c1e0, {0x2ce1718, 0xc000536e70}, 0xc000000000, 0xc00215efc0, 0xc001ee8000, 0xc00224e360) 2025-06-25T15:34:53.369146968Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:290 +0x15c 2025-06-25T15:34:53.369157528Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).verifyRepoAndUser(0xc001d63380, {0x2ce1718, 0xc000536e70}) 2025-06-25T15:34:53.369168068Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:112 +0x594 2025-06-25T15:34:53.369179488Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR(0xc001d63380, {0x2ce1718, 0xc000536e70}) 2025-06-25T15:34:53.369189548Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:24 +0x26 2025-06-25T15:34:53.369199428Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0xc001d63380, {0x2ce1718, 0xc000536e70}) 2025-06-25T15:34:53.369209078Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:57 +0x3a 2025-06-25T15:34:53.369228168Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0xc001d48d80, {0x2ce1718, 0xc000536e70}, 0x0?) 2025-06-25T15:34:53.369252378Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60 +0x3a8 2025-06-25T15:34:53.369252378Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 2025-06-25T15:34:53.369252378Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:199 +0x2c 2025-06-25T15:34:53.369266398Z created by github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2 in goroutine 2174 2025-06-25T15:34:53.369277258Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:198 +0x9d7 ==> pipelines-as-code-controller-5d96ddd845-wj8qd 2025-06-25T17:53:17.779920764Z panic: runtime error: invalid memory address or nil pointer dereference 2025-06-25T17:53:17.779920764Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1fa8374] 2025-06-25T17:53:17.779920764Z 2025-06-25T17:53:17.779920764Z goroutine 16000 [running]: 2025-06-25T17:53:17.779920764Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).checkWebhookSecretValidity(0xc00013c960, {0x2ce1718?, 0xc00044f770?}, {0x2ceb3a0, 0x45c6380}) 2025-06-25T17:53:17.779955264Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:244 +0x54 2025-06-25T17:53:17.779955264Z github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github.(*Provider).SetClient(0xc00013c960, {0x2ce1718, 0xc00044f770}, 0xc0000009c0, 0xc000db3c00, 0xc0022ea000, 0xc001180108) 2025-06-25T17:53:17.779965204Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/provider/github/github.go:290 +0x15c 2025-06-25T17:53:17.779979724Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).verifyRepoAndUser(0xc001cc9440, {0x2ce1718, 0xc00044f770}) 2025-06-25T17:53:17.779986804Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:112 +0x594 2025-06-25T17:53:17.779994124Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR(0xc001cc9440, {0x2ce1718, 0xc00044f770}) 2025-06-25T17:53:17.780001464Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:24 +0x26 2025-06-25T17:53:17.780016124Z github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0xc001cc9440, {0x2ce1718, 0xc00044f770}) 2025-06-25T17:53:17.780016124Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:57 +0x3a 2025-06-25T17:53:17.780024024Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0xc000a444e0, {0x2ce1718, 0xc00044f770}, 0xc00092c900?) 2025-06-25T17:53:17.780038104Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60 +0x3a8 2025-06-25T17:53:17.780045274Z github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 2025-06-25T17:53:17.780045274Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:199 +0x2c 2025-06-25T17:53:17.780053494Z created by github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2 in goroutine 16016 2025-06-25T17:53:17.780063614Z /go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:198 +0x9d7