Skip to content

Potential fix for code scanning alert no. 2: Client-side URL redirect #554

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

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

Conversation

ivy-jh
Copy link
Contributor

@ivy-jh ivy-jh commented Feb 26, 2025

Potential fix for https://github.com/axonivy/dev-workflow-ui/security/code-scanning/2

To fix the problem, we need to ensure that the redirection URL is validated against a list of authorized URLs. This can be achieved by maintaining a list of allowed URLs and checking the user-provided URL against this list before performing the redirection. If the URL is not in the list, the redirection should not occur.

  1. Create a list of authorized URLs.
  2. Modify the checkAndReturnUrl function to validate the URL against this list.
  3. Ensure that only URLs from the authorized list are used for redirection.

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

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