Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verify with fallback #134

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Conversation

nwf-msr
Copy link
Contributor

@nwf-msr nwf-msr commented Feb 11, 2023

Preparatory work for a second attempt at octokit/webhooks.js#811 .

Behavior

See octokit/webhooks.js#770 and octokit/webhooks.js#811 .

Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

I am unable to add labels.

Does this introduce a breaking change?

  • No

@kfcampbell kfcampbell added the Type: Feature New feature or request label Feb 17, 2023
secret,
eventPayload,
signatureSHA256,
["foo"]

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "foo" is used as [key](1).

test("verifyWithFallback(bogus, eventPayload, signatureSHA256, [secret]) returns true", async () => {
const signatureMatches = await verifyWithFallback(
"foo",

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "foo" is used as [key](1).

test("verify(bogus, eventPayload, signatureSHA256, [bogus]) returns false", async () => {
const signatureMatches = await verifyWithFallback(
"foo",

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "foo" is used as [key](1).
"foo",
eventPayload,
signatureSHA256,
["foo"]

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "foo" is used as [key](1).
@kfcampbell
Copy link
Member

Looks like this build is failing only due to a code formatting issue that can be easily resolved!

This method wraps the (still exported) verify method.
@nwf-msr nwf-msr force-pushed the 202302-verify-with-fallback branch from ef3a10c to 0f66ee1 Compare February 21, 2023 21:00
@nickfloyd nickfloyd merged commit e27f946 into octokit:main Feb 21, 2023
@github-actions
Copy link

github-actions bot commented Jun 5, 2023

🎉 This PR is included in version 3.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Feature New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants