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

Insecure Cookie rule for Python code #442

Open
ericwb opened this issue Apr 26, 2024 · 0 comments
Open

Insecure Cookie rule for Python code #442

ericwb opened this issue Apr 26, 2024 · 0 comments
Labels
enhancement New feature or request new rule Enhancement request for a new rule

Comments

@ericwb
Copy link
Contributor

ericwb commented Apr 26, 2024

Is your feature request related to a problem? Please describe.
Similar to the Java InsecureCookie rule (JAV006), Python could use the same.

Describe the solution you'd like
Need to detect cases like the following:

from http.cookies import SimpleCookie
cookie = SimpleCookie()
cookie['sample'] = "sample_value"
cookie['sample']['secure'] = 0

Should be fixed like so:

cookie['sample']['secure'] = True

Describe alternatives you've considered
n/a

Additional context
https://docs.python.org/3/library/http.cookies.html#http.cookies.SimpleCookie

Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.

@ericwb ericwb added enhancement New feature or request new rule Enhancement request for a new rule labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new rule Enhancement request for a new rule
Projects
None yet
Development

No branches or pull requests

1 participant