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

feat: migration assistant - OAuth App <> GitHub Apps #1024

Merged
merged 7 commits into from
Oct 16, 2023

Conversation

darmiel
Copy link
Contributor

@darmiel darmiel commented Sep 18, 2023

Pull Request Work in Progress.

@cla-assistant
Copy link

cla-assistant bot commented Sep 18, 2023

CLA assistant check
All committers have signed the CLA.

Comment on lines +266 to +288
app.all('/github/webhooks', async (req, res) => {
const signature = req.get('X-Hub-Signature')
if (!(await verifyWebhookSignature(
config.server.github.app.webhookSecret,
JSON.stringify(req.body),
signature
))) {
return res.status(401).send('Cannot verify webhook signature')
}
const event = req.get('X-GitHub-Event')
const hook = webhooks[event]
if (!hook) {
return res.status(400).send('Unsupported event')
}
if (!hook.accepts(req)) {
return res.status(204).send('This webhook performed no action')
}
if (isRudundantWebhook(req)) {
console.log(`Skip redundant webhook for the PR ${req.args.pull_request.html_url} on PR action "${req.args.action}"`)
return res.status(202).send('This seems to be a redundant webhook. Probably there are two webhooks registered: org- and repo-webhook')
}
return hook.handle(req, res)
})

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
req.session.next = null
logger.debug('Finish processing authentication callback after passport authenticate')
}
githubCallbackPost

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
passport.authenticate('github-app-auth', {
failureRedirect: '/failure?failure=app-auth'
}),
githubCallbackPost

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
@coveralls
Copy link

coveralls commented Oct 16, 2023

Coverage Status

coverage: 75.484% (-4.1%) from 79.605% when pulling 0ee57c0 on darmiel:feat/migration-assistant into f1cb5fd on cla-assistant:main.

@Shegox Shegox merged commit f895b5c into cla-assistant:main Oct 16, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants