Skip to content

security(workforce-validation): authorize component-evidence resolution before owner reads #414

Description

@seonghobae

Finding

Fresh review of canonical PR #235 found that corroborate_final_weight_component_evidence(...) originally performed native component-owner reads without executing a purpose-bound authorization decision at this application boundary. Possession of final-weight/binding evidence is not reusable authorization.

The repaired boundary requires exact ValidationPrincipal, PurposeBoundAccessPolicy, and purpose_code, authorizes before the first owner read, binds the audit resource to the exact final analysis-weight receipt, and requests only component projection fields actually consumed.

Ordinary-forward repair

  • 21588e6fc0b9d6b9a2ed64dd76a7b28f4cb71176 — denied-purpose/cross-tenant zero-owner-read RED.
  • bfc67d959636255b1d77fc5eaa3546d58a67c6ff — purpose-bound authorization-before-read repair.
  • 9ff8d6daefff6264ba589fc7296e27a1e351c094, 41c93ba93962499ca6d2275b68f597238e988669, e13de7cfca9adc3fd82a5b0300711b2640edba84 — success/error/currentness/runtime-type coverage through the same boundary.
  • 03f9d44024f40e0e49e39022bcfd2b164ec4c475 → a4653faa76f7fbcd321af7088bad2145d59fb54f — exact final-receipt audit target RED→repair.
  • 460856815b3c0de51eb09b025aeb281aeec691bd → 8f271077d2d923f632f7971b598cc878d429ce94 — field-minimization RED→repair: base-only final weight no longer requests adjustment-only transform fields; specialized paths retain the fields they actually read.
  • 8be428ddd7c0a6efbc22e1eb1795441b581913aa → 9b19ae464d32b5d8863552a443cfa7551eafe89c — test-only hypothesis/restoration confirming the deliberately composite FinalWeightComponentEvidenceReadPort remains API truth.

#416 is an additive refinement rather than a replacement of #414. Fresh review showed tenant_record_id and validity_study_id were consumed from native component projections by _require_component_scope(...) but omitted from the authorized field sets. b4145493988bee3dd869bc7d6688f6fbe7278235 adds the zero-owner-read denial regression when either scope field is missing; 4ec16e61f40265675df0e8464d4ee2bd314fcca3 adds both coordinates to _BASE_READ_FIELDS and _ADJUSTMENT_READ_FIELDS. #414 minimization remains intact because base-only paths still do not request adjustment-only transform fields.

Current canonical source head is 4ec16e61f40265675df0e8464d4ee2bd314fcca3. All source evidence remains non-hosted until exact-head acceptance completes.

Required contract

Completion boundary

Do not close for source repair alone. Completion requires current exact-head owned test/docstring/edge evidence, installed-wheel/package/PostgreSQL/security gates, qualifying independent review, normal protected integration, and durable #248 (or verified successor) adoption after the parent becomes protected truth.

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