Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Honey Laravel Package

lukeraymonddowning/honey

A simple Laravel honeypot package that protects forms from spam bots without CAPTCHAs. Add a hidden field, and Honey silently rejects submissions that fill it, keeping forms user-friendly and spam-free.

Deep Wiki
Context7

Technical Evaluation

Architecture fit. Honey is a thin, framework-native package: a middleware in the HTTP kernel, a Blade directive (@honey) that injects a hidden honeypot field plus an encrypted timestamp/parent-name payload, a cache-backed IP blocklist, and an optional Recaptcha verifier. It ships no migrations, no queues, and no long-running processes, so it slots into the request lifecycle without touching domain code. This is a strong fit for a traditional server-rendered Laravel monolith with HTML form posts (contact, registration, newsletter, checkout). It is a weak fit for API-only services, JSON clients, or mobile apps, because the honeypot contract assumes a rendered form and a full page submit — applying the middleware broadly to /api/* would reject legitimate clients that never had a field to fill.

Integration feasibility. Low. Composer install, config publish, middleware registration in the web group (or per-route group), and one directive per form. The Recaptcha path adds key provisioning, front-end script inclusion, and consent-banner implications under GDPR/ePrivacy. Realistic estimate for a mid-size app: 1–3 engineer-days to instrument primary public forms, plus QA time for false-positive testing.

Technical risk. The dominant risks are false positives and misconfiguration, not defects:

  • Honeypot false positives. Password managers and aggressive browser autofill can populate hidden inputs, silently blocking real users. This is the single most common complaint pattern for this technique.
  • IP resolution behind proxies/CDNs. If trusted proxies are not configured, $request->ip() returns the load balancer or Cloudflare edge IP; blocking it can lock out a large fraction of traffic. Conversely, CGNAT and corporate NAT mean one bot can get an entire office blocked.
  • Cache dependency. The blocklist lives in the cache store. The array driver makes blocking per-request and effectively useless; multiple app nodes with non-shared caches produce inconsistent enforcement.
  • SPA/Inertia/Livewire. The Blade directive does not exist in a React/Vue form; the honeypot payload must be threaded through props and re-submitted manually. Livewire component submissions need separate handling.
  • Recaptcha coupling. Google availability, v3 score tuning, CSP allowances for the JS, and a fail-open vs. fail-closed decision under latency or outage.
  • Supply chain. Repository metadata is unavailable in this record and the release date is future-dated relative to typical review cycles — provenance, maintainer identity, and the actual Laravel/PHP version constraints must be verified against Packagist and the tagged source before adoption.

Key questions.

  1. Which Laravel and PHP versions are actually supported by the latest tag, and is there a CI matrix proving it?
  2. Does the package support v3 scoring thresholds, or only v2 checkbox/hidden flows?
  3. Is there a log-only / dry-run mode, or must we wrap the middleware to observe before enforcing?
  4. Where exactly is the blocklist keyed and what is the default TTL? Can we segment it per-tenant or per-form?
  5. How does the encrypted honeypot payload behave across load-balanced nodes — is APP_KEY shared, as required?
  6. What is the intended path for JSON/API endpoints and for Inertia or Livewire forms?
  7. Who maintains it, what is the issue-response history, and is there a security contact?

Integration Approach

Stack fit. Best suited to Laravel 9–11 monoliths on PHP 8.1+, using Redis or database cache, behind a known proxy (configure TrustProxies). Recaptcha requires outbound HTTPS from both browser and app server. If the estate is Inertia/React or a separate SPA, treat Honey as a server-side-only component and hand-build the client field.

Migration path. Adopt in a narrow wedge rather than globally: start with the two or three highest-abuse public forms, run the honeypot in observe-only mode (custom wrapper middleware that logs would-be blocks), compare flagged submissions against a human-reviewed sample, then enable blocking. Recaptcha should be a later, separately gated step because it changes the user-facing UX and consent posture.

Compatibility. Verify: Laravel version constraint, PHP constraint, cache drivers exercised in tests, interaction with EncryptCookies/session middleware ordering, and coexistence with any existing WAF, rate limiter, or legacy CAPTCHA. Watch middleware ordering — Honey should run after session and proxy resolution. Do not register it on the global stack; scope it to the web group or explicit route groups.

Sequencing.

  1. Provenance and security review: pin a tag, run composer audit, read the middleware and blocklist code (it is small), confirm license and maintainer.
  2. Spike on staging: install, publish config, add middleware to one route group, add @honey to one form.
  3. Observe-only deployment with dashboards on would-be blocks; establish a baseline spam rate.
  4. Enforce honeypot + IP blocking with conservative TTL; document the unblock runbook.
  5. Tune false positives; add explicit exemptions for password-manager-prone fields and accessibility paths if needed.
  6. Add Recaptcha to the highest-risk form only, decide fail-open default, then expand.
  7. Wire metrics and alerts; revisit after 30 days with real spam and false-positive numbers.

Operational Impact

Maintenance. Small surface area and MIT licensing make it cheap to maintain and trivial to vendor or fork if the upstream goes quiet. The cost is dependency hygiene: pin the version, review changelogs, and re-run composer audit on the normal cadence. Budget a few hours per quarter, plus rework if Laravel majors change middleware or Blade internals.

Support. No SLA, single-maintainer risk, community-issue-only support. The internal runbook matters more than upstream docs: how to inspect the blocklist, how to unblock an IP, which cache key namespace to clear, and how to temporarily disable enforcement during an incident. Train first-line support on "user locked out" as a distinct ticket category with a fast unblock path.

Scaling. Per-request cost is negligible — one cache read on submission paths, plus an outbound Recaptcha call only when that layer fires (expect 100–400ms added to those submissions). The blocklist is TTL-bounded, so cache growth is proportional to abuse volume, not user volume; Redis is the right store. Under horizontal scaling, a shared cache is mandatory for consistent enforcement. The design does not scale to edge-level filtering — pair it with a WAF/CDN rate limiter rather than expecting Honey to absorb volumetric attacks.

Failure modes. Ranked by blast radius: (1) proxy IP blocking due to misconfigured trusted proxies — can take down all traffic; (2) cache misconfiguration making blocking a no-op or, worse, non-deterministic across nodes; (3) honeypot false positives locking out real users via autofill; (4) Recaptcha outage with fail-closed policy blocking all submissions; (5) middleware applied to API routes, breaking integrations; (6) bot adaptation over time eroding effectiveness, requiring periodic re-tuning. Each needs a documented detection signal and a one-step rollback (remove middleware from the group).

Ramp-up. One to two days for a Laravel-fluent engineer to be productive; the concepts (honeypot, encrypted timestamp, cache TTL blocklist) are simple. The real ramp-up cost is organizational: teaching QA to test with password managers, autofill, and JS disabled; teaching support to triage lockouts; and getting product sign-off that a small, tunable false-positive rate is an acceptable trade for the spam reduction. Set an explicit success metric up front — e.g., spam submissions down X% with false-positive rate under Y% — and measure it at day 30, because the package's value is entirely empirical.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource