Security Remediation: All Phases Complete (84 fixes) #348
Reference in New Issue
Block a user
Delete Branch "fix/security"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Complete security and code quality remediation across all 5 phases, addressing findings from the comprehensive codebase review.
84 fixes completed, 2 deferred (documented), 0 failures.
Phase 1 - Critical Security (13 fixes)
Phase 2 - High Priority (30 fixes)
Phase 3 - Medium Priority (5 fixes, 2 deferred)
Phase 4 - Remaining Medium (12 fixes)
Phase 5 - Low Priority Cleanup (17 fixes)
Review Agent Fixes (7 fixes)
Quality Gates
Test Plan
Closes #337, closes #338, closes #339, closes #340, closes #347
🤖 Generated with Claude Code
Two fixes for CI test failures: 1. secret-scanner.service.spec.ts - "unreadable files" test: - The test uses chmod 0o000 to make a file unreadable - In CI (Docker), tests run as root where chmod doesn't prevent reads - Fix: Detect if running as root with process.getuid() and adjust expectations accordingly (root can still read the file) 2. demo/kanban/page.tsx - Build failure during static generation: - KanbanBoard component uses useToast() hook from @mosaic/ui - During Next.js static generation, ToastProvider context is not available - Fix: Wrap page content with ToastProvider to provide context Quality gates verified locally: - lint: pass - typecheck: pass - orchestrator tests: 612 passing - web tests: 650 passing (23 skipped) - web build: pass (/demo/kanban now prerendered successfully) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>SEC-WEB-27: Replace weak email.includes('@') check with RFC 5322-aligned programmatic validation (isValidEmail). Uses character-level domain label validation to avoid ReDoS vulnerabilities from complex regex patterns. SEC-WEB-28: Replace unsafe 'as WorkspaceMemberRole' type casts with runtime validation (toWorkspaceMemberRole) that checks against known enum values and falls back to MEMBER for invalid inputs. Applied in both InviteMember.tsx and MemberList.tsx. Adds 43 tests covering validation logic, InviteMember component, and MemberList component behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>