Download the PHP package jbsommeling/scannr without Composer
On this page you can find all versions of the php package jbsommeling/scannr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbsommeling/scannr
More information about jbsommeling/scannr
Files in jbsommeling/scannr
Package scannr
Short Description A Laravel package that crawls websites to detect broken links, redirect chains, HTTPS downgrades, and more. Includes JavaScript rendering support for SPAs.
License MIT
Homepage https://github.com/JBSommeling/scannr
Informations about the package scannr
Scannr
A Laravel package that crawls websites to detect broken links, redirect chains, HTTPS downgrades, and more. Includes JavaScript rendering support for SPAs. Use it as a dev dependency in your Laravel project or as a Docker-based GitHub Action in your CI/CD pipeline.
Features
- BFS Crawling — Systematically crawls websites level by level
- Broken Link Detection — Identifies links returning 4xx/5xx status codes
- Multi-Element Scanning — Extracts URLs from
<a>,<link>,<script>,<img>, media elements, download triggers, and inline JS handlers - JavaScript Rendering — Scan SPAs (React, Vue, Angular) with headless browser support via
--jsflag - Smart JS Detection — Automatically detect SPAs and enable JS rendering only when needed via
--smart-jsflag - Sitemap Integration — Discover URLs from XML, HTML, or plain text sitemaps (including sitemap index files)
- robots.txt Support — Respects
Disallowrules andCrawl-delaydirectives - Redirect Chain Tracking — Follows and reports redirect chains, including loop detection
- HTTPS Downgrade Detection — Warns when redirects downgrade from HTTPS to HTTP
- Link Flag System — Every link is tagged with observation flags (discovery method, platform traits, technical anomalies, validation outcome)
- Integrity Scoring — Weight-based scoring model that rates your site's link health (A–F)
- Quality Gates — Fail CI/CD when critical issues are found or the integrity score drops below a configurable threshold
- Rate Limit Backoff — Automatic exponential backoff on HTTP 429 responses
- Noise URL Filtering — Hides XML namespaces, CDN preconnect hints, and JS framework error docs
- Multiple Output Formats — Table, JSON, or CSV output
- Domain Validation — Warns when the scanned URL doesn't match your
APP_URL
Responsible Use
Scannr is intended for scanning websites you own or have explicit permission to test.
Users are responsible for ensuring their usage complies with:
- Website terms of service
- Applicable laws and regulations
- robots.txt directives
Do not use Scannr to:
- Crawl websites without permission
- Overload servers or bypass rate limits
- Access protected or private content
The authors are not responsible for misuse of this tool.
Installation
As a Laravel Dev Dependency
The package auto-discovers its service provider. To publish the configuration:
To publish the migration (for --queue support):
JavaScript Rendering (Optional)
For --js and --smart-js support, install Puppeteer:
CLI Usage
Basic Scan
Command Signature
Options
| Option | Default | Description |
|---|---|---|
--depth=N |
3 | Maximum crawl depth from the starting URL |
--max=N |
300 | Maximum number of URLs to scan |
--timeout=N |
5 | Request timeout in seconds |
--format=FORMAT |
table | Output format: table, json, or csv |
--status=FILTER |
all | Filter results: all, ok, or broken |
--filter=TYPE |
all | Filter by element type: all, a, link, script, img, media, form |
--scan-elements=TYPES |
all | Element types to scan: all, or comma-separated (e.g., a,img) |
--sitemap |
false | Use sitemap.xml to discover URLs before crawling |
--js |
false | Enable JavaScript rendering for SPA/React sites |
--smart-js |
false | Auto-detect SPAs and enable JS rendering when needed |
--no-robots |
false | Ignore robots.txt rules |
--advanced |
false | Show noise URLs (XML namespaces, CDN hints, etc.) |
--strip-params=PARAMS |
— | Additional tracking parameters to strip (comma-separated) |
--delay-min=N |
config | Minimum delay between requests in milliseconds |
--delay-max=N |
config | Maximum delay between requests in milliseconds |
--queue |
false | Dispatch scan as a background job |
--fail-on-critical |
false | Fail with exit code 1 if critical issues are found |
--min-rating=GRADE |
none | Minimum acceptable rating: excellent, good, needs_attention, none |
Examples
Example Output
Table (default)
JSON (--format=json)
GitHub Action
Use Scannr in your CI/CD pipeline to catch broken links on every deploy.
Basic Usage
All Options
Examples
Scan a SPA with JavaScript rendering:
Get JSON output for downstream processing:
Deep weekly audit with sitemap:
Quality gate — require "Excellent" rating:
Relaxed quality gate — only fail on critical issues:
URL Restriction
Scannr is designed for scanning your own websites, not arbitrary third-party sites.
Local Dev Dependency
When running via php artisan site:scan, Scannr compares the scan URL's domain against your APP_URL environment variable. If they don't match, a warning is displayed:
GitHub Action (.scannr.yml)
In CI/CD, you can create a .scannr.yml file in your repository root to declare which domains are allowed:
When .scannr.yml is present, the GitHub Action will block scans of URLs that don't match any listed domain.
If no .scannr.yml exists, the URL input is trusted (since you control your own workflow file).
Configuration
Publish the config file to customize scanner behavior:
This creates config/scannr.php with settings for:
- Tracking Parameters — URL params to strip during normalization (utm_*, fbclid, etc.)
- User Agent — The User-Agent header sent with requests
- Rate Limiting — Delay between requests, backoff on 429 responses
- Hard Limits — Maximum caps for depth and URL count
- JavaScript Rendering — Custom paths to Node, npm, and Chrome binaries
- Noise URL Detection — Namespace domains, preconnect hints, framework error patterns
- Integrity Scoring — Penalty weights, confidence multipliers, grade thresholds
- External Platforms — Domains with known bot protection (LinkedIn, GitHub, etc.)
Testing
License
This package is open-sourced software licensed under the MIT license.
Last updated: 2026-06-13
All versions of scannr with dependencies
ext-libxml Version *
ext-simplexml Version *
illuminate/console Version ^12.0
illuminate/support Version ^12.0
spatie/browsershot Version ^5.2
symfony/css-selector Version ^7.0|^8.0
symfony/dom-crawler Version ^7.0|^8.0