{"record":{"id":"8d1b2ae359206a05","repo":"flippercloud/flipper","slug":"secret-should-not-be-empty","errorCode":null,"errorMessage":"secret should not be empty","messagePattern":"secret should not be empty","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/flipper/cloud/message_verifier.rb","lineNumber":22,"sourceCode":"module Flipper\n  module Cloud\n    class MessageVerifier\n      class InvalidSignature < StandardError; end\n\n      DEFAULT_VERSION = \"v1\"\n\n      def self.header(signature, timestamp, version = DEFAULT_VERSION)\n        raise ArgumentError, \"timestamp should be an instance of Time\" unless timestamp.is_a?(Time)\n        raise ArgumentError, \"signature should be a string\" unless signature.is_a?(String)\n        \"t=#{timestamp.to_i},#{version}=#{signature}\"\n      end\n\n      def initialize(secret:, version: DEFAULT_VERSION)\n        @secret = secret\n        @version = version || DEFAULT_VERSION\n\n        raise ArgumentError, \"secret should be a string\" unless @secret.is_a?(String)\n        raise ArgumentError, \"secret should not be empty\" if @secret.empty?\n        raise ArgumentError, \"version should be a string\" unless @version.is_a?(String)\n      end\n\n      def generate(payload, timestamp)\n        raise ArgumentError, \"timestamp should be an instance of Time\" unless timestamp.is_a?(Time)\n        raise ArgumentError, \"payload should be a string\" unless payload.is_a?(String)\n\n        OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new(\"sha256\"), @secret, \"#{timestamp.to_i}.#{payload}\")\n      end\n\n      def header(signature, timestamp)\n        self.class.header(signature, timestamp, @version)\n      end\n\n      # Public: Verifies the signature header for a given payload.\n      #\n      # Raises a InvalidSignature in the following cases:\n      # - the header does not match the expected format","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/cloud/message_verifier.rb#L4-L40","documentation":"Error \"secret should not be empty\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/cloud/message_verifier.rb:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the webhook secret environment variable; it is currently empty","Remove trailing whitespace handling that strips the secret, and re-check the value being passed","Generate a new secret in Flipper Cloud settings and configure it if the current one was cleared"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f86de3ec91521585b156445e156642938b19cb0","analyzedAt":"2026-08-23T04:36:09.896Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}