Skip to content

Potential fix for code scanning alert no. 43: Failure to use secure cookies#3503

Merged
strehle merged 1 commit intodevelopfrom
alert-autofix-43
Jun 4, 2025
Merged

Potential fix for code scanning alert no. 43: Failure to use secure cookies#3503
strehle merged 1 commit intodevelopfrom
alert-autofix-43

Conversation

@strehle
Copy link
Copy Markdown
Member

@strehle strehle commented Jun 2, 2025

Potential fix for https://github.com/cloudfoundry/uaa/security/code-scanning/43

To fix the issue, the secure flag should be set on the cookie before adding it to the response. This can be achieved by calling cookie.setSecure(true) on the cookie object. This ensures that the cookie is only transmitted over HTTPS, even when it is being deleted. The change should be made in the deleteSavedAccount method, specifically before the response.addCookie(cookie) call.


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

…ookies

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@strehle strehle marked this pull request as ready for review June 2, 2025 20:35
@strehle strehle merged commit 5094fb3 into develop Jun 4, 2025
27 checks passed
@strehle strehle deleted the alert-autofix-43 branch June 4, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant