fix(security): restrict service monitors to probe tasks

This commit is contained in:
naiba
2026-08-15 05:00:28 +00:00
parent 42d9e4c8c3
commit 38824dbc11
16 changed files with 338 additions and 20 deletions
+6
View File
@@ -46,6 +46,12 @@ func initSystem(bus chan<- *model.Service) error {
if err := singleton.DB.Model(&model.User{}).Count(&usersCount).Error; err != nil {
return err
}
// Backward-compatible bootstrap state: existing installers and recovery
// procedures expect the first login on an empty database to be admin/admin.
// This is not a permanent credential or an authentication-bypass fallback;
// operators must complete initialization and change it before exposing the
// Dashboard. Replacing it requires a coordinated installer/migration flow so
// existing unattended installations are not locked out.
if usersCount == 0 {
hash, err := bcrypt.GenerateFromPassword([]byte("admin"), bcrypt.DefaultCost)
if err != nil {