Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALD-11 | Add reCAPTCHA component #197

Closed
wants to merge 6 commits into from

Conversation

NuriaExtremadouro
Copy link
Contributor

@NuriaExtremadouro NuriaExtremadouro commented Feb 28, 2024

Description

  • Added reCAPTCHA component.
  • Added tests and docs in the Readme. Note that the test for the component is rather simple because we would just testing a third-party library.

Related Issue

  • ALD-11 -> Adding the reCAPTCHA component.
  • ALD-12 -> Receiving the key from the form data passed to the library.

Motivation and Context

How Has This Been Tested?

Tested both manually and with unit tests to verify that:

  • The form submits when there's no reCAPTCHA.
  • The form submits when there's reCAPTCHA but it doesn't detect a bot.
  • The reCAPTCHA modal shows to verify the user is not a bot when it detects bot-like behavior. Upon completing the reCAPTCHA (selecting images that match a word) the form submits normally.

Note that at the end of the testing the reCAPTCHA question has been removed from the example form. The reason is because it requires a key to work, so it would block anyone from using the example since they'd need a valid reCAPTCHA key to run it locally.

Screenshots (if appropriate):

ReCAPTCHA presence in the page:
Captura de Pantalla 2024-02-28 a las 13 55 48

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Install scripts npm/core-js@3.36.0
  • Install script: postinstall
  • Source: node -e "try{require('./postinstall')}catch(e){}"
  • orphan: npm/core-js@3.36.0
Install scripts npm/core-js-pure@3.36.0
  • Install script: postinstall
  • Source: node -e "try{require('./postinstall')}catch(e){}"
  • orphan: npm/core-js-pure@3.36.0

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/core-js@3.36.0
  • @SocketSecurity ignore npm/core-js-pure@3.36.0

@NuriaExtremadouro
Copy link
Contributor Author

Closing this PR in favor of branch ald-11-add-recaptcha-component-bis

@NuriaExtremadouro NuriaExtremadouro deleted the ald-11-add-recaptcha-component branch February 28, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant