Download the PHP package prahsys/laravel-perimeter without Composer

On this page you can find all versions of the php package prahsys/laravel-perimeter. 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 laravel-perimeter

Laravel Perimeter

Comprehensive system-level security monitoring for Laravel applications, integrating malware protection, runtime behavioral analysis, vulnerability detection, intrusion prevention, and firewall management.

Latest Version PHP Version

Overview

Laravel Perimeter provides comprehensive security monitoring at the infrastructure boundary by seamlessly integrating multiple industry-standard security tools into a unified package with Laravel-native interfaces, standardized APIs, and consolidated logging. It creates a multi-layered security perimeter around your application to detect and respond to various security threats.

Core Components

1. File Protection (ClamAV Integration)

2. Runtime Protection (Falco Integration)

3. Vulnerability Scanning (Trivy Integration)

4. Intrusion Prevention (Fail2ban Integration)

5. Firewall Management (UFW Integration)

6. Laravel Integration

7. Reporting & Data Export

Installation

1. Install the Package

2. Publish the Configuration

This will create a config/perimeter.php file in your application.

3. Run the Installation Command

This command will help you install and configure the required system dependencies:

Each service is installed with optimized configurations for Laravel applications:

The installation command will:

4. Configure Environment Variables

The installer will add these to your .env file, but you can customize them:

Basic Usage

1. Protect File Uploads

Add the Perimeter middleware to routes that handle file uploads:

The middleware will:

2. Scan Files Programmatically

3. Schedule Regular Security Checks

Add these to your app/Console/Kernel.php file:

4. Set Up Real-time Monitoring

Perimeter provides comprehensive real-time security monitoring through two primary services:

Behavioral Monitoring with Falco

Falco provides kernel-level behavioral analysis to detect suspicious activities:

Falco monitoring provides:

Malware Detection with ClamAV

ClamAV provides real-time file system monitoring for malware:

ClamAV monitoring provides:

Centralized Monitoring Dashboard

For continuous monitoring, use Supervisor:

The combined monitoring system:

5. Respond to Security Events

Command Reference

Security Audit

Perform a comprehensive security assessment across all protection layers:

This command:

Options:

Health Check

Verify that all security components are properly installed and operational:

This command quickly verifies:

Monitoring

Monitor security events across all protection layers:

Options:

Daemon Management

For production deployments, monitoring should be run as a daemon using supervisor. The terminate command allows for graceful shutdown during deployments:

This is particularly useful with supervisor configuration for automatic restart after deployments:

Deployment workflow:

  1. php artisan perimeter:terminate - Gracefully stop monitoring
  2. Deploy application updates
  3. Supervisor automatically restarts monitoring

Reporting

Generate detailed security reports with flexible filtering:

Options:

System Maintenance

Audit Artifacts

Laravel Perimeter automatically collects comprehensive audit artifacts during security audits, providing detailed compliance documentation and forensic evidence.

What Are Audit Artifacts?

Audit artifacts are timestamped collections of security service outputs, logs, and system states captured during each security audit. These artifacts serve multiple purposes:

Artifact Collection

Every time you run php artisan perimeter:audit, the system automatically:

  1. Captures Service Outputs: Collects logs, scan results, and status information from all enabled security services
  2. Records System State: Documents firewall rules, service configurations, and system health
  3. Generates Metadata: Creates audit summaries with timestamps, service versions, and scan statistics
  4. Compresses Archives: Packages all artifacts into timestamped ZIP files for efficient storage

Example artifacts include:

Storage Configuration

Configure artifact storage in config/perimeter.php:

Storage Disk Options

Use any Laravel storage disk for artifact storage:

Environment Variables

Distributed Environments

For server clusters or distributed deployments, you can add machine identification to artifact paths to prevent conflicts:

Option 1: Machine ID in Path

Option 2: Custom Disk Per Environment

Option 3: Dynamic Path Configuration

Artifact Structure

Artifacts are organized in a consistent directory structure:

Artifact Retention

Artifacts are automatically cleaned up based on the retention period:

Accessing Artifacts

Access artifacts through Laravel's storage system:

Compliance Integration

Artifacts are designed to support various compliance frameworks:

The standardized format and automated collection ensure consistent, auditable security documentation.

Advanced Integration Features

1. Logging Integration

All security events use Laravel's logging system, enabling seamless integration with your existing logging infrastructure:

2. Event Handling & Callbacks

Register custom handlers for security events to integrate with your application's notification systems:

3. Programmatic Reporting

Generate security reports programmatically for integration with dashboards or compliance systems:

Data Storage & Integration

The package provides robust data storage and standardized data structures for security events, making it easy to integrate with existing monitoring and compliance systems.

Database Storage

Security events are stored in dedicated database tables with optimized schemas:

The package automatically migrates these tables during installation.

Data Transfer Objects

All security events use standardized Data Transfer Objects (DTOs) that provide consistent representations across different security tools:

Security Assessment

The package provides detailed security assessments with actionable information through:

  1. Comprehensive Issue Tracking: Clear categorization of issues by type and severity
  2. Component Health Status: Verification that all security components are properly functioning
  3. Protection Coverage: Assessment of which security layers are active and properly configured
  4. Actionable Findings: Specific, concrete security issues that need attention
  5. Compliance Information: Relevant data points for security compliance requirements

This detailed approach provides security professionals with clear, actionable insights about your application's security posture.

Example of security assessment output:

Development Environment

Using Docker for Development

The package includes a Docker environment for local development and testing. This setup allows you to develop and test all security features without needing a full VM or physical machine.

Docker Setup Instructions

  1. Make sure Docker and Docker Compose are installed on your machine
  2. Run the following commands:

This Docker configuration:

How Security Services Run in Docker

The security services (ClamAV, Falco, Fail2ban, Trivy, UFW) are configured to work properly in the container with standard configurations and include:

This approach enables reliable testing across different environments with consistent behavior.

Testing Security Services

The Docker environment allows for comprehensive testing of all security components:

Troubleshooting

If you encounter issues during installation or operation, follow these steps:

1. Check Component Health

The first step is to verify all components are properly installed and configured:

This provides a detailed status report of all security components with specific error messages.

2. Check Logs

Review the Laravel and component-specific logs:

3. Common Issues

4. ClamAV Not Starting

If you see "ClamAV is installed and configured but daemon is not running" in the health check:

AppArmor Configuration Issues

If ClamAV real-time scanning (clamonacc) fails to start, it may be blocked by AppArmor security policies:

FiThe installer automatically configures AppArmor profiles, but manual configuration may be needed:

If AppArmor is not installed but needed:

See DEBUGGING.md for more detailed ClamAV troubleshooting steps.

5. Sample Outputs

The package includes reference outputs for all security tools in the resources/examples/ directory. These examples show what properly functioning services should produce and help with troubleshooting.

The resources/examples/perimeter/audit/ directory contains example audit artifacts showing the complete output structure of security audits, including service logs, scan results, and compliance documentation.

Documentation

For more detailed information, check out these documentation files:

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-perimeter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
spatie/laravel-data Version ^2.0|^3.0|^4.0
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 prahsys/laravel-perimeter contains the following files

Loading the files please wait ...