fix(registry): allowlist error detail metadata - #1075
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — no blocking or medium findings.
This PR replaces the raw-body RegistryError.details with a fail-closed allowlist projection in registry.py: only bounded machine tokens (code/field/ids/retry hints/valid_values/validation_issues) survive, while remote prose, rejected inputs, credentials, and secret-shaped codes are dropped, with per-list incremental budgets plus a final 4KB size backstop. Retry-hint parsing still reads the raw payload (registry.py:357), so retry behavior is unchanged. Change is well tested (secret leakage, prose rejection, legacy-code promotion, bounds).
Checks applied:
- No critical/high findings (row 1 clear).
gated_paths: false, so row 2 does not apply despitereview_decision: REVIEW_REQUIRED.high_risk: trueis driven solely bysrc/adcp/__init__.py (modified), with no medium-or-higher finding on that file — row 5 does not fire; row 3 (deleted) and row 4 (medium data-loss/schema/infra) do not apply.- No author no-auto-approve team match (row 7 clear).
- No prior decision.
- Only one finding, severity
low, so row 8 (≥3 medium) does not apply.
Medium findings: none.
The single low finding (exceptions.py:198 — details narrows public content) is a deliberate, intended tightening consistent with the fail-closed security goal and is omitted per the low-severity policy. Falls through to row 9 — approve.
Summary
RegistryErrorDetailsandRegistryValidationIssueenvelopesValidation
uv run pytest -q tests/test_registry.py tests/test_public_api.py(194 passed)make lint typecheckuv run pytest -q(7179 passed, 41 skipped, 9 deselected, 1 xfailed)Refs #1031