Skip to content

CCPA disclosure tells users the platform holds none of their professional data #652

Closed

Description

@thinkclay

Proven against a live stack

[email protected] has, in the database:

rows
core.user_education 2
core.user_skills 6
core.user_experience 3
core.user_certifications 3

GET /v1/ccpa/data-summary tells that user:

{"id":"professional_information",
 "label":"Professional Information",
 "description":"Education, skills, work experience, certifications, work logs",
 "hasData": false, "itemCount": 0}

personal_information also reports "hasData": false.

Why

routes/ccpa.ts:47-81 counts rows from five tables that do not exist:

queried actual
core.profiles core.profile
core.education core.user_education
core.profile_skills core.user_skills
core.work_experience core.user_experience
core.feedback — nothing of that name

PostgREST returns {count: null} for each. The handler then does ?? 0, so a failed query and a genuine zero are indistinguishable:

const eduCount = eduRes.count ?? 0;

No error is checked on any of the thirteen parallel queries.

Why this one is not just another wrong table name

This is a statutory disclosure. A user exercising a right to know what personal information is held is told, in the product's own words, that there is none. The same file's admin queue (ccpa.ts:473) reads core.profiles too, so every request row shows a blank email and display name.

Acceptance

  • Every table in ccpa.ts resolves — core.profile, core.user_education, core.user_skills, core.user_experience, and a decision on feedback
  • A failed count is not coerced to 0; a query error surfaces rather than under-reporting
  • A test with a seeded user asserts non-zero counts per category, so a future rename fails loudly
  • The admin request list resolves requester email and display name

Found by the sweep behind #651, which now guards against new instances.

Activity

  1. added
    bug
    on Aug 27, 2026
  2. thinkclay commented on Aug 27, 2026

    @thinkclay
    ContributorAuthor

    Fixed in #663, with three findings beyond what I filed here.

    Eight of the thirteen counts were failing, not five. The three I missed have the right table and the wrong filter column, which fails exactly as silently as a wrong table name:

    core.certifications exists — but it is the catalogue, with no user_id. User-scoped is core.user_certifications.
    id_verifications keyed worker_user_id, not user_id
    reviews keyed author_user_id, not reviewer_user_id

    The fix in the acceptance criteria does not work. I wrote "a failed count is not coerced to 0; a query error surfaces". A head-count against an unreadable table returns:

    {"count": null, "error": null, "status": 204}
    

    No error is raised at all. I built it that way first and the break-test caught it still returning 200 with a quietly smaller total. The dependable signal is count === null, since count: "exact" always yields a number when the query ran. Anyone fixing this the obvious way would ship a still-broken guarantee, so it is called out in the code and pinned by a test.

    Feedback cannot be counted. logs.user_feedback is unreachable from the API — PostgREST does not expose the logs schema (config.toml schemas) and the table grants only postgres. It is left out of the Communications label rather than counted as zero. Worth its own issue: the /v1/feedback router queries .schema("logs") and is broken for the same reason.

    Verified against a live stack: 14 for the user who was told 0, and a 500 naming the category when any count fails.

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

    Compliancebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions