This project is not covered by Drupal’s security advisory policy.

Senua Guard protects a Drupal site's forms from spam and automated abuse. Every form stays locked until a person uses the page, so posts sent straight to a form by a script, and replayed posts, are refused before Drupal handles them, and every post that gets through is kept in the site's own review log with a dashboard and reports.

Features

  • A lock on every form. Log-in, registration, password reset, comments, contact forms, webforms and any other form an anonymous visitor sends open only for a person using the page. A post without a valid token, or with its hidden trap field filled, is answered 403 before Drupal routes it. In our release tests on Drupal 11 and 12 the lock alone refused all 1,100 posts sent straight to the form by a script and all 1,100 replayed posts, and none of 400 genuine people. A sender written to fetch a token first, or one driving a real browser, can still get through the lock; those are what the review log and the service are for.
  • A review log on your own site. Every post that gets through is kept in your database with what happened to it, a dashboard, reports and downloads (CSV and spreadsheet). You choose how many days it is kept; no password or card value is ever stored.
  • A spam reading for comments. With a Senua Guard API key, a comment's text is read for spam by the Senua Guard service. In Enforce mode a comment judged spam is not refused: it is saved unpublished in Drupal's own approval queue, and the review log shows it as Held.
  • Monitor first. The default mode records everything and acts on nothing, so you can see what the module would do before you let it act.
  • Fails open. If the service does not answer within the wait you set (100 ms by default), the post goes through.
  • No tracking, no CAPTCHA, no puzzle. Visitors see nothing unless a post is refused.

What to expect on a new site: the lock and the review log work from the moment the module is enabled, with or without a key. With a key, comments get the spam reading at once. Verdicts based on what is normal for your own site are built and measured on test sites and are not yet turned on for a newly connected site; until then those posts go through and the log says so.

Post-Installation

  1. Give the permission Administer Senua Guard (People, Permissions) to the roles that may open the review log and change the settings. The review log holds what visitors posted.
  2. Open Configuration, System, Senua Guard (/admin/config/system/senua-guard). The module starts in Monitor mode. Under Key Activation, paste your API key if you have one; it is kept in State, never in configuration exports, and never shown again. You can also set $settings['senua_guard_key'] in settings.php.
  3. Open the dashboard at Reports, Senua Guard (/admin/reports/senua-guard).
  4. When the log looks right, switch to Enforce.

Behind a proxy or CDN: the module uses the visitor address Drupal itself reports, so set reverse_proxy and reverse_proxy_addresses in settings.php as you would for Drupal. If they are not set, visitors behind a CDN can be refused; the settings page tells you when it sees this.

What is sent to the service: only with a key, and only in Monitor or Enforce mode: each checked post's method, address, headers (never cookies, Authorization or address headers) and body with every password field replaced, plus the visitor's address and your site's host. Page views are never sent. Details are in the module's README.

Additional Requirements

Drupal 11 or 12 on PHP 8.3 or later. No other module and no Composer dependency: the small PHP client it uses is bundled. The lock and the review log need no account. The spam reading needs a Senua Guard API key from senuaguard.au (there is a free plan).

None required. It works alongside Drupal's comment approval queue, Contact and Webform.

Similar projects

Honeypot and Antibot also stop scripted posts without a CAPTCHA; CAPTCHA and reCAPTCHA ask the visitor to prove they are a person. Senua Guard differs in keeping a review log of every post with reports on your own site, in binding each form's token to the visitor so a copied form cannot be replayed, and in adding a spam reading of comment text from a service.

Supporting this Module

Developed and maintained by Senua AI Pty Ltd. Report bugs and ask for features in this project's issue queue. For account and service questions: support@senuaai.com.

Community Documentation

Installation guide and manual: senuaguard.au. The module's README covers configuration, the modes, what is sent, and the tests.

Senua Guard reduces spam and abuse; it does not stop all of it. Use it as one layer of your site's defence.

Project information

Releases