canina/docs/audit/phase3-traceability-matrix.md
2026-08-06 20:54:44 +03:30

5.1 KiB

Phase 3 Audit Traceability Matrix

  • Audit Phase: Phase 3 — Finding Consolidation, Root-Cause Analysis, and Master Task Backlog
  • Repository HEAD: 715873b2ecc3a72ba974bb2a2be87c5ba82bd4e7
  • Canonical Verified Findings Source: docs/audit/20-verified-findings-index.json
  • Total Verified Findings: 14
  • Traceability Coverage: 100% (14 / 14 findings mapped)

Complete Finding-to-Task Traceability Matrix

Finding ID Domain Finding Title Severity Root Cause Summary Remediating Task ID(s) Task Priority Dependencies Status
ARCH-001 Architecture Disconnected Authentication Protocols Between Storefront Client and Backend OTP API HIGH Storefront mock email/password state authored before NestJS 2-phase SMS OTP endpoints were finalized TASK-AUTH-001
TASK-VERIFY-001
P1 TASK-SEC-002 BLOCKED_BY_DEPENDENCY
FE-001 Storefront Absence of Declarative Router Causes SPA State Desynchronization on Direct Links MEDIUM State-driven view switching (useState) used instead of declarative client-side router TASK-FE-001 P2 None READY_FOR_IMPLEMENTATION
BE-001 Backend Floating-Point Conversion in Monetary Order Total Calculations HIGH Conversion of Prisma Decimal prices into JS primitive numbers in OrdersService.create TASK-FIN-001
TASK-VERIFY-001
P0 None READY_FOR_IMPLEMENTATION
BE-002 Backend Synchronous N+1 Query Lookup in Order Item Processing MEDIUM Iterative findUnique execution inside loop over cart items instead of single batch findMany lookup TASK-FIN-001
TASK-VERIFY-001
P0 None READY_FOR_IMPLEMENTATION
ADM-001 Admin Missing Role-Based Access Control (RBAC) Guard on Administrative Settings Endpoints HIGH SettingsController applied JwtAuthGuard but omitted RolesGuard and @Roles('Admin') TASK-SEC-003
TASK-VERIFY-001
P0 None READY_FOR_IMPLEMENTATION
SEC-001 Security Insecure Default Hardcoded JWT Secret Key Fallback in Production Configuration HIGH Defensive fallback string 'super-secret-key-canina' provided in JwtStrategy constructor TASK-SEC-001
TASK-VERIFY-001
P0 None READY_FOR_IMPLEMENTATION
SEC-002 Security Non-Cryptographic Random Generation of SMS OTP Authentication Codes HIGH Math.random() PRNG used instead of Node.js crypto.randomInt CSPRNG in AuthService.sendOtp TASK-SEC-002
TASK-VERIFY-001
P0 None READY_FOR_IMPLEMENTATION
SEC-003 Security Plaintext OTP Disclosure in Public API Response Payload HIGH Development shortcut returning { success: true, code: '12345' } in public sendOtp response payload TASK-SEC-002
TASK-VERIFY-001
P0 None READY_FOR_IMPLEMENTATION
TS-001 TypeScript Explicit any Type Annotations in Main Application State LOW Use of any type annotations in src/App.tsx for subView and advisorData state TASK-FE-001 P2 None READY_FOR_IMPLEMENTATION
TS-002 TypeScript Missing Required slug Field in Prisma Product Seed Script MEDIUM Prisma schema updated with required slug field without updating backend/prisma/seed.ts payload TASK-BUILD-001 P1 None READY_FOR_IMPLEMENTATION
TS-003 TypeScript Non-Type-Only Import of Express Response in Decorated Controller LOW metrics.controller.ts imported Express Response directly causing TS1272 under isolatedModules TASK-BUILD-001 P1 None READY_FOR_IMPLEMENTATION
TEST-001 Testing Stale Unit Test Specifications Asserting Obsolete Property Signatures MEDIUM Controller spec assertions check for obsolete result.success wrapper property TASK-BUILD-001
TASK-VERIFY-001
P1 None READY_FOR_IMPLEMENTATION
DEVOPS-001 DevOps Absence of Committed CI/CD Pipeline Workflow Definitions in Repository MEDIUM CI workflow definitions have not been committed to .github/workflows/ TASK-DEVOPS-001 P2 TASK-BUILD-001 READY_FOR_IMPLEMENTATION
DOC-001 Documentation Static Swagger Specification Desynchronization with Active NestJS Auth Endpoints MEDIUM swagger.yml authored as early design draft prior to NestJS SMS OTP implementation TASK-DOC-001 P3 None READY_FOR_IMPLEMENTATION

Special Task Traceability (Non-Finding Tasks)

Task ID Task Title Type Source / Rationale Priority Status
TASK-VERIFY-001 End-to-End Authentication, Authorization, Order, and Regression Verification TYPE: VERIFICATION Post-remediation quality gate verifying complete fix of findings ARCH-001, ADM-001, BE-001, BE-002, SEC-001, SEC-002, SEC-003, TEST-001 P1 BLOCKED_BY_DEPENDENCY (TASK-AUTH-001, TASK-SEC-003, TASK-FIN-001)

Finding Disposition & Accounting Verification

  • Total Verified Findings in 20-verified-findings-index.json: 14
  • Findings Accounted For: 14
  • Orphan Findings (Unmapped): 0
  • Orphan Tasks (No Source Finding or Special Type): 0
  • Traceability Integrity Pass: YES (100% COMPLETE)