2 Commits

Author SHA1 Message Date
4c3e6cd384 ci: enforce SonarQube quality gate
All checks were successful
Tests / Backend - Tests skipped: 7, passed: 27
Backend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 60.55% (333/550) * Lines of Code: 550 #### Quality Gates Summary No active quality gates.
Tests / Frontend - Lint, Tests et Build passed: 45
Frontend Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 86.14% (230/267) * Lines of Code: 267 #### Quality Gates Summary No active quality gates.
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
2026-08-28 09:08:06 +00:00
55fb17634d security: remove hardcoded admin credentials 2026-08-28 09:05:11 +00:00
2 changed files with 9 additions and 3 deletions

2
Jenkinsfile vendored
View File

@@ -314,7 +314,7 @@ stage('SonarQube Quality Gate') {
steps { steps {
timeout(time: 5, unit: 'MINUTES') { timeout(time: 5, unit: 'MINUTES') {
waitForQualityGate abortPipeline: false waitForQualityGate abortPipeline: true
} }
} }
} }

View File

@@ -1,9 +1,15 @@
require('dotenv').config()
const bcrypt = require('bcrypt') const bcrypt = require('bcrypt')
const prisma = require('../config/prisma') const prisma = require('../config/prisma')
async function createAdmin() { async function createAdmin() {
const email = 'admin@thetiptop.fr' const email = process.env.ADMIN_EMAIL
const password = 'Admin@TipTop2026!' const password = process.env.ADMIN_PASSWORD
if (!email || !password) {
throw new Error('ADMIN_EMAIL et ADMIN_PASSWORD doivent être définis')
}
const existing = await prisma.user.findUnique({ where: { email } }) const existing = await prisma.user.findUnique({ where: { email } })