Skip to content

Conversation

@pixeebot
Copy link
Contributor

@pixeebot pixeebot bot commented Jan 16, 2025

I've reviewed the recently opened PR (969 - New Codemod: Sonar Flask Secure Cookie) and have identified some area(s) that could benefit from additional hardening measures.

These changes should help prevent potential security vulnerabilities and improve overall code quality.

Thank you for your consideration!
🧚🤖 Powered by Pixeebot

Feedback | Community | Docs

@pixeebot pixeebot bot requested a review from drdavella as a code owner January 16, 2025 12:15
@pixeebot pixeebot bot requested a review from andrecsilva January 16, 2025 12:15
response = flask.make_response()
var = "hello"
response.set_cookie("name", "value")
response.set_cookie("name", "value", secure=True, httponly=True, samesite='Lax')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flask response set_cookie call should be called with secure=True, httponly=True, and samesite='Lax'.

response2 = flask.Response()
var = "hello"
response2.set_cookie("name", "value")
response2.set_cookie("name", "value", secure=True, httponly=True, samesite='Lax')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flask response set_cookie call should be called with secure=True, httponly=True, and samesite='Lax'.

@pixeebot pixeebot bot force-pushed the pixeebot/ISS-2708/python-sonar-secure-cookie branch from ad4a2a1 to 8c67604 Compare January 16, 2025 12:15
@pixeebot pixeebot bot force-pushed the pixeebot/ISS-2708/python-sonar-secure-cookie branch from 8c67604 to 772c141 Compare January 16, 2025 12:15
@sonarqubecloud
Copy link

1 similar comment
@sonarqubecloud
Copy link

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