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
{{ message }}
Repository navigation
Backend API authentication — all /api/* endpoints are unauthenticated #33
All /api/* routes in cmd/ark-backend/main.go are accessible to any client on localhost with no authentication. Any process running locally can read or modify any user's training data, quiz scores, or profile by supplying an arbitrary user_id.
The auth route block at line 203 is commented out:
// r.Route("/auth", func(r chi.Router) { ... })
Impact
Any locally-running app can call PUT /api/users/{user_id}/profile to mark arbitrary users as having completed onboarding
Any locally-running app can read training progress for any user
In a shared/networked deployment, this allows complete data exfiltration
For the current CLI-first, single-user local deployment model this is low immediate risk. Must be fixed before any multi-user or networked deployment.
Proposed fix
Implement bearer token or session cookie authentication middleware that:
Validates the token on all /api/* routes except /api/version and /health
Verifies the authenticated user matches the user_id in the request (or has admin role)
This extends issue #5 (SSO integration) — the auth mechanism should tie into the institutional identity provider.
Activity
security+fix: second audit remediation — tag map, CORS, types, tests