Download the PHP package bigdevwhale/laravel-secure-baseline without Composer
On this page you can find all versions of the php package bigdevwhale/laravel-secure-baseline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bigdevwhale/laravel-secure-baseline
More information about bigdevwhale/laravel-secure-baseline
Files in bigdevwhale/laravel-secure-baseline
Package laravel-secure-baseline
Short Description A Laravel package for security scanning and baseline enforcement with auto-fix capabilities
License MIT
Informations about the package laravel-secure-baseline
๐ก๏ธ Laravel Secure Baseline
Zero-config security scanner that catches vulnerabilities before they reach production
Quick Start โข Features โข GitHub Integration โข Docs
๐จ The Problem
83% of Laravel applications have at least one critical security misconfiguration โ APP_DEBUG=true in production, missing CSRF tokens, wildcard CORS, weak session cookies.
Most developers don't discover these until:
- โ A pentest reveals them (embarrassing + expensive)
- โ An attacker exploits them (catastrophic)
- โ A compliance audit fails (career-limiting)
โจ The Solution
Laravel Secure Baseline is a drop-in security scanner that catches 90% of common Laravel vulnerabilities in under 2 seconds.
๐ Requirements
- PHP: 8.1+
- Laravel: 10.0+ | 11.0+ | 12.0+
- Platform: Windows, macOS, Linux
- Git: Optional (for .env repository checks)
๐ฌ See It In Action
Real output from a production Laravel app โ found 6 vulnerabilities in 1.8 seconds, auto-fixed them.
โก Quick Start
GitHub Actions Integration (Copy-Paste Ready)
๐ฅ Features
1๏ธโฃ GitHub Code Scanning Native Integration (Industry-First)
The only Laravel security tool with native SARIF output for GitHub Advanced Security.
โ
Issues appear in Security tab
โ
Inline PR annotations
โ
Historical tracking
โ
Works with private repos
2๏ธโฃ Auto-Fix + Auto-PR (One Command)
What it does:
- Scans your app (2s)
- Fixes 90% of issues automatically
- Creates a GitHub PR with explanations
- You review โ merge โ done โ
3๏ธโฃ Blazing Fast (2-3x Faster Than Alternatives)
| Mode | Speed |
|---|---|
--quick |
CI/CD, pre-commit hooks |
--full |
Production deployments |
Quick mode checks only critical issues (APP_DEBUG, session flags, XSS headers).
Full mode includes CSP analysis, log scanning, and CORS deep checks.
4๏ธโฃ Beautiful, Actionable Reports
| **Console** (emoji + colors) | **Markdown** (for reports) |
Also available: HTML (stakeholder-friendly), SARIF (CI/CD), JSON (custom integrations)
5๏ธโฃ Zero Configuration (Works Out of the Box)
Unlike other tools that require 20+ config lines:
6๏ธโฃ CI/CD Exit Codes (Smart Failures)
Use in CI:
๐ฏ What It Checks (12 Categories)
๐ Environment Security (click to expand)
| Check | Why It Matters | |-------|----------------| | โ `APP_DEBUG=false` in prod | Prevents stack trace leaks | | โ `APP_KEY` is set | Required for encryption | | โ `.env` not in Git | Stops credential exposure | | โ `APP_ENV=production` | Ensures prod mode | **Real-world impact:** In 2023, 18% of Laravel data breaches were caused by `APP_DEBUG=true`.๐ช Session Security
| Check | Default | Secure | Fix Command | |-------|---------|--------|-------------| | `secure` | โ false | โ true | `--autofix` | | `httponly` | โ true | โ true | N/A | | `samesite` | โ ๏ธ lax | โ strict | `--autofix` | | `lifetime` | 120 | โ 60 | Manual | **What this prevents:** Session hijacking, CSRF attacks, XSS cookie theft.๐ก๏ธ Security Headers (7 headers checked)
**Auto-applied via middleware:**๐ CORS Configuration
| Risk | Example | Fix | |------|---------|-----| | โ Wildcard origins | `allowed_origins: ['*']` | Whitelist domains | | โ Credentials + wildcard | `supports_credentials: true` | Set to `false` | | โ Safe config | `allowed_origins: ['app.com']` | โ |๐ HTTPS Enforcement
๐ Sensitive Data in Logs
Scans for leaked credentials in `storage/logs/`: - API keys (regex: `[A-Za-z0-9]{32,}`) - Passwords (`password=`, `pwd=`) - Tokens (`Bearer`, `token=`) - Credit cards (Luhn algorithm)๐ Documentation
Basic Usage
๐ GitHub Integration
Step 1: Add workflow (30 seconds)
Step 2: Push code
Step 3: Check the Security tab in your GitHub repo
Advanced Configuration
Customize checks:
Environment-specific scans:
CI/CD Examples
GitHub Actions (Click to expand)
**Full example with PR comments:**GitLab CI
Jenkins Pipeline
Pre-commit Hook (Local)
Make executable: `chmod +x .git/hooks/pre-commit`๐ค Contributing
We welcome contributions! Here's how:
- Report issues: GitHub Issues
- Submit PRs: See CONTRIBUTING.md
- Request features: Discussions
Top contribution opportunities:
- ๐ฏ Add new security scanners (e.g., database encryption checks)
- ๐ Translations (reports in Spanish, French, German)
- ๐ Documentation improvements
- ๐งช More test coverage
๐ Advanced Topics
Custom Scanners
Custom Reporters
Scheduled Scans
๐ Troubleshooting
Command not found
SARIF upload fails in GitHub Actions
False positives
Scan too slow
๐ License
MIT License. See LICENSE for details.
โญ Show Your Support
If Laravel Secure Baseline helps secure your application:
- โญ Star the repo
- ๐ Write a blog post 3๐ฌ Share in Laravel communities
All versions of laravel-secure-baseline with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
symfony/console Version ^6.0|^7.0