Skip to content

Per-result items in POST /api/runs are unvalidated #7

Description

@royalpinto007

Problem

Per-result items are mapped blindly (r.caseName, r.passed, r.flags ?? []); missing passed or string flags slip through to the DB insert and become 500s or miscounts.

Where

app/api/runs/route.ts (results mapping; only the empty-array case is rejected).

Acceptance

Add a failing test first (extend test/runs-route.test.mjs) POSTing {caseName: "x"} without passed and asserting 400 with a structured per-item error. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions