Drupal experience
I work professionally with Drupal and maintain Drupal 11 projects using automated testing.
I am applying for permission to opt projects into Drupal's security advisory coverage policy using the TOPdesk Incidents module.
Project
TOPdesk Incidents integrates Drupal Webform submissions with the TOPdesk incident API.
The module allows administrators to configure reusable TOPdesk teams and create TOPdesk incidents from Webform submissions. It retrieves TOPdesk reference data directly from the API and supports configuration for categories, priorities, operator groups, impact, urgency, caller information, processing status, and other incident properties.
Why this project exists
Webform provides general-purpose integrations and remote handlers, while TOPdesk Incidents provides a dedicated integration with the TOPdesk incident API, including TOPdesk-specific configuration entities, reference-data handling, incident payload construction, and Webform integration.
Project quality
The 1.0.x branch is developed for Drupal 11. The project uses dependency injection and Drupal services and follows Drupal coding standards and APIs.
Drupal GitLab CI is enabled and currently passes:
- Composer validation
- CSpell
- PHPCS with Drupal and DrupalPractice standards
- PHPStan level 5 with phpstan-drupal and deprecation rules
- PHPUnit unit tests
- Secret detection
The project repository contains documentation, configuration schema, automated tests, and no bundled third-party code.
Security considerations
The module communicates with an external TOPdesk API using Drupal's HTTP client. Administrative configuration is protected by Drupal permissions and routing access requirements. User-facing strings use Drupal translation APIs, and submitted Webform data is passed to the TOPdesk API rather than rendered directly as HTML by the module.
I understand that opting into security advisory coverage means working with the Drupal Security Team when security issues are reported and following Drupal's coordinated disclosure process.
Project link
https://www.drupal.org/project/topdesk_incidents
Comments
Comment #2
vishal.kadamComment #3
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 #4
vishal.kadam1. FILE: src/Form/TopdeskTeamForm.php
Modules which are compatible with Drupal 10 and higher versions are expected to use constructor property promotion.
2. FILE: src/Form/TopdeskIncidentsSettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
Comment #5
ahmetburkanThanks for the review. Both points have been fixed in the 1.0.x branch.
Comment #6
vishal.kadamI am changing priority as per Issue priorities.
Comment #7
anil_bhutia commentedThanks for the updates. I reviewed the 1.0.x branch (commit 376296e) manually; phpcs is clean and the pipeline for that commit is green.
Previously raised points
TopdeskTeamForm: constructor property promotion is in place. Assigning$this->entityTypeManagerby hand is correct, becauseEntityFormdeclares that property untyped.TopdeskIncidentsSettingsForm: all elements now use#config_targetand there is no manual save left. Using aConfigTargetwithToConfig::NoOpfor the token is a nice touch.Security: I found nothing blocking. The token is never shown back, changing the URL or username requires the token again, HTTPS is enforced in both the form and the client, redirects are disabled, the permission is restricted, and there are no AJAX or proxy routes. One suggestion: by default the application token is saved in active config, so it ends up in
config/syncand git afterdrush cex. The README documents settings.php overrides, which is good; please consider optional Key module support, and'#disabled' => TRUEon the token field whenhasOverrides('api.password')is TRUE.src/Plugin/WebformHandler/TopdeskIncidentsWebformHandler.php
submitForm(). Webform calls handlers'submitForm()for the "Save draft" button and fromWebformSubmissionForm::wizardSubmit()on every Next/Previous page, not only on the final submit. Multi-page forms and forms with drafts will therefore create duplicate or half-filled incidents. Please move this topostSave()and only act when$webform_submission->getState() === WebformSubmissionInterface::STATE_COMPLETED, asRemotePostWebformHandlerdoes.topdesk_team,field_mapping.caller_email) have no schema. Webform looks upwebform.handler.[%parent.id], so please addwebform.handler.topdesk_incidentstoconfig/schema/topdesk_incidents.schema.yml; otherwise strict config schema checks fail as soon as a webform with this handler is saved in a test.getSummary()override. The base class returns'#theme' => 'webform_handler_topdesk_incidents_summary', which the module does not define, so the handlers page logs a missing theme hook. OverridegetSummary(), or add the theme hook in an OOP hook class (#[Hook('theme')]).src/Form/TopdeskTeamForm.php / src/Service/TopdeskReferenceData.php
/operatorgroupsrequests, and the form is built again on submit. Consider caching the lists incache.defaultwith a short max-age (or a refresh button), invalidated when the API settings change.src/Service/TopdeskIncidentManager.php
NULLis returned without a log entry. Please log a warning through the module's logger channel so site owners can see why incidents are missing.Minor
TopdeskClient::request()logs the exception message, which includes a summary of the TOPdesk response body and may contain submitted personal data. Consider logging only the status code and URL.IncidentPayloadBuildersends all submission data, including hidden, private and computed elements. You might let the handler choose which elements to send.topdesk_incidents_data.api.phptotopdesk_incidents.api.php.topdesk_incidents.routing.ymlduplicate the entitylinks;route_provider: ['html' => AdminHtmlRouteProvider::class]would let you drop them.TopdeskIncidentsSettingsForm::submitForm()redirects to the route it is already on; that is not needed.Tests: the unit coverage is good and the HTTP client is properly mocked. Please consider one Kernel test (install config, save a webform with the handler, which would catch the schema issue) and one Functional test for route access and a multi-page submission.
Setting to Needs work for the duplicate-incident issue and the missing handler schema; the rest are suggestions.
Comment #8
vishal.kadam