{"record":{"id":"99ef1434768165e8","repo":"kubernetes/kops","slug":"parsing-base-url-w","errorCode":null,"errorMessage":"parsing base URL: %w","messagePattern":"parsing base URL: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/attest.go","lineNumber":495,"sourceCode":"\t}\n\tif len(signer.AuthorityKeyId) > 0 && !bytes.Equal(cert.SubjectKeyId, signer.AuthorityKeyId) {\n\t\treturn fmt.Errorf(\"fetched certificate subject key identifier does not match signer authority key identifier\")\n\t}\n\n\treturn nil\n}\n\n// microsoftIntermediateCandidateURLs treats signer AIA values as untrusted input. It keeps only\n// entries that stay within the configured Microsoft PKI host/path allowlist and normalizes them\n// onto the configured scheme and host.\nfunc microsoftIntermediateCandidateURLs(baseURL string, signer *x509.Certificate) ([]string, error) {\n\tif signer == nil {\n\t\treturn nil, fmt.Errorf(\"signer certificate is required\")\n\t}\n\n\tbase, err := url.Parse(baseURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing base URL: %w\", err)\n\t}\n\tif !base.IsAbs() || base.Host == \"\" {\n\t\treturn nil, fmt.Errorf(\"base URL must be absolute\")\n\t}\n\n\tbasePath := path.Clean(strings.TrimRight(base.Path, \"/\"))\n\tif basePath == \".\" || basePath == \"/\" {\n\t\treturn nil, fmt.Errorf(\"base URL path is too broad\")\n\t}\n\n\tvar urls []string\n\tseen := make(map[string]struct{})\n\tfor _, rawURL := range signer.IssuingCertificateURL {\n\t\tnormalized, ok := normalizeMicrosoftIntermediateURL(base, basePath, rawURL)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tif _, found := seen[normalized]; found {","sourceCodeStart":477,"sourceCodeEnd":513,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/attest.go#L477-L513","documentation":"microsoftIntermediateCandidateURLs could not url.Parse the configured base URL for intermediate fetching — a malformed configuration value, since the base URL is operator-supplied, not from the certificate.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/azure/attest.go:495 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the Microsoft intermediate cert base URL configuration to a valid absolute URL"],"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-12T12:17:11.808Z"}