Closed mbland closed 9 years ago
:ghost: was curious how user access was being handled, then I realized it just assumes all the repos are owned by 18F.
I need to figure out something similar for Federalist, but I'm thinking of going with only allowing users in the 18F organization instead of blocking on repo owner. We want to enable forks to be published for previewing.
Had my suspicions, Mr. dhcole+eval
. ;-) There's also the convention of the webhook "secret", but hardcoding to the org (which could be a runtime config option just as well) seems less onerous.
Yea, we're validating the secret to make sure the request actually came from github and was set up through Federalist, but Federalist automatically sets up the webhook for you when you log in and add a site. So that doesn't help if someone random signs up on federalist and adds a site.
https://github.com/18F/federalist/blob/master/api/controllers/WebhookController.js#L24
More a problem there than here, but I wanted to test on prior art.
Gonna go ahead and merge this myself.
Seems like we had a funny guy poking about yesterday:
The script is hardcoded to only accept 18F repos, so no harm was ultimately done. However, the error message-building code is obviously broken, and without the full name of the repo, etc., I can't figure out who this
evaldoer@users.noreply.github.com
is.So this change accomplishes two things:
git clone
error message.Resending a valid, successful webhook results in:
cc: @afeld @dhcole @gboone