Search: audit
search_auditAudit public search exposure by comparing configured searchable fields with signed-in and public results, flagging leaked or missing fields.
Instructions
Compare configured public-searchable fields vs what public search actually returns. Flags any data leaks. Runs the same query (default *) through public and signed-in search for one entity, sampling 5 records by default, and reports any field public search returned that is not marked publicly searchable, plus marked fields that didn't appear. It ends with an error when a leak is found. Fix leaks with fields_update. Returns JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search query to use for the audit (default: '*' — wildcard across all records) | |
| entity | Yes | Entity to audit | |
| sample | No | How many records to inspect (default: 5) |