T09 · Insecure Skill Coding Practices
- Location
scripts/convex-setup.md:65- Finding
Unauthenticated Convex HTTP Routes Permit Unauthorized Data Access and Modification
- Content
View full analysis
{ const body = await request.json(); await ctx.runMutation(api.sprints.log, body); return new Response(JSON.stringify({ ok: true }), { headers: { "Content-Type": "application/json" }, }); }), }); // Get recent sprints http.route({ path: "/sprints/recent", method: "GET", handler: httpAction(async (ctx, request) => { const url = new URL(request.url); const project = url.searchParams.get("project") ?? ""; const limit = parseInt(url.searchParams.get("limit") ?? "10"); const results = await ctx.runQuery(api.sprints.recent, { project, limit }); return new Response(JSON.stringify(results), { headers: { "Content-Type": "application/json" }, }); }), }); // Record a metric http.route({ path: "/metrics/record", method: "POST", handler: httpAction(async (ctx, request) => { const body = await request.json(); await ctx.runMutation(api.metrics.record, body); return new Response(JSON.stringify({ ok: true }), { headers: { "Content-Type": "application/json" }, }); }), }); // Content dedup search http.route({ path: "/content/search", method: "GET", handler: httpAction(async (ctx, request) => { const url = new URL(request.url); const query = url.searchParams.get("query") ?? ""; const results = await ctx.runQuery(api.content.search, { query }); return new Response(JSON.stringify(results), { headers: { "Content-Type": "application/json" }, }); }), }); ``` ### Technical Analysis The documented Convex backend exposes read and write routes without verifying an authenticated ident ...[truncated 2074 chars]- Remediation
View remediation
