Add a rule: hidden Payload fields still accept writes; server-only fields need a write guard
Back to our planProblem
The #298 review found that a Payload field with hidden: true is hidden from reads only: Payload still accepts writes to it from the API. A server-only field on a collection anyone can create (heldEmails on form submissions) could be filled in by a visitor and then used by the server. #298 fixed that field (field access create/update/read: false, plus a hook that clears it). Nothing stops the next field from repeating the mistake.
Proposed rule (for docs/guidelines/security.md; a policy change, so it waits for the owner)
A field only the server sets must refuse writes too:
access: { create: () => false, update: () => false }(andreadwhen visitors mustn't see it), not justhidden: true. The server writes it withoverrideAccess: trueor the database adapter. On a collection the public can create, abeforeChangehook also overwrites it on create.
Optionally, accessPolicy.test.ts could check that every hidden field also sets field access.
Question for the owner
Add this rule (A, recommended) or not (B)?
Area
cms
Priority
Medium
Generated by Claude Code, opens in a new tab