Webhook signature checking is skipped if incoming webhook has no signature

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Looking at this code https://github.com/jenkinsci/github-plugin/blob/68ceb5960549c6a5ce55c5288c7eaabbbb3719a2/src/main/java/org/jenkinsci/plugins/github/webhook/RequirePostWithGHHookPayload.java#L145

      This means that if a secret is configured but the webhook doesn't have a signature, the request is allowed. I would expect that is a secret is configured, any webhook without a signature should be rejected, i.e.:

      if(Optional.fromNullable(secret).isPresent()) {
        if(signHeader.isPresent()) {
          // Do the existing check
         } else {
          // fail the hook
        }
      }
      

        1. github.jpg
          593 kB
          Nathan Vahrenberg
        2. jenkins.jpg
          38 kB
          Nathan Vahrenberg

            Assignee:
            Kirill Merkushev
            Reporter:
            Noah Kantrowitz
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: