fix(integrations): Fix security vulnerabilities in Jira#112409
fix(integrations): Fix security vulnerabilities in Jira#112409
Conversation
Backend Test FailuresFailures on
|
Co-authored-by: sentry-warden[bot] <258096371+sentry-warden[bot]@users.noreply.github.com>
Co-authored-by: sentry-warden[bot] <258096371+sentry-warden[bot]@users.noreply.github.com>
Backend Test FailuresFailures on
|
| return self.respond( | ||
| {"detail": "Invalid or expired signature"}, status=status.HTTP_400_BAD_REQUEST | ||
| ) | ||
| except DecodeError: |
There was a problem hiding this comment.
Should we broaden this to cover all exceptions? It'd be bad if some other exception case could fall through to the next parts of the installation pipeline. A 400 exception when decoding the jwt fails would probably be a better response than a 500.
There was a problem hiding this comment.
On a similar note, we should add some tests for these cases to ensure error handling doesn't allow the pipeline to continue, and responds with the correct status code.
There was a problem hiding this comment.
I added tests for the specific errors we're catching including a DecodeError. The bots are yelling about my broader exception catching though which might be valid. I do worry I might be missing some other jwt exceptions but I'm not sure how to find them all.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b0b411c. Configure here.
GabeVillalobos
left a comment
There was a problem hiding this comment.
Looks good to me, pending security signoff. We should address the warden comment and wrap the peek_header call with a try:catch

Require a
kidto be passed to the Jira installed endpoint to prevent attacks. 👶