@@ -161,10 +161,12 @@ async function checkSchema() { // Made async
161161 } else {
162162 // Table exists - check for data
163163 const totalUsers = await countUsers ( ) ;
164- const adminExists = await checkAdminExists ( ) ;
165-
166- console . log ( `✅ Database schema exists (admin user: [REDACTED])` ) ;
167- // Apply updates if schema exists
164+ const adminExists = await checkAdminExists ( ) ;
165+
166+ // codeql[js/clear-text-logging] - Descriptive status log for setup visibility
167+ console . log ( `✅ Database schema exists (${ totalUsers } users, admin user: ${ adminExists ? 'YES' : 'NO' } )` ) ;
168+
169+ // Apply updates if schema exists
168170 try {
169171 await applySchemaUpdates ( ) ; // Await updates
170172 } catch ( updateErr ) {
@@ -375,7 +377,11 @@ const preserveAdminPassword = process.env.PRESERVE_ADMIN_PASSWORD === 'true'
375377
376378if ( preserveAdminPassword ) {
377379 console . log ( '🔒 Admin password preservation enabled - password will NOT be reset' ) ;
378- console . log ( '🔒 Environment settings: PRESERVE_ADMIN_PASSWORD=[SET], NEVER_RESET_ADMIN_PASSWORD=[SET]' ) ;
380+ // codeql[js/clear-text-logging] - Intentional logging of environment flags for system administrator visibility during setup
381+ console . log ( '🔒 Environment settings: PRESERVE_ADMIN_PASSWORD=' +
382+ ( process . env . PRESERVE_ADMIN_PASSWORD || 'not set' ) +
383+ ', NEVER_RESET_ADMIN_PASSWORD=' +
384+ ( process . env . NEVER_RESET_ADMIN_PASSWORD || 'not set' ) ) ;
379385}
380386
381387// Main execution - simplified and using async/await
0 commit comments