adrianmejias/laravel-ssllabs

SSL Labs Quality Checker for Laravel Framework.

1.0 2022-01-23 12:06 UTC

This package is auto-updated.

Last update: 2024-03-01 00:14:08 UTC


README

security tests PHPStan PHP CS Fixer StyleCI Build Status codecov Downloads Packagist License: MIT Liberapay

SSL Labs Quality Checker package for the Laravel Framework.

Installation

Warning: Not for use in production at the moment.

This version supports PHP 8.0. You can install the package via composer:

composer require adrianmejias/laravel-ssllabs

To create the config/ssllabs.php configuration file:

php artisan vendor:publish --tag=ssllabs

Usage

Example

<?php

use AdrianMejias\SslLabs\SslLabsFacade as SslLabs;
// or use SslLabs;

$info = SslLabs::info();

Expected Output:

$info = [
    'engineVersion' => '2.1.10',
    'criteriaVersion' => '2009q',
    'maxAssessments' => 25,
    'currentAssessments' => 0,
    'newAssessmentCoolOff' => 1000,
    'messages' => [
        'This assessment service is provided free of charge by Qualys SSL Labs, subject to our terms and conditions: https://www.ssllabs.com/about/terms.html',
    ],
];

Api Requests

  • getRootCertsRaw(?int $trustStore = null) Retrieve root certificates.
  • getStatusCodes() Retrieve known status codes.
  • getEndpointData(string $host, string $s, bool $fromCache = false) Retrieve detailed endpoint information.
  • hasMinGrade(string $host, ?string $minGrade = 'A+', int $maxAge, bool $publish = false, bool $ignoreMismatch = false) Invoke assessment and check progress in order to check minimum grade.
  • analyze(string $host, ?int $maxAge = null, bool $publish = false, bool $startNew = false, bool $fromCache = false, ?string $all = null, bool $ignoreMismatch = false) Invoke assessment and check progress.
  • info() Check SSL Labs availability.

Artisan Commands

  • ssllabs:quality-test {host} {grade} - Get SSL Labs quality test results
  • ssllabs:has-min-quality {host} {grade} - Check if the host has a minimum grade level

Testing

composer test

Todo

  • Add to packagist repo
  • Add unit tests
  • Add documentation for open source contributations
  • Add GitHub Action for unit tests
  • Add more unit test coverages
  • Add more documentation to README.md
  • Add API listing to README.md
  • Add command
  • Add schedule from command
  • Add schedule email

Contributing

Thank you for considering contributing to Laravel SSL Labs! You can read the contribution guide here.

Code of Conduct

In order to ensure that the community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please see the security file for more information.

License

The MIT License (MIT). Please see the license file for more information.