Download the PHP package iamariezflores/php-sec-check without Composer

On this page you can find all versions of the php package iamariezflores/php-sec-check. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sec-check

php-sec-check

A lightweight CLI tool to scan PHP and Laravel projects for common security risks.

Packagist Version Packagist Downloads PHP Version PHPUnit


Overview

php-sec-check is a Composer dev tool that audits your PHP or Laravel project for security misconfigurations and vulnerabilities in seconds. Run it from the command line — no setup required.

The package has no runtime dependencies. PHPUnit is included as a dev dependency for running the test suite during development and contributions.


Features

Generic PHP Checks

These run on any PHP project:

Check Description
PHP Version Warns if your PHP version is below 8.0
Display Errors Detects if display_errors is enabled (exposes stack traces in production)
Composer Audit Runs composer audit to surface known CVEs in your dependencies
Dangerous Functions Checks if high-risk functions are unrestricted in php.ini

Dangerous functions checked: exec, shell_exec, system, passthru, eval, create_function, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source

Laravel-Specific Checks

Auto-detected when artisan and bootstrap/app.php are present:

Check Description
APP_DEBUG Check Warns if APP_DEBUG=true, critical if combined with APP_ENV=production
Default Credentials Warns if DB_USERNAME uses a default value (root, admin, etc.) or DB_PASSWORD is empty
.env Credentials Scans for exposed sensitive keys (e.g. APP_KEY, DB_PASSWORD)
Vendor in Git Warns if vendor/ is not excluded in .gitignore

Requirements

Installation

Install as a dev dependency via Composer:

Available on Packagist: iamariezflores/php-sec-check


Usage

From your project root, run:

The tool exits with code 0 when no issues are found, and code 1 when any issue is detected. This makes it compatible with any CI/CD pipeline out of the box.

Example Output

CI/CD Integration

Because sec-check exits with code 1 on any finding, you can drop it directly into your pipeline and it will fail the build automatically when issues are detected.

GitHub Actions:

GitLab CI:

Makefile / Shell script:


Configuration

On first run, php-sec-check automatically creates a php-sec-check-config.php file at your project root. Edit this file to add your own sensitive .env key names:


Advanced Usage

Programmatic Usage (Laravel)

You can invoke individual checks directly in your code. This is useful for building custom security dashboards or audit routes:

Adding Custom Checks

All checks implement the CheckInterface contract:

To add a new check, create a class in src/Checks/ that implements CheckInterface, then register it in bin/sec-check.


Running Tests

The test suite uses PHPUnit and covers all PHP and Laravel checks:

Tests live in tests/Checks/ and tests/Checks/Laravel/, mirroring the src/ structure.


Contributing

Contributions are welcome and encouraged!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-check-name
  3. Implement your check in src/Checks/, following the CheckInterface contract
  4. Write tests for your check in the corresponding tests/Checks/ directory — PRs without tests will not be merged
  5. Verify the full suite passes: composer test
  6. Commit your changes: git commit -m "feat: add your-check-name check"
  7. Push to your fork and open a Pull Request

Guidelines:


License

This project is open-source software licensed under the MIT License.


All versions of php-sec-check with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iamariezflores/php-sec-check contains the following files

Loading the files please wait ...