Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
19 Mar 2026 at 04:58 UTC
Updated:
21 Jul 2026 at 17:25 UTC
Jump to comment: Most recent
Comments
Comment #2
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
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 #3
ahmad khader commentedI am changing priority as per Issue priorities.
Comment #4
vishal.kadam1. FILE: README.md
The README file is missing the required section - Configuration.
2. FILE: ai_file_to_text.module
For a new module that aims to be compatible with Drupal 10 and Drupal 11, I would rather implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
It would require increasing the minimum Drupal 10 version supported, but Drupal 10.1 is no longer supported.
3. FILE: src/Pdf/HtmlRenderer.php
FILE: src/Pdf/LinkExtractor.php
New modules, which are compatible with Drupal 10 and higher versions are expected to include type declarations in property definitions, and use constructor property promotion.
Comment #5
ahmad khader commentedFixed, please recheck.
Comment #6
vishal.kadamI don’t see any changes in the 1.0.x branch.
Comment #7
ahmad khader commentedApologies, this should be pushed now. https://git.drupalcode.org/project/ai_file_to_text/-/commit/d6cea3ff0e05...
Comment #8
vishal.kadamFILE: ai_file_to_text.module
Since the module is declared compatible with Drupal 10.3, removing the function implementing the hook is not possible. The function still needs to be defined, but it calls the method defined by the service class, as described in Support for object oriented hook implementations using autowired services (Backwards-compatible Hook implementation for Drupal versions from 10.1 to 11.0).
Comment #9
ahmad khader commentedThanks for pointing that out.
I added BC please check it.
Comment #10
vishal.kadamRest seems fine to me.
Please wait for other reviewers and Project Moderator to take a look and if everything goes fine, you will get the role.
Comment #11
batigolixThe README is technically thorough, but deviates from the drupal.org README template in structure and scope.
Although not strictly required it is good practice to provide a readme that follows the the drupal.org README template
AI-oriented content — a significant portion of the README (Architecture, Key classes table, capability groups, ExtractorInterface method table) reads more like structured context for AI agents or LLMs than traditional developer documentation. At 349 lines, the README functions as an architecture reference document. Consider moving the deep technical content (lines 14–76: architecture, dynamic type registration, capability groups, key classes table) to a separate
AGENTS.mdor developer documentation, and keeping the README focused on getting started.Comment #12
ahmad khader commentedThanks for the review, @batigolix.
I agree with your point, so I restructured the README to follow the drupal.org README template. The deep technical content has been moved to a separate ARCHITECTURE.md.
I chose ARCHITECTURE.md rather than AGENTS.md because this information isn't only useful for AI agents; any developer who wants to understand how to add a custom extractor. Naming it AGENTS.md would imply the content is agent-specific, when in reality it serves all developers and contributors equally.
Comment #13
ahmad khader commentedI am changing priority as per Issue priorities, Any updates?
Comment #14
avpadernosrc/Pdf/HtmlRenderer.php
When strings are concatenated to obtain HTML markup to output, it is probably better to use a theme function or a render element as described in Render API overview.
Drupal core has a theme function to render ordered and unordered lists.
Drupal core has also a theme function to render tables.
Drupal modules are supposed to return render array, not to build HMTL markup by concatenating strings. The task of returning a string from a render array is the task of render elements and theme functions.
src/Pdf/PdfToHtml.php
Code compatible with latest Drupal releases should use property promotion.
The files contained in the PDF directory does not seem to contain Drupal-related code, nor is that code for plugins. Each class should at least define a service class and used as service.
Comment #15
vishal.kadamComment #16
ahmad khader commentedHey @avpaderno, thanks for the review!
The reason I didn't add any Drupal functionality to the PDF folder initially was that I wanted to move it to the vendor directory so it could be used elsewhere. I've moved it now. I was planning on doing this before a stable release to avoid pushing into two projects, but I figured it would be unfair to hold off on it while doing the project application. I've also updated `PdfToHtml` to use constructor property promotion, although I suppose it's not as important now :D
Comment #17
vishal.kadamI am changing priority as per Issue priorities.
Comment #18
vishal.kadamI am changing priority as per Issue priorities.
Comment #19
brian.willows@hsj.co.uk commentedReviewed the 1.0.x branch, focusing on the document-parsing surface. Several things are handled well: the Poppler calls pass file paths through escapeshellarg() (no command injection), the AiFunctionCall entry point checks $file->access('view', $account) before reading, the HTML-building extractors escape content with htmlspecialchars(ENT_QUOTES), and Poppler temp files are unlink()ed.
Points worth addressing:
I use Assisted AI but I review what it generates
Comment #20
avpadernoComment #21
ahmad khader commentedThanks for the thorough review, and for confirming the escaping,
escapeshellarg(), file-access, and temp-file handling all hold up. I've addressed the three points below. The on-disk size cap can be handled ondocument_loadersince we're planning to remove the function call plugin from this module on the same release.Added a guard that runs before any parser touches the file, at the single choke point every entry point routes through (file field, AI automator, function call), and tests were added as well.
I own the package :)
Done.
Comment #22
brian.willows@hsj.co.uk commentedFollow-up review of a9750af on 1.0.x. The decompression-bomb guard is implemented the right way: it reads the archive's central directory via ZipArchive::statIndex (which decompresses nothing), refuses files whose entry count or total declared uncompressed size exceed the limits, logs the refusal, and the limits are overridable per site in settings.php. It sits ahead of the single extract() call that both the document-loader and AI function-call paths flow through, and the new unit tests cover the refusal paths.
The XML hardening matches what was suggested: LIBXML_NONET on both OdtExtractor loads and on the Poppler XML parse, with the code comments correctly noting that external entity resolution is already off by default on PHP 8.1+ and that this is defence in depth.
On the pdf-to-html dependency, the applicant owning the Packagist package answers the provenance question - the supply chain is the same author as the module itself.
Everything raised in my earlier review is addressed - ready for coverage from my side.
I use Assisted AI but I review what it generates
Comment #23
brian.willows@hsj.co.uk commentedComment updated above
Comment #24
avpadernoThank you for your contribution and for your patience with the review process!
I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.
These are some recommended readings to help you with maintainership:
You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank also all the reviewers for helping with these applications.
Comment #25
avpadernoComment #27
avpaderno