Views Code Data provides a "Code" display plugin for Views that returns raw PHP arrays, JSON, JSONL, or CSV instead of rendered markup. Designed for programmatic use in services, controllers, queue workers, and migrations.
Drupal compatibility: 10.3+ / 11
PHP requirement: 8.1+
Security considerations:
- No direct user input handling — all data flows through the Views query builder and field handlers
- Output uses #plain_text (not #markup) for preview rendering to prevent XSS
- Form output previews use htmlspecialchars() with ENT_QUOTES
- No raw SQL — all queries go through Views' query abstraction
- Respects Drupal's entity field access system (fields are filtered by user permissions)
- No custom routes or HTTP responses — the display is purely programmatic
Test coverage:
- 27 kernel tests (ViewsCodeManager service)
- 4 kernel tests (RawData style plugin)
- 7 kernel tests (Code display plugin)
- 2 functional tests (Views UI integration)
Comments
Comment #2
vishal.kadamComment #3
avpadernoThank you for applying!
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
avpadernoRemember to change status, when the project is ready to be reviewed. In this queue, projects are only reviewed when the status is Needs review.
Comment #5
avpadernoI am closing this application, since its status has been Active for two weeks or more. The applicant has not commented in this issue and does not seem to follow it either.