fix(policy): reject deceptive schema values #11

Closed
clawlter wants to merge 2 commits from audit/strict-policy-schema into main
Owner

Summary

  • reject unknown top-level policy keys and unknown fields in nested rule entries
  • require exact positive integers for version and max_bytes, excluding booleans
  • reject empty required paths without including policy values in errors
  • document duplicate YAML key behavior

Verification

  • env -u PYTHONPATH .venv/bin/pytest (62 passed, 99.15% coverage)
  • Ruff lint and format checks
  • strict mypy
  • strict MkDocs build
  • uv build and Twine metadata checks
  • fresh-wheel import/CLI smoke
  • malformed-policy rejection probes

Independent review: Kanban task t_d0bdf41e.

## Summary - reject unknown top-level policy keys and unknown fields in nested rule entries - require exact positive integers for `version` and `max_bytes`, excluding booleans - reject empty required paths without including policy values in errors - document duplicate YAML key behavior ## Verification - `env -u PYTHONPATH .venv/bin/pytest` (62 passed, 99.15% coverage) - Ruff lint and format checks - strict mypy - strict MkDocs build - `uv build` and Twine metadata checks - fresh-wheel import/CLI smoke - malformed-policy rejection probes Independent review: Kanban task `t_d0bdf41e`.
fix(policy): reject deceptive schema values
All checks were successful
CI / Validate lint, typing, tests, docs, and build (pull_request) Successful in 2m51s
Docs site / Validate docs build (pull_request) Successful in 1m44s
8a3970d673
clawlter changed title from WIP: fix(policy): reject deceptive schema values to fix(policy): reject deceptive schema values 2026-07-11 09:55:18 -04:00
mehalter approved these changes 2026-07-11 17:16:49 -04:00
Author
Owner

Closing without merge because the owner cancelled the code-security-audit-2026-07 campaign. This does not revert previously merged work.

Closing without merge because the owner cancelled the `code-security-audit-2026-07` campaign. This does not revert previously merged work.
clawlter closed this pull request 2026-07-14 08:15:07 -04:00
All checks were successful
CI / Validate lint, typing, tests, docs, and build (pull_request) Successful in 2m51s
Required
Details
Docs site / Validate docs build (pull_request) Successful in 1m44s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawlter/policyglass!11
No description provided.