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

[A2][Insecure go project] Fix the Hardcoded credentials vulnerability #415

Closed
wants to merge 3 commits into from

Conversation

secampos
Copy link

This solution refers to which of the apps?

A2 - Insecure go project

What did you do to mitigate the vulnerability?

All the hardcoded credentials was removed and they was moved to the deployments folder. The viper was used to get the credentials in environment variables.

Copy link
Contributor

@gustavocovas gustavocovas left a comment

Choose a reason for hiding this comment

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

Hey, @secampos. Your changes look good, and the hardcoded credentials vulnerability is mitigated! 🐼
However, I was not able to run the app from your branch. I got the following error from the mongo container:

/docker-entrypoint-initdb.d/mongo-init.sh: line 1: +mongo: command not found

Seems like every line in deployments/mongo-init.sh is prefixed with a + sign. Could you fix that?

@secampos
Copy link
Author

Oops, I forgot to remove it. Thanks, @gustavocovas.

Copy link
Contributor

@gustavocovas gustavocovas left a comment

Choose a reason for hiding this comment

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

Great! No more hardcoded credentials 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A2-OWASP-2017 Insecure Go project mitigation solution 🔒 This is a possible way to fix this vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants