Channel Publisher (machine name content_syndication) publishes Drupal nodes to external social platforms. The first supported platform is a Facebook Page, through the Graph API. Editors queue a post from the node form. A queue worker then publishes it, with retries, exponential backoff and rate limiting. Optionally, a configured AI provider through the AI module drafts captions and hashtags. Platforms are plugins, so other networks can be added without changing the core queue logic.
About me
I am a solutions architect and technical lead at Riva Solutions Inc., where I build and maintain Drupal web applications for federal government clients, along with the AWS infrastructure and DevOps tooling around them. I have worked with Drupal for 18 years. My Drupal.org username is the-letter-d.
Channel Publisher is my first project submitted for security advisory coverage. It came out of internal work on AI-assisted publishing at Riva, and I released it to share it with the community.
Manual reviews
- https://www.drupal.org/project/projectapplications/issues/3626090#commen...
- https://www.drupal.org/project/projectapplications/issues/3626889#commen...
- https://www.drupal.org/project/projectapplications/issues/3625244#commen...
Comments
Comment #2
dietric@gmail.comComment #3
dietric@gmail.comComment #4
vishal.kadamComment #5
ptmkenny commentedBased on the request in Slack, I did a review, and here are my findings:
First, this module appears to be mostly written with AI (at least the documentation and the comments seem like they were written by AI). This is fine, but I think the project page https://www.drupal.org/project/content_syndication should disclose the use of AI; the AI disclosure policy is not completely clear on this point (it mostly talks about making contributions to modules, not a module you yourself contribute), but I think the trend in Drupal is toward more transparency.
In SETUP_GUIDE.md, there are instructions to run the command
drush pm:enable content_syndication key node. key and node modules are dependencies of content_syndication, so there is no reason to name the dependencies in pm:enable; the command should just bedrush pm:enable content_syndication. The dependencies will be automatically installed.The PHPStan baseline is ignoring "Access to an undefined property" and "Call to an undefined method"; these should generally be fixed and not ignored, because if you actually call an undefined method Drupal will usually crash. Sometimes this is actually fine and all you have to do is help PHPStan identify the type (for example, with a $object instanceOf class).
The README.md does not follow the Drupal.org README template; instead, it reads more like an AGENTS.md. The README.md is often read by people evaluating whether your module is a good fit for their use case, so it should have a high-level summary of the module. This README has a lot of lists and details which make it find what you're looking for. I would create a new README based on the template, and then move the documentation for agents into an AGENTS.md.
You have a custom exception, which is a good practice. However, that exception is
class PublishException extends \Exception {}; PublishException is a pretty generic name, and your module is called content_syndication, so I would create a base ContentSyndicationException and then make PublishException extend ContentSyndicationException. This way, developers with complicated logging needs can easily filter all exceptions from your module.In your cspell word list, you have "Syndication" and "syndication". This is fine, but you can simplify it to "~syndication".
The account form (https://git.drupalcode.org/project/content_syndication/-/blob/1.0.x/src/...) doesn't have any validation. Generally, forms should always validate when submitted.
In the tests, "Tests: Does something" is OK, but the normal way to write docblocks is "Tests that ..."
Limitations of my review:
I read the code myself and did not run anything. Due to lack of time, I did not dig into how the module sanitizes input, which is an area of concern for a module like this.
Comment #6
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 #7
avpadernoLICENSE.txt
The LICENSE.txt file is expected to be the same LICENSE.txt file used by Drupal core.
Comment #8
avpadernoComment #9
vishal.kadam1. FILE: content_syndication.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.
2. FILE: src/SyndicationAccountListBuilder.php
FILE: src/Service/SyndicationTransformerService.php
FILE: src/Plugin/PublisherPlatformBase.php
Modules which are compatible with Drupal 10 and higher versions are expected to use constructor property promotion.
3. FILE: src/Entity/SyndicationAccount.php, src/Plugin/QueueWorker/SyndicationPublishWorker.php
Projects that are compatible with Drupal 10 or higher versions should use attributes instead of annotations.