Code review catches a missing ownership check before a new export endpoint ships
What we found
A pull request added an endpoint that exported a report by ID. It checked that the user was signed in, but not that the report belonged to the user’s organization. The embedded engineer flagged it in review, with a request that reproduced the access in staging.
Impact
Had it shipped, any customer could have downloaded another customer’s reports by changing an ID.
How to fix it
Check object ownership on the server for every report request, move the check into a shared authorization helper for the export service, and add a test that requests another tenant’s report.





