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

Password Strength Laravel Package

schuppo/password-strength

Laravel validation rule that scores password strength with the zxcvbn estimator and rejects weak passwords. Configure a minimum score, customize error messages, and use it in form requests or inline validation rules. Simple to install and integrate for safer user accounts.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged. The package is a Laravel validation rule — a leaf dependency in the request-validation layer, not a service. That is architecturally cheap: it sits alongside required|string|min:8 in a FormRequest, touches no domain model, holds no state, and introduces no new runtime (no queue, no cache, no external HTTP call). It is appropriate only inside a Laravel application; outside Laravel it has essentially no value because it depends on illuminate/validation and Laravel's translator/message conventions. It also solves only one part of the problem — password strength estimation at the boundary — and does nothing for credential-stuffing defense, rate limiting, MFA, or breach-list checks, all of which carry more security weight than a composition heuristic.

Integration feasibility. Mechanically trivial, and now marginally more credible: v2.7 explicitly claims Laravel 10.x support, which removes the biggest unknown for teams on Laravel 10. composer require, service-provider auto-discovery (Laravel 5.5+), optionally vendor:publish for config, then add the rule to registration/password-reset/change-password requests. Realistic effort for a competent Laravel engineer is half a day including tests, assuming version constraints resolve. The uncertainty was compatibility, not effort — v2.7 reduces that uncertainty for one additional major but does not eliminate it (see below).

Technical risk.

  • Vendor risk. 143 stars and 0 dependents is a strong signal of low community surface area. v2.7 is a positive signal — the package is not abandoned — but one compatibility-only release is thin evidence of sustained maintenance. Single-maintainer packages in the auth path remain a liability: if the maintainer stops, the package becomes a blocker on the next PHP/Laravel major upgrade.
  • Algorithm obsolescence. Unchanged by v2.7 and still the dominant risk. This is a Laravel 4-era complexity/entropy-style estimator. NIST SP 800-63B and current OWASP guidance argue against composition rules (uppercase/symbol mandates) in favor of length plus screening against breached and common passwords. A validator that rewards P@ssw0rd1! while rejecting a long passphrase is actively counterproductive. A compatibility release does not touch this.
  • Capability gap. No native Have I Been Pwned / breached-corpus check. Laravel's own Password rule with ->uncompromised() already provides k-anonymity HIBP screening, and zxcvbn-php provides a materially better estimator. Both are stronger defaults than this package. Unchanged.
  • Security surface. Plaintext passwords pass through this code. The assessment must confirm it does not log, cache, or persist the value, and that exceptions do not surface the input in stack traces. The release note gives no reason to re-examine this, but a version bump is a natural point to re-read the diff.
  • Overlap and drift. Adopting both this and Laravel's built-in password rule creates two sources of truth for password policy, which will diverge silently. Unchanged.
  • Compatibility horizon. v2.7 supports Laravel 10.x. It does not claim Laravel 11 or 12. Since Laravel 11 is already out, adopting this now buys a package that is one major behind current, which sets a timer on the next migration rather than removing it.

Key questions for the maintainer/team.

  1. What is the tested version matrix — PHP 8.2/8.3, Laravel 10/11/12? Partially answered by v2.7: Laravel 10.x is claimed. Remaining: what is the PHP version matrix (8.2/8.3), is the Laravel 10 support backed by a CI job or only declared in composer.json, and what is the intended timeline for Laravel 11/12 support?
  2. What exactly does "score" mean, what is the configurable threshold, and what is the failure mode at the boundary?
  3. Does it include a common-password/dictionary list, or is it purely character-class arithmetic?
  4. Are validation messages translatable through Laravel's standard lang/ pipeline?
  5. Does it fail open or fail closed on unexpected input types?
  6. Is there a named successor, fork, or co-maintainer, and what is our internal exit plan?
  7. What changed between the last release and v2.7 beyond the constraint widening — were any internals, messages, or defaults touched?

Integration Approach

Stack fit. Laravel-only. The viable window is now explicitly Laravel 8–10 applications that already have bespoke regex password rules to retire. For greenfield work, and for any app on Laravel 11+, the built-in Password::defaults() (with uncompromised()) or zxcvbn-php is the better default; this package is a distant third choice on merit, not a first. v2.7 does not change the merit ranking — it only widens the addressable install base by one major.

Migration path. Unchanged and still the most important part of this assessment. Do not call the rule directly from FormRequests. Introduce a thin application-owned Rule class (e.g., App\Rules\PasswordPolicy) that delegates to the package. That wrapper is the real deliverable: it gives a single place to change thresholds, add breach-list checks, and swap the engine for zxcvbn-php or Laravel's built-in rule later without touching call sites. Migration off bespoke regex rules should be incremental — one form at a time, with the old rule retained behind a feature flag until telemetry confirms equivalent or better behavior.

