{"record":{"id":"96493983d2bb16af","repo":"getsops/sops","slug":"cannot-use-more-than-one-of-encrypted-suffix-unen","errorCode":null,"errorMessage":"Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file","messagePattern":"Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/stores.go","lineNumber":293,"sourceCode":"\t}\n\tif m.EncryptedSuffix != \"\" {\n\t\tcryptRuleCount++\n\t}\n\tif m.UnencryptedRegex != \"\" {\n\t\tcryptRuleCount++\n\t}\n\tif m.EncryptedRegex != \"\" {\n\t\tcryptRuleCount++\n\t}\n\tif m.UnencryptedCommentRegex != \"\" {\n\t\tcryptRuleCount++\n\t}\n\tif m.EncryptedCommentRegex != \"\" {\n\t\tcryptRuleCount++\n\t}\n\n\tif cryptRuleCount > 1 {\n\t\treturn sops.Metadata{}, fmt.Errorf(\"Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file\")\n\t}\n\n\tif cryptRuleCount == 0 {\n\t\tm.UnencryptedSuffix = sops.DefaultUnencryptedSuffix\n\t}\n\treturn sops.Metadata{\n\t\tKeyGroups:                 groups,\n\t\tShamirThreshold:           m.ShamirThreshold,\n\t\tVersion:                   m.Version,\n\t\tMessageAuthenticationCode: m.MessageAuthenticationCode,\n\t\tUnencryptedSuffix:         m.UnencryptedSuffix,\n\t\tEncryptedSuffix:           m.EncryptedSuffix,\n\t\tUnencryptedRegex:          m.UnencryptedRegex,\n\t\tEncryptedRegex:            m.EncryptedRegex,\n\t\tUnencryptedCommentRegex:   m.UnencryptedCommentRegex,\n\t\tEncryptedCommentRegex:     m.EncryptedCommentRegex,\n\t\tMACOnlyEncrypted:          m.MACOnlyEncrypted,\n\t\tLastModified:              lastModified,","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/stores.go#L275-L311","documentation":"Error \"Cannot use more than one of encrypted_suffix, unencrypted_suffix, encrypted_regex, unencrypted_regex, encrypted_comment_regex, or unencrypted_comment_regex in the same file\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/stores.go:293 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13442bb98183887d7a9ac09ec8ab0564673a59d8","analyzedAt":"2026-09-01T03:53:00.447Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}