Skip to content

Remove hardcoded bcrypt password hashes from artifacts/db-reset.js - #122

Open
legit-app-ci[bot] wants to merge 1 commit into
masterfrom
agentic-appsec/sast-rem/b7ca279f-95f1-463f-8384-7b5d998a2e9e
Open

Remove hardcoded bcrypt password hashes from artifacts/db-reset.js#122
legit-app-ci[bot] wants to merge 1 commit into
masterfrom
agentic-appsec/sast-rem/b7ca279f-95f1-463f-8384-7b5d998a2e9e

Conversation

@legit-app-ci

@legit-app-ci legit-app-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown

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:

  • Admin user: //"password" : "$2a$10$8Zo/1e8KM8QzqOKqbDlYlONBOzukWXrM.IiyzqHRYDXqwB3gzDsba", // Admin_123
  • User1: // "password" : "$2a$10$RNFhiNmt2TTpVO9cqZElb.LQM9e1mzDoggEHufLjAnAKImc6FNE86",// User1_123
  • User2: //"password" : "$2a$10$Tlx2cNv15M0Aia7wyItjsepeA8Y6PyBYaNdQqvpxkIUlcONf1ZHyq", // User2_123

Added a warning comment block above the USERS_TO_INSERT array 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.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants