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

Laravel Password Exposed Validation Rule Laravel Package

jord-jd/laravel-password-exposed-validation-rule

A Laravel validation rule that checks passwords against the Have I Been Pwned database, helping you reject known-breached credentials during registration or password changes. Simple to add to form requests and validators.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • A single-purpose Laravel validation rule (breach/compromised-password check, inferred from "breach lookups" and string-representation handling). It sits at the framework's validation layer, so it composes with FormRequests, Validator::make, and Password:: rule chains without touching domain code.
  • No migrations, no queue workers, no persistent state implied — it is a leaf dependency, which is the lowest-friction category of package to adopt.
  • The headline of this release is breadth rather than depth: one artifact now spans PHP 7.4 → 8.5 and Laravel 8 → 13. That is attractive for a heterogeneous estate but means the maintainer is carrying runtime branching and a wide CI matrix.

Integration feasibility

  • composer require, add the rule to a field's rule array, done. Realistic effort: hours, not days.
  • The material change is the non-string handling: values that are not strings (ints, arrays, null, bools) now defer to Laravel's own string/type rules instead of triggering a conversion warning and a lookup. This is a correctness improvement, but it is an application-visible behavior change — validation that previously passed or failed with a warning may now resolve differently depending on whether a string rule is present.
  • Objects exposing __toString() continue to be evaluated, which preserves the sensible path for value objects and UUID/email wrappers.

Technical risk

  • Low-to-medium overall. The package itself is small; the risk concentrates in two places.
  • First, the external dependency: a synchronous outbound lookup per validation. Latency, rate limiting, and upstream availability are the real availability surface of the integrating service.
  • Second, forward-looking support claims (Laravel 13, PHP 8.5) that few consumers can yet exercise. Adopting the newest majors early means being the de facto tester.
  • The PHP 7.4 floor is a double-edged signal: good for legacy coexistence, but it forces compatibility shims that can produce version-specific bugs and complicate security patching. Worth confirming whether the floor is a genuine support commitment or just an untested lower bound.

Key questions

  • Is the breach lookup configurable — timeout, retry, cache, and crucially a fail-open vs fail-closed policy on upstream failure?
  • Is there an offline/local dataset or custom resolver option for air-gapped or egress-restricted environments?
  • What exactly changed for non-string inputs, and is there a documented before/after table? Are there cases where a previously rejected value now passes?
  • Is the CI matrix real — does it actually execute against PHP 7.4 and Laravel 13, or is support declared from static analysis?
  • What is the maintainer model (bus factor, cadence, security disclosure channel) and is there a published support/LTS policy?
  • Does the rule compose cleanly with Password::min()->uncompromised() and other rules in the same chain, and what is the recommended ordering?

Integration Approach

Stack fit

  • Native fit for any Laravel application using the validator; also fine for Lumen-style or Laravel-adjacent setups that pull in illuminate/validation. No framework-level configuration required beyond an optional published config for timeouts/caching.
  • Fits naturally in FormRequest rules(), in register/reset-password flows, and in API validation via Validator::make.

Migration path

  • Treat this as a patch-level composer bump (6.0.x → 6.1.0) but triage it as behaviorally significant: semver-minor does not cover changes in validation outcomes for non-string payloads.
  • Concrete steps: lock the version, read the release notes and the new composition documentation, grep the codebase for every usage of the rule, and check whether any of those fields can receive non-string input from JSON payloads (a common source: integers and arrays from loosely typed clients).
  • Add or update tests asserting the rule's behavior for null, int, array, bool, Stringable, and a normal string before rolling forward.

Compatibility

  • The dual-ended support window is the main practical benefit: one version can serve both a legacy Laravel 8 service and a modern Laravel 11/12 service in the same portfolio, avoiding a fork or a parallel major.
  • Verify the actual tested matrix before relying on it, and confirm that transitive constraints (Guzzle/HTTP client, illuminate/support) resolve in each target app.

Sequencing

  1. Audit and inventory all usages; classify each field as string-only or potentially non-string.
  2. Add regression tests for the type edge cases in a branch, and confirm the new behavior is what you want.
  3. Establish the operational policy first: timeout, cache TTL, and fail mode. Do not ship the upgrade before this decision exists.
  4. Enable egress/allowlist rules and validate in a non-production environment with realistic latency.
  5. Canary one low-risk service (e.g. internal admin password reset) and watch p95 latency plus error rates.
  6. Roll to remaining services; defer Laravel 13 / PHP 8.5 adoption entirely to the existing framework upgrade windows rather than letting a validation package pull the platform forward.

Operational Impact

Maintenance

  • Low ongoing maintenance for consumers; the burden sits with the maintainer. The wide support window raises per-release cost and can slow security fixes, so pin to a known-good minor and subscribe to advisories rather than floating on ^6.
  • Expect periodic releases whose notes are mostly about the support matrix — read them for behavioral deltas, not for feature value.

Support

  • Small support surface (one rule), but a subtle one: behavior can differ across PHP versions due to string/type handling. Internal docs should state the expected outcome per input type so on-call engineers are not debugging validator semantics at 2am.
  • The new documentation on composing with Laravel validation is worth mirroring internally with your own examples, since the framework's own string rule interaction is now part of the contract.

Scaling

  • Validation is on the hot path of every request that touches it. A synchronous outbound HTTP call per validation is the dominant scaling concern — this package can single-handedly define your p99 for signup and password-reset endpoints.
  • Mitigations to require before broad rollout: short timeouts (sub-second), a response cache keyed by hash prefix (the upstream k-anonymity model is designed to be cacheable), a bounded connection pool, and a circuit breaker.
  • Also account for egress cost and for the fact that a burst of signups produces a correlated burst of upstream calls — this is a thundering-herd shape, not a smooth load curve.

Failure modes

  • Upstream API latency, outage, or 429 rate limiting: with fail-closed, signups and password resets stop; with fail-open, you lose the security guarantee silently. Pick deliberately and log the fallback.
  • DNS or egress-policy block in locked-down environments: manifests as a hard failure at the worst moment (first real user), so test in a network-restricted environment.
  • Type-handling change: a field that previously warned and passed may now be rejected, or vice versa, if the companion string rule was never added. This surfaces as a user-facing validation error with no obvious cause.
  • Compliance/security review friction: password material leaves the process boundary. The design mitigates this (prefix-based lookups), but the review still needs a written statement of what is transmitted and what is not.

Ramp-up

  • Engineer ramp-up is genuinely low — a Laravel-fluent developer can wire and test this in an afternoon.
  • The non-trivial ramp-up is organizational: the cache/timeout/fail-mode policy decision, the security review sign-off, and the egress configuration. Budget for those, not for the code.
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.
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen