{"record":{"id":"aebeac98b0a9b83c","repo":"kubernetes/kops","slug":"scw-secret-key-is-required","errorCode":null,"errorMessage":"SCW_SECRET_KEY is required","messagePattern":"SCW_SECRET_KEY is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go","lineNumber":71,"sourceCode":"// TokenSource implements oauth2.TokenSource\ntype TokenSource struct {\n\tAccessToken string\n}\n\n// Token returns oauth2.Token\nfunc (t *TokenSource) Token() (*oauth2.Token, error) {\n\ttoken := &oauth2.Token{\n\t\tAccessToken: t.AccessToken,\n\t}\n\treturn token, nil\n}\n\nfunc newClient() (*scw.Client, error) {\n\tif accessKey := os.Getenv(\"SCW_ACCESS_KEY\"); accessKey == \"\" {\n\t\treturn nil, fmt.Errorf(\"SCW_ACCESS_KEY is required\")\n\t}\n\tif secretKey := os.Getenv(\"SCW_SECRET_KEY\"); secretKey == \"\" {\n\t\treturn nil, fmt.Errorf(\"SCW_SECRET_KEY is required\")\n\t}\n\n\tscwClient, err := scw.NewClient(\n\t\tscw.WithUserAgent(\"kubernetes-kops/\"+kopsv.Version),\n\t\tscw.WithEnv(),\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn scwClient, nil\n}\n\n// Interface implements dnsprovider.Interface\ntype Interface struct {\n\tdomainAPI DomainAPI\n}\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go#L53-L89","documentation":"Guard in the Scaleway DNS provider's newClient: the SCW_SECRET_KEY environment variable is empty. Like the access-key check, this is an explicit configuration sentinel — both credentials must be present to construct the scw.Client.","triggerScenarios":"Thrown at dnsprovider/pkg/dnsprovider/providers/scaleway/dns.go:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export SCW_SECRET_KEY with your Scaleway secret key","Use a Scaleway config file with the secret key","Rotate and re-set the key if invalid"],"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"}