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

Games irados ( correção ) #635

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

RayTdC
Copy link
Collaborator

@RayTdC RayTdC commented Jun 12, 2024

This solution refers to which of the apps?

A9 - Games Irados

What did you do to mitigate the vulnerability?

The app presented a log without objectivity, with shallow information when informing about coupons or when logging in. To change this situation, more detailed information was added, such as who made the request and what happened, so it will be clearer to discover possible attacks, based on the log description.

Captura de Tela 2024-06-12 às 01 56 04

Note: The “id do usuário” field was used because the user name would be sensitive information exposed in the log. The information that is covered is the device's IP.

@@ -137,4 +174,4 @@
dbName = os.environ.get('MYSQL_DB')
database = DataBase(dbEndpoint, dbUser, dbPassword, dbName)
init_db(database)
app.run(host='0.0.0.0',port=10010, debug=True)
app.run(host='0.0.0.0', port=10010, debug=True)

Check failure

Code scanning / CodeQL

Flask app is run in debug mode High

A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.
@kevinwall
Copy link

Hey there, @RayTdC!

I checked your solution, and it seems that you successfully resolved the issue with the logs. However, you forgot to remove the flag that boots Flask in debug mode. Please do so, and then I can approve your request.

Also, a little tip: for the field "id do usuário," you can censor the username. For example, you can change kevinwall to k*******l. This way, it still conveys information without revealing the actual username.

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.

2 participants