Compatibility. Pin an exact version (^2.7 at minimum), commit the lockfile, run composer audit in CI, and add a job that exercises the rule on the oldest and newest supported PHP/Laravel combos. Confirm the Laravel 10 support is CI-backed rather than a widened constraint — a constraint bump without a test matrix is the classic way a package claims support it does not have. Treat any Laravel major upgrade — 11 and 12 included — as a re-evaluation gate, not a routine bump.

Sequencing.

  1. Verify: confirm v2.7 resolves cleanly against the target app's PHP/Laravel constraints and that the Laravel 10 support is exercised in the package's CI. This is now a cheap, fast check and should happen before any spike work.
  2. Spike: install on a branch, run the rule against a corpus of ~10k real and synthetic passwords (including known-breached ones) and compare verdicts against zxcvbn-php and Laravel's uncompromised().
  3. Decide: if the package's verdicts materially disagree with modern estimators on common weak passwords, stop and use the alternative.
  4. Wrap: implement App\Rules\PasswordPolicy regardless of engine choice.
  5. Roll out: registration first, then password reset and change-password, behind a flag.
  6. Instrument: log pass/fail rates and rejection reasons (never the password itself); tune the threshold against real abandonment data before enabling on the highest-traffic funnel.
  7. Clean up: remove legacy regex rules and the flag.

Operational Impact

Maintenance. Day-to-day cost is near zero — no daemon, no schema, no config drift unless misconfigured. v2.7 shifts the deferred cost slightly: a release after a long gap suggests the maintainer is still present, which lowers (but does not remove) the risk of an unmaintained dependency in the authentication path. The cadence is still thin enough that the team must budget for either a periodic patch/fork review or an explicit decision to replace it within 12–18 months — and the clock now starts one major behind, since Laravel 11 is unsupported. The wrapper from the integration section is what makes that replacement a one-file change instead of a codebase sweep.

Support. Community-only, no SLA, no commercial backing. Internal ownership must be assigned to the team that owns authentication. Escalation path is "we fork it" — plan for that to be acceptable, because it may be the only option. v2.7 does not change this, but it does confirm the fork would be against an actively-touched codebase rather than a dead one.

Scaling. Effectively free and unchanged. The check is CPU-bound on a short string, stateless, and makes no outbound calls, so it adds sub-millisecond overhead and no horizontal scaling concern. The only thing to watch is a future dictionary-backed implementation loading large wordlists into memory per request — verify before assuming it stays cheap.

Failure modes.

  • Composer resolution failure on a PHP/Laravel upgrade — blocks the whole upgrade, not just password validation. v2.7 defers this for Laravel 10 but the same failure is now scheduled for the Laravel 11 move.
  • Silent policy drift if both this rule and Laravel's built-in rule are active and configured differently.
  • Threshold misconfiguration producing either lockout-level friction (abandonment at registration) or a rule so lax it is decorative.
  • Behavioral blind spot — a complexity rule that passes breached passwords, giving a false sense of security to auditors and users alike.
  • Input-type edge cases throwing rather than validating, surfacing as 500s on registration.
  • Message/i18n gaps exposing raw English strings in localized UIs.
  • Plaintext exposure via exception handlers or debug tooling.
  • False comfort from a version bump — treating "supports Laravel 10" as evidence the package is healthy, when the security-relevant gaps are untouched by this release.

Ramp-up. Low for any Laravel developer — under a day to install, configure, test, and wrap, with documentation being the only friction point (thin README, no upgrade guide; v2.7 ships a one-line note and no migration guidance, which is itself indicative). The cognitive load is not in using the package; it is in understanding what its score actually measures well enough to defend the threshold in a security review.

Recommendation. Do not adopt for greenfield, and do not adopt on Laravel 11+. For an existing Laravel 8–10 app, the position is unchanged in substance: adopt only behind an application-owned rule wrapper, only after a comparative corpus test against zxcvbn-php and Laravel's uncompromised(), and with a documented exit plan. v2.7 removes the immediate version-compatibility objection for Laravel 10 teams and is a mild positive signal on maintainer engagement, but it touches nothing that made this a weak choice: the algorithm is still outdated against NIST/OWASP guidance, there is still no breach-list screening, and the package is now one Laravel major behind. The security value added over Laravel core remains small; the long-term maintenance exposure remains.

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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route