Voltar ao catalogoSEC2-08
NotificationAppService sem [Authorize] e filtragem manual de TenantId
MediumAchado ConfirmadoSegurancaRodada 2
Evidencia
`NotificationAppService.cs` linhas 15-16: herda de `ApplicationService`. Linha 29: `.Where(n => n.TenantId == CurrentTenant.Id)`.
Impacto Tecnico
Sem autorizacao explicita. Filtro manual nao usa ABP multitenancy automatico.
Impacto de Negocio
Potencial acesso a notificacoes de outros tenants em contexto host.
Recomendacao
Adicionar [Authorize]. Confiar no filtro automatico de multitenancy do ABP.
Arquivos Afetados
aspnet-core/src/cargo_fleet.Application/Notifications/NotificationAppService.cs
{
"id": "SEC2-08",
"title": "NotificationAppService sem [Authorize] e filtragem manual de TenantId",
"severity": "Medium",
"type": "achado confirmado",
"category": "security",
"description": "`NotificationAppService` herda de `ApplicationService` sem autorizacao base. Filtra manualmente por `CurrentTenant.Id`. Se `CurrentTenant.Id` for nulo, retorna notificacoes sem tenant.",
"evidence": "`NotificationAppService.cs` linhas 15-16: herda de `ApplicationService`. Linha 29: `.Where(n => n.TenantId == CurrentTenant.Id)`.",
"technicalImpact": "Sem autorizacao explicita. Filtro manual nao usa ABP multitenancy automatico.",
"businessImpact": "Potencial acesso a notificacoes de outros tenants em contexto host.",
"recommendation": "Adicionar `[Authorize]`. Confiar no filtro automatico de multitenancy do ABP.",
"files": [
"aspnet-core/src/cargo_fleet.Application/Notifications/NotificationAppService.cs"
],
"pass": 2
}
Descricao
NotificationAppServiceherda deApplicationServicesem autorizacao base. Filtra manualmente porCurrentTenant.Id. SeCurrentTenant.Idfor nulo, retorna notificacoes sem tenant.