review: error text reaches API clients on three route handlers (js/stack-trace-exposure)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start by tracing the seven CodeQL flows in backend-ts/src/routes/runs.ts, backend-ts/src/routes/measures.ts, and backend-ts/src/worker.ts. Read docs/PRODUCTION_READINESS_2026-07.md and docs/COMPLIANCE_API.md, then classify which details are developer-facing versus client-facing. Done means the response contract is decided and checked against the API stability statement.
Written by the indexing model from the issue text.
Description
What
CodeQL raises js/stack-trace-exposure (medium) at three sinks:
| File | Line | Paths |
|---|---|---|
backend-ts/src/routes/runs.ts |
157 | 5 |
backend-ts/src/routes/measures.ts |
163 | 1 |
backend-ts/src/worker.ts |
194 | 1 |
Each is the module's json() helper; the flagged flow is an caught error whose message ends up in the response body.
Why this is filed as review rather than a fix
Unlike the other three items from the first scan, this one has no mechanically correct answer. It is a judgement call about how much diagnostic detail the API should return, and the two failure modes point in opposite directions:
- Returning error text leaks internals — module paths, driver messages, and on a WebChart-backed stack potentially fragments of clinical data in a serialization error.
docs/PRODUCTION_READINESS_2026-07.mdsets the PHI posture this has to satisfy. - Returning nothing useful makes a 500 undiagnosable for MIE, who consume the versioned compliance API (
docs/COMPLIANCE_API.md) and cannot read our logs.
The likely shape is a correlation id in the response plus the detail in run_logs / the audit trail, but that is a design decision, not a find-and-replace.
Scope
- Enumerate the seven flows and classify each: developer-facing detail vs client-facing message.
- Decide the contract — probably an opaque id the client can quote back.
- Check it against the stability statement in
docs/COMPLIANCE_API.md, since response-body shape is part of that contract.
Not urgent
Auth is on for these routes and the deployed stack is a demo tenant. This is worth doing properly rather than quickly.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 69
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Taleef7/workwell
-
documentation owner-ops
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
-
owner-ops
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
All issues in Taleef7/workwell
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·