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

Fix code scanning alert no. 1: Server-side request forgery #333

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

stepchud
Copy link
Contributor

Fixes https://github.com/GSA/Challenge_platform/security/code-scanning/1

To fix the problem, we need to validate the jwks_uri before using it in the HTTP request. One way to do this is to ensure that the jwks_uri is within a specific domain or matches a specific pattern. This can be done by checking the hostname of the jwks_uri against a whitelist of allowed hostnames or by using a regular expression to validate the URL format.

We will add a method to validate the jwks_uri and call this method before making the HTTP request. If the jwks_uri is not valid, we will raise an error.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

make the robots happier

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.

1 participant