Search by

verbb / protect

verbb

Shared protection infrastructure for untrusted user-generated actions.

Package info

github.com/verbb/protect

Documentation

pkg:composer/verbb/protect

Fund package maintenance!

verbb

Statistics

Installs: 23

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-11-25 00:48 UTC

This package is auto-updated.

Last update: 2026-11-25 02:05:28 UTC


README

Note

Protect isn't a plugin for site owners to install. It's a library for your own Craft plugins and modules, and it arrives on a site as a dependency of the plugin that uses it, such as Comments.

Protect icon

Protect for Craft CMS

Protect is a Craft CMS library that gives your plugins and modules shared spam and abuse protection for anything the public submits, such as comments, contact messages, reviews or votes. It checks each attempt for the signs of spam and abuse and tells your code what it found, so you don't build the same checks again for every form. Your code still decides what happens next, whether that's saving, refusing, slowing someone down or holding a message for review.

Features

  • Passive checks, a honeypot, a minimum form time and a JavaScript check, which visitors never see and which turn away simple bots before anything else runs.
  • Replay protection that makes each prepared form single use, with safe retries through an idempotency key.
  • Rate limits per visitor, per item or site-wide, counted by IP address, user or your own identity signals.
  • A challenge from your choice of provider, verified on the server against what its token was issued for.
  • Spam classification of what a submission says, with mistakes reported back to the service.
  • One result listing what each check found, so your code responds without parsing messages.
  • A bundled browser script and the @verbb/protect npm package, which add a form's evidence and run its challenge widget.

Providers

Documentation

Visit the Protect documentation for all documentation, guides and developer resources.

Support

Get in touch with us by creating a GitHub issue.

Sponsor

Protect is licensed under the MIT license, so it will always be free and open source. If you'd like to support it anyway, you can sponsor its development.

Verbb