PHPackages                             nidhognit/pass-security-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. nidhognit/pass-security-bundle

ActiveSymfony-bundle[Security](/categories/security)

nidhognit/pass-security-bundle
==============================

Symfony PassSecurityBundle

0.3(8y ago)115571MITPHPPHP ^5.5.9 || ^7.0CI failing

Since Feb 14Pushed 6y ago2 watchersCompare

[ Source](https://github.com/Nidhognit/PassSecurityBundle)[ Packagist](https://packagist.org/packages/nidhognit/pass-security-bundle)[ Docs](https://github.com/Nidhognit/PassSecurityBundle)[ RSS](/packages/nidhognit-pass-security-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (11)Versions (4)Used By (0)

PassSecurityBundle
==================

[](#passsecuritybundle)

[![pass security](https://camo.githubusercontent.com/9c2411087723c77e07072f18dbeb901c47d1e9fcb3a189ea37334ffdbdb6001d/68747470733a2f2f6373373035302e757365726170692e636f6d2f633633363432342f763633363432343131352f34643465392f4e50783765526c457464302e6a7067)](https://camo.githubusercontent.com/9c2411087723c77e07072f18dbeb901c47d1e9fcb3a189ea37334ffdbdb6001d/68747470733a2f2f6373373035302e757365726170692e636f6d2f633633363432342f763633363432343131352f34643465392f4e50783765526c457464302e6a7067)[![Build Status](https://camo.githubusercontent.com/976ed871cffe5d6f3c7a60b922c095e459303c63b5ea76c46856013e1c9212a6/68747470733a2f2f7472617669732d63692e6f72672f4e6964686f676e69742f50617373536563757269747942756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Nidhognit/PassSecurityBundle)

The PassSecurityBundle It is designed to help test passwords for entry into the list of unsafe.

Bundle only checks the password in the list, and tells you under what number it was found, the decision about how much it is safe, take you (or you can report it to your users, and to shift the responsibility on them).

I strongly advise against using any password that can be found on this list.

Demo example
============

[](#demo-example)

Website:

Source code:

Instalation
===========

[](#instalation)

If you use composer, open a command console, enter your project directory and execute the following command:

```
$ composer require nidhognit/pass-security-bundle "0.2"
```

Enable the Bundle in AppKernel like this:

```
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new \Nidhognit\PassSecurityBundle\PassSecurityBundle(),
        );

        // ...
    }
    // ...
}
```

The bundle comes with a sensible default configuration. If you need to change them, you can define these in `config.yml` (more information for bundle configuration below).

How to use
==========

[](#how-to-use)

In below example, we imagine, that you want check passwords for user before they submit form:

```
   // ...
    /**
     * @Route("/ajax_password_check")
     * @param Request $request
     * @return JsonResponse
     */
    public function ajaxPasswordCheckAction(Request $request)
    {
        $password = $request->get('password');  //password from user
        $limit = null;  // if you want, you can limit password search (type of this variable must bu integer)
        $passManager = $this->get('pass_security.manager');
        $number = $passManager->getNumberOrNull($password, $limit);

        return new JsonResponse(['number' => $number]);
    }
   // ...
```

In this case you must use HTTPS, if you use HTTP - it is very dangerous because of the possibility of [MITM](https://en.wikipedia.org/wiki/Man-in-the-middle_attack).

You also can use console command:

```
$ bin/console passbundle:check 123456

```

Where `123456` - your custom password.

Documentation
=============

[](#documentation)

Default configuration:

```
pass_security:
    type: "file"
```

Value "type" can be `file` (default), `base`, `custom`.

### Type "file"

[](#type-file)

In this case, the password will be read from the file. Default file have 100 000 passwords, and you can use you own file:

```
pass_security:
    type: "file"
    file: "path/custom.txt"
```

Where:

- ` castom.txt` - must have ".txt" etentions;
- `path` - is absolute path;
- Each new password in the file begins on a new line;

Default bundle have some pass files:

- `Pass100k` (selected by default) - list of 100 000 offen used passwords;
- `Pass1M` - list of 1 000 000 offen used passwords;

Example (select file with 1 000 000 passwords):

```
pass_security:
   type: "file"
   file: Pass1M

```

### Type "base"

[](#type-base)

In this case, the passwords will be read from the database. Default configuration looks like this:

```
pass_security:
    type: "base"
```

You can configure the fololowing variables:

```
pass_security:
type: "base"
    class: \AcmeBundle\Entity\MyCustomEntity
    repository: AcmeBundle:MyCustomEntity
```

Requirements:

- `MyCustomEntity ` must implement the interface `InterfacePassSecurityEntity`.

You can use you own passwords data in database, or you can transfer all the data from file with following console command:

```
$ bin/console passbundle:base

```

This command will write all passwords from "file" (by default Pass100K) in table, who define in entity "class" (by default 'pass\_security\_base'). By default this command will use Entity, and if you use very big file, it can take a lot of time and memory.

If you do not need to create entities, you can use the option "--sql" like this

```
$ bin/console passbundle:base --sql

```

### Type "custom"

[](#type-custom)

You can also create your own service, for check passwords.

```
pass_security:
    type: "custom"
    custom_service: "acme_bundle.my_service"
```

Requirements:

- Service must implement the interface `InterfaceReader`;
- The service must be available for download from container;

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~233 days

Total

3

Last Release

2956d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05bf9214a41e7e6cad271b8c913349ee72baa4149197670c6ff430c56b3364df?d=identicon)[Nidhohnit](/maintainers/Nidhohnit)

---

Top Contributors

[![Nidhognit](https://avatars.githubusercontent.com/u/13098647?v=4)](https://github.com/Nidhognit "Nidhognit (22 commits)")[![esemve](https://avatars.githubusercontent.com/u/7847061?v=4)](https://github.com/esemve "esemve (1 commits)")[![noomorph](https://avatars.githubusercontent.com/u/1962469?v=4)](https://github.com/noomorph "noomorph (1 commits)")

---

Tags

phpsecuritysymfony-bundleValidate password

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nidhognit-pass-security-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nidhognit-pass-security-bundle/health.svg)](https://phpackages.com/packages/nidhognit-pass-security-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
