You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl http://127.0.0.1:3000/api/status?action=health returned healthy
unauthenticated /api/ai-team-os returned 401 as expected
Notes
This PR is opened from the smithpeter fork because the current token has pull-only access to builderz-labs/mission-control. It intentionally excludes unrelated local changes in src/app/api/status/route.ts and src/app/login/page.tsx.
Nice additive panel — clean structure, correct auth via requireRole(request, 'viewer'), no DB writes, no new dependencies. Three HIGH findings before merge:
HIGH
1. Path traversal risk: readJson / readText use bare path.join without an escape guard
File: src/app/api/ai-team-os/route.ts:9-23
Both helpers do path.join(VOXSIGN_ROOT, relativePath). All current callers pass hardcoded literals (no immediate exploit), but the pattern is unsafe: any future caller wiring user input into relativePath enables traversal outside VOXSIGN_ROOT. The repo already has src/lib/paths.ts::resolveWithin() for exactly this case (see how agents/[id]/files/route.ts uses it with an explicit allowlist).
The response includes root: VOXSIGN_ROOT, exposing the server-side absolute path (default /home/ubuntu/projects/voxsign) to every authenticated browser. The panel's AiTeamOsPayload type doesn't even declare root — the frontend ignores it. This is server internals disclosure for zero gain.
Fix: remove root from the NextResponse.json({...}) payload.
3. Hardcoded VoxSign project identity in a generic open-source dashboard
The description says "Customer-oriented operating scorecard for the VoxSign AI team." and the route's VOXSIGN_ROOT defaults to /home/ubuntu/projects/voxsign. Both bake one external project's identity into what's being merged to the general-purpose Mission Control dashboard.
Fix: make the title/description configurable (env or panel prop), and default VOXSIGN_ROOT to '' (forcing explicit env var) instead of a path that only exists on the contributor's machine.
MEDIUM
catch (err: any) in ai-team-os-panel.tsx:176 — replace with catch (err) + err instanceof Error ? err.message : '...'.
No stale-data-with-error state: when polling fails after a successful first load, the error is set but data stays rendered with no visual indication. Compare to system-monitor-panel.
LOW
Nav rail entry reuses <MonitorIcon /> from the existing monitor entry directly above — visually identical, likely an oversight. Use a distinct emoji/text per the project convention.
Summary
Severity
Count
HIGH
3
MEDIUM
2
LOW
1
Auth, DB safety, and dependency surface are all clean. The two non-negotiable fixes are #1 (resolveWithin) and #2 (drop root from response). #3 is about whether this is the right level of generalization for merging into the OSS dashboard.
(Reviewer is read-only on this repo — flagging for a maintainer.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Mission Control AI Team OS cockpit surface backed by the VoxSign AI Team OS state and reports.
What Changed
/api/ai-team-osendpoint.AiTeamOsPanelwith health, excellence, budget, CI/PR backlog, and eval coverage cards.ai-team-ospanel in the main content router.Validation
pnpm typecheckpnpm exec eslint src/app/api/ai-team-os/route.ts src/components/panels/ai-team-os-panel.tsx src/app/[[...panel]]/page.tsx src/components/layout/nav-rail.tsxpnpm buildsystemctl --user restart mission-control.servicecurl http://127.0.0.1:3000/api/status?action=healthreturned healthy/api/ai-team-osreturned 401 as expectedNotes
This PR is opened from the smithpeter fork because the current token has pull-only access to
builderz-labs/mission-control. It intentionally excludes unrelated local changes insrc/app/api/status/route.tsandsrc/app/login/page.tsx.