Aller au contenu

PD-105 — Acceptabilité v2

Date : 2026-02-10 Story : Implémenter push notifications iOS Contexte : Post-corrections Sonar + ECT-03

1. Corrections appliquées

1.1 Anomalies Sonar (5 issues)

Fichier Issue Correction
NotificationCenterScreen.tsx:69 PropType inline ListRenderItemInfo<NotificationRecord>
notificationService.ts:43 Non-readonly field private readonly tokenListeners
notificationService.ts:55 No nullish coalescing instance ??= new NotificationServiceClass()
storage.ts:118 Error vs TypeError throw new TypeError(...)
notificationStore.ts:22 Import then export export type { X } from "..."

1.2 ECT-03 (Validation payload)

Aspect Avant Après
Validation as NotificationData (unsafe) Zod safeParse
Fallback Aucun {} en cas d'échec
Crash Possible Évité

2. Reviews automatisées

Outil Résultat Détail
ESLint 0 erreurs, 1 warning mineur (deprecation)
Prettier All files formatted
TypeScript No errors
Tests 1399/1399 passés

3. Reviews LLM

3.1 Review Sécurité v2 (ChatGPT)

Verdict : ⚠️ RÉSERVES

Critère Statut
Validation Zod ⚠️
Fallback sécurisé
Protection injection ⚠️
Logs sécurisés ⚠️

Vulnérabilités identifiées : - SEC-105-ECT03-01 (Medium) : Schema trop permissif (passthrough) - SEC-105-ECT03-02 (Medium) : Pas de validation sémantique targetId/eventType - SEC-105-ECT03-03 (Low) : Dualité content-available - SEC-105-ECT03-04 (Low) : Logs en clair

Recommandations : - Remplacer .passthrough() par .strict() ou .strip() - Ajouter contraintes Zod (max, regex, enum) - Normaliser content-available - Sanitiser les logs

4. Mapping invariants

Invariant Statut Tests
INV-105-01 TC-NOM-01
INV-105-02 TC-NOM-02
INV-105-03 TC-NOM-03
INV-105-04 TC-NOM-04
INV-105-05 TC-NOM-05
INV-105-06 TC-NOM-06
INV-105-07 ⚠️ TC-NOM-07 (passthrough à durcir)
INV-105-08 TC-NOM-08
INV-105-09 TC-NOM-09
INV-105-10 TC-NOM-10
INV-105-11 Backend
INV-105-12 Backend
INV-105-13 CI/CD
INV-105-14 TC-NOM-14

5. Verdict global

Critère v1 v2 Évolution
Reviews automatisées Stable
Review code ⚠️ ⚠️ -
Review tests ⚠️ ⚠️ -
Review sécurité ⚠️ ⚠️ Amélioré (ECT-03 résolu)

Verdict : ⚠️ RÉSERVES

Justification : - ECT-03 résolu (validation Zod ajoutée) - Anomalies Sonar corrigées - Réserves mineures restantes (durcissement schema, logs) - Prêt pour Gate 8 v2

6. Prochaines étapes

  1. Gate 8 v2 pour scoring final
  2. Si GO/RESERVE : merge et pipeline
  3. Si écarts sécurité Medium bloquants : itération correction