Remove hardcoded bcrypt password hashes from artifacts/db-reset.js - #122
Open
legit-app-ci[bot] wants to merge 1 commit into
Open
Remove hardcoded bcrypt password hashes from artifacts/db-reset.js#122legit-app-ci[bot] wants to merge 1 commit into
legit-app-ci[bot] wants to merge 1 commit into
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This PR addresses a Password hashes should not be disclosed finding in
artifacts/db-reset.js(lines 1-59).The script contained commented-out bcrypt password hashes for three user accounts (admin, user1, and user2). These hashes exposed the hashing algorithm (
$2a$10), salt values, and allowed potential offline cracking attempts if an attacker gained repository access. Password hashes should never be committed to version control.Changes
Removed three commented lines containing bcrypt hashes:
//"password" : "$2a$10$8Zo/1e8KM8QzqOKqbDlYlONBOzukWXrM.IiyzqHRYDXqwB3gzDsba", // Admin_123// "password" : "$2a$10$RNFhiNmt2TTpVO9cqZElb.LQM9e1mzDoggEHufLjAnAKImc6FNE86",// User1_123//"password" : "$2a$10$Tlx2cNv15M0Aia7wyItjsepeA8Y6PyBYaNdQqvpxkIUlcONf1ZHyq", // User2_123Added a warning comment block above the
USERS_TO_INSERTarray clarifying that this script is for development/testing only and should not be used in production.The script now contains only plaintext passwords for local development convenience, with clear documentation of its intended use case.