{"record":{"id":"300d0571509da031","repo":"kubernetes/kops","slug":"intermediate-certificate-pool-is-required","errorCode":null,"errorMessage":"intermediate certificate pool is required","messagePattern":"intermediate certificate pool is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/attest.go","lineNumber":582,"sourceCode":"\tfor _, dnsName := range signer.DNSNames {\n\t\tif dnsName == azureMetadataDNSName || strings.HasSuffix(dnsName, azureMetadataSubdomainSuffix) {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\treturn fmt.Errorf(\"signer certificate SAN does not match Azure metadata domains\")\n}\n\n// verifySignerCertChain verifies that the signer certificate chains to a trusted root CA.\nfunc verifySignerCertChain(signer *x509.Certificate, pkcs7Certs []*x509.Certificate, rootCertPool *x509.CertPool, intermediateCerts *x509.CertPool) error {\n\tif signer == nil {\n\t\treturn fmt.Errorf(\"signer certificate is required\")\n\t}\n\tif rootCertPool == nil {\n\t\treturn fmt.Errorf(\"root certificate pool is required\")\n\t}\n\tif intermediateCerts == nil {\n\t\treturn fmt.Errorf(\"intermediate certificate pool is required\")\n\t}\n\n\tintermediates := intermediateCerts.Clone()\n\tfor _, cert := range pkcs7Certs {\n\t\tintermediates.AddCert(cert)\n\t}\n\n\t_, err := signer.Verify(x509.VerifyOptions{\n\t\tRoots:         rootCertPool,\n\t\tIntermediates: intermediates,\n\t\tKeyUsages:     []x509.ExtKeyUsage{x509.ExtKeyUsageAny},\n\t})\n\treturn err\n}\n","sourceCodeStart":564,"sourceCodeEnd":597,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/attest.go#L564-L597","documentation":"Guard in verifySignerCertChain: the intermediate certificate pool argument is nil, so chain building has no intermediates to use. A caller bug — the fetch path must supply at least an empty pool.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azure/attest.go:582 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the caller to pass x509.NewCertPool() (or fetched intermediates) instead of nil"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}