[1.0.x] CaptchEtat

Created on 26 April 2024, 2 months ago
Updated 13 June 2024, 13 days ago

Project Description:

This module integrates the CaptchEtat API into Drupal, empowering government websites adhering to DSFR (Digital Services for French Republic) standards with enhanced security measures.

CaptchEtat, a robust solution available through Piste Gouv, provides a distorted CAPTCHA string for the user to copy and serves as a pivotal tool in safeguarding online interactions against automated threats.

Key Features and Benefits:

Enhanced Security: CaptchEtat significantly improves the security posture of government websites by preventing automated bots from accessing sensitive data or submitting unauthorized forms.
DSFR Compliance: By integrating CaptchEtat, Drupal websites can ensure compliance with DSFR standards, which mandate robust security measures for digital services offered by the French government.
User-Friendly CAPTCHA: The CAPTCHA strings generated by CaptchEtat are user-friendly yet effective in distinguishing between human users and bots, enhancing the overall user experience on government websites.
Technical Details:
The CaptchEtat module is implemented as a webform plugin element of type "captchetat," seamlessly integrating with Drupal's webform functionality. Administrators can easily add CaptchEtat CAPTCHAs to their webforms through the intuitive Drupal interface and configure settings to suit their specific security requirements.

Usage Instructions:

For detailed instructions on installing and configuring the CaptchEtat module, please refer to the documentation provided on the project page: CaptchEtat โ†’ Module Documentation.

Visuals:

Below is a screenshot showcasing the CaptchEtat webform plugin in action:

Project link

https://www.drupal.org/project/captchetat โ†’

๐Ÿ“Œ Task
Status

Needs review

Component

module

Created by

๐Ÿ‡ฑ๐Ÿ‡งLebanon ewehbe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ewehbe
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai

    Thank 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.

    • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
    • For the time this application is open, only your commits are allowed.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    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.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool โ†’ only once per application.
    • It may be best to have the applicant fix things before further review.

    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 โ†’ .

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai
  • ๐Ÿ‡ฑ๐Ÿ‡งLebanon ewehbe
  • ๐Ÿ‡ฑ๐Ÿ‡งLebanon ewehbe

    I am changing the issue priority as per issue priorities.

  • Status changed to Needs work about 1 month ago
  • README.md does not follow Drupal's template or best practices โ†’ .

    Remove LICENSE.txt, it will be added by drupal.org packaging automatically.

    The captchetat.module file does not implement hook_help() โ†’ .

     ------ ---------------------------------------------------------------------------------------------------
      Line   pareview_temp/src/Plugin/WebformElement/WebformCaptchetatElement.php
     ------ ---------------------------------------------------------------------------------------------------
      24     Class Drupal\captchetat\Plugin\WebformElement\WebformCaptchetatElement extends unknown class
             Drupal\webform\Plugin\WebformElementBase.
             ๐Ÿ’ก Learn more at https://phpstan.org/user-guide/discovering-symbols
      43     Parameter $webform_submission of method
             Drupal\captchetat\Plugin\WebformElement\WebformCaptchetatElement::prepare() has invalid type
             Drupal\webform\WebformSubmissionInterface.
      56     Drupal\captchetat\Plugin\WebformElement\WebformCaptchetatElement::form() calls parent::form() but
             Drupal\captchetat\Plugin\WebformElement\WebformCaptchetatElement does not extend any class.
     ------ ---------------------------------------------------------------------------------------------------
    

    No automated test cases were found, did you consider writing Simpletests โ†’ or PHPUnit tests โ†’ ? This is not a requirement but encouraged for professional software development.

    There are a lot of issues with the JS files.

    jquery-captcha.js

    MANY Unexpected var, use let or const instead
    19:28 error '_getCaptchaStyleName' was used before it was defined
    53:22 error '_getInstance' was used before it was defined (there are more lines where this happens)
    92:1 Put optionsยท||ยท{} on its own line
    101:20 error '_onLoadScriptsSuccess' was used before it was defined
    120:22 error 'NULL' is not defined
    All 'var' declarations must be at the top of the function scope

    And more. I recommend running ESLint on the JS files.

    In addition, while this isn't related to the code itself, that old style of captcha can easily be read and defeated by an AI now. It's basically useless at verifying that someone is a human.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai

    LICENSE.txt is not a mandatory file, but it can be left, as long as the license is the same used by Drupal core.

  • Status changed to Needs review about 1 month ago
  • ๐Ÿ‡ฑ๐Ÿ‡งLebanon ewehbe

    Thank you for this review.

    • I have modified the README.md file.
    • Removed the LICENSE.txt.
    • Added the hook_help().
    • Didn't write automated test cases.
    • Fixed some of the issues related to jquery-captcha.js. (This file is provided by the Captchetat API and on the 6th of June a new version V2 will be released).

    Thank you again for your time, I will change the status to Needs review.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The LICENSE.txt file is added to the package drupal.org automatically creates, but it is still necessary for the repository, although the license for projects hosted on drupal.org cannot be different from the license used for Drupal core.

    At the times drupal.org used CVS, the license file was not necessary because a single repository was used for all the projects, including Drupal core, and the license file in the root directory was valid for all the hosted projects. With Git repositories, that is no longer true.

  • ๐Ÿ‡ฑ๐Ÿ‡งLebanon ewehbe

    Thank you @apaderno for this information.

  • @apaderno Then I think the PAReview.sh script should be updated. My comment about the LICENSE file is from that script's output.

  • ๐Ÿ‡ฑ๐Ÿ‡งLebanon ewehbe

    I am changing the issue priority as per issue priorities.

Production build 0.69.0 2024