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

False positive on Report #1685

Open
ErnestoTz-WR opened this issue Sep 23, 2024 · 1 comment
Open

False positive on Report #1685

ErnestoTz-WR opened this issue Sep 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ErnestoTz-WR
Copy link

Description:

We are using Cookies on the project to store the session id of a logged user. Cookies are sanitised since they are flagged as HttpOnly (can't be modified by the user). We use the session id for a second request to get the access level of the user and return the response of the Backend. On this level the Scan is flagging that the input is unsanitised, when I remove the variable coming from the cookies the Security Report does not show this issue anymore.
I am curious about how the Scan is triggering this issue. It appears to be a false positive but I would like to make sure this is the case and for that I would like to understand the logic under this part of the scan.

Command use to create the Security Report:
bearer scan -f html --output report.html .

Expected Behavior

The Scan is able to recognise that the Cookies are sanitised based on the HttpOnly flag

Actual Behavior

The Scan is throwing an Unsanitized user input in HTTP response (XSS) issue.

@ErnestoTz-WR ErnestoTz-WR added the bug Something isn't working label Sep 23, 2024
@gotbadger
Copy link
Contributor

gotbadger commented Sep 26, 2024

Genrally speaking we consider HttpOnly cookie data unsanitised user input since its possible to modify by manually crafting a request.

Can you can share a code snippet so we could have a bit more context here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants