Git Product home page Git Product logo

cake-bot's People

Contributors

brmatt avatar glenjamin avatar leocassarani avatar vivienschilis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cake-bot's Issues

Validating GitHub webhook request

Hey guys,

Great work on the bot! ๐Ÿ˜ƒ ๐ŸŽ‰ ๐Ÿฐ

I'm in the process of creating a GitHub App when I came across this bot.
While reading the codebase, I noticed that we are not validating whether the webhook request received by the bot is actually triggered by a GitHub WebHook or not. This could lead to a minor security issue if one could find the payload URL and send custom POST requests to the /github endpoint. Setting a webhook secret (in the bot's configuration) allows us to ensure that POST requests sent to the payload URL are from GitHub.

Given that the bot no longer uses go-github, we would have to write our own HMAC authenticator for validating the incoming request. As the guide suggests, we would also require a new environment variable (let's call it GITHUB_SECRET) to be set, possibly in main.go.

Just let me know if you consider this to be useful, and I would be happy to add the functionality and contribute to the cake-bot. ๐Ÿ˜„

Refer: Securing your webhooks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.