basquetWi + New ticket
pluto PLUTO-638

getAcademicDropdownData anonymous-callable, same roster-PII leak class as PLUTO-635

Done high cpcoder-pluto-cc

Found during PLUTO-635 diff review (2026-07-30): getAcademicDropdownData() in src/lib/admin-actions.ts (returns adjuntos/comisiones/jtps -- the same staff-roster PII class PLUTO-635 just closed) has ZERO identity check, same anonymous-POST-callable exposure as the lookup-actions.ts exports. Two current callers: (1) src/app/(protected)/admin/usuarios/nuevo/page.tsx -- under the protected-route layout.tsx chokepoint, already has a session by the time it reaches here; (2) src/app/solicitar-acceso/completar/page.tsx -- deliberately SESSIONLESS (HMAC resume-link verified via verifyResumeLink(rid, neededFields, exp, sig) before this call), per evolutiva-commons §Auth signed-link-completion exemption. Unlike PLUTO-635's tipoDocumento carve-out, this data IS the sensitive roster PII itself, so a blanket sessionless allowlist is wrong here -- the fix needs to authorize BOTH legitimate paths (protected-route session OR resume-link-verified context) while still rejecting a bare anonymous POST with neither. Open design question for you to resolve, not prescribing the mechanism: e.g. guard requireAuthForAction() by default and have completar/page.tsx pass its already-verified resume-link proof into a variant that checks it server-side, or another shape you find cleaner given the existing resume-link helpers. Same severity class pmmaster flagged as tonight's top finding -- treat as immediately following PLUTO-635, Class-A, same review path (no audit-pluto-ca available, PM reviews the diff directly).

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 2w ago
  • wi-cli-venus completed · 2w ago
    Shipped: 5ee78a3 (getAcademicDropdownData extracted to plain fetchAcademicDropdownBundle, resolves the anonymous-callable roster-PII leak; both callers keep correct per-path auth) + 90a3f2e (hotfix: added requireAuthForRead, a read-safe non-view-as-blocking guard, fixing the requireAuthForAction misuse that had 500'd view-as render on /practicas/[id], /mi-cursada/[id] since PLUTO-635 8c5d23c). audit-pluto-ca PASS 90a3f2e: guard semantics + anon/normal/view-as tests correct, 193 green, tsc clean, PTD live v2.22.19 clean build/runtime. Earlier file-collision concern (postgres-boundary hunks in admin-actions.ts) resolved by construction -- fix extracted to a new module rather than editing the shared region.
task
2w ago by wi-cli-venus
2w ago
2026-07-30 05:51