Download the PHP package ruvelo/laravel-security-alerts without Composer

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

Live demo     Configuration     Developer guide     Changelog

Tests Laravel 12 | 13 PHP 8.3+ PHPStan level 8

Laravel Security Alerts

Know when a dependency turns dangerous. composer audit only runs when someone types it. This package checks the exact Composer and npm versions your app runs every day, tells you once when one becomes vulnerable, and again when attackers start exploiting it in the wild.

That's all: the daily check schedules itself. Try php artisan security-alerts:check now, or see what it found in a made-up app in the live demo.

A quick tour

Exploited now, patch today. Advisories are matched against CISA's catalogue of known exploited vulnerabilities. A flaw that attackers are using goes to the top, whatever its score, with the day CISA listed it and the version that fixes it.

In your terminal and in CI. php artisan security-alerts:check prints the same report. --fail-on=exploited fails a pipeline, --json feeds anything else.

One email for everything new, exploited first, through your own mailer. Never the same alert twice. The demo is rendered by the package from real advisories, light, dark and at phone width.

Features

Watching many sites? Valtry scans them from the outside.

Requirements

Where it looks, and what it sends

By default a check asks Valtry's Advisory API, and uses the public feeds whenever Valtry can't answer. Both give the same findings; the scanning, matching and comparing are done by ruvelo/security-advisories, the core shared by Ruvelo's security packages.

Source For What leaves your server
Valtry Advisory API (default) Composer and npm packages, and which advisories CISA lists as exploited Package names only, and a random nonce. Never versions: they are matched on your server
Packagist security advisories (fallback, or public) Composer packages. It's the API composer audit uses, fed by the GitHub Advisory Database and FriendsOfPHP Package names, in a POST of up to 200 at a time
OSV.dev (fallback, or public) npm packages from package-lock.json Package names and versions; then each matching advisory is fetched by its ID
CISA KEV (fallback, or public) Which CVEs are being exploited Nothing: the catalogue is downloaded whole

Nothing about your app is sent: no URL, no environment, no code. Requests identify themselves as ruvelo/laravel-security-alerts. Answers are cached (an hour for advisories, six hours for the catalogue), so running the command twice is instant; --fresh skips the cache. Use a mirror or Private Packagist by changing sources.packagist.url. HTTP goes through Guzzle; to use your own PSR-18 client (a proxy, say), bind it to Psr\Http\Client\ClientInterface.

The command

Option
--fail-on=exploited Exit with 1 when a finding is at least this bad: exploited, critical, high, medium or any. Exploited findings count at every level
--json Print the report as JSON
--notify Remember findings and send alerts for new ones. This is what the scheduler runs; without it, the command changes nothing
--fresh Ignore cached feeds

Exit codes: 0 fine, 1 a finding reached --fail-on, 2 a lockfile or feed couldn't be read, so the answer is incomplete.

In GitHub Actions, after composer install:

How it remembers

What it has seen lives in one small table, security_alerts (the migration loads automatically). A table rather than the cache, because deploys often run cache:clear, and a cleared cache would send every old alert again. It also gives each finding a history: when it was first seen, when it was sent, when it became exploited, when it was fixed.

A finding is one advisory on one package. It's new the first time a check sees it, or if it comes back after being fixed. It's exploited the first time the check sees its CVE in CISA's catalogue. It's resolved when a complete check of its ecosystem no longer finds it. Alerts that couldn't be sent (no one configured yet, mail down) wait for the next check.

Configuration

Everything works without configuration. To change the defaults:

Key Default
notify.mail [] (SECURITY_ALERTS_MAIL, comma-separated) Who gets the email
notify.slack null (SECURITY_ALERTS_SLACK_WEBHOOK) An incoming webhook URL
notify.via ['mail'] Channels for the notifiables you register with SecurityAlerts::notifyUsing()
notify.min_severity null (SECURITY_ALERTS_MIN_SEVERITY) Skip new findings below critical, high, medium or low. Exploited ones are always sent
schedule.enabled true (SECURITY_ALERTS_SCHEDULE) Schedule the daily check
schedule.time, schedule.timezone 07:00 (SECURITY_ALERTS_TIME), app timezone When
digest.enabled false (SECURITY_ALERTS_DIGEST) A weekly email of everything still open, even when nothing changed
digest.day, digest.time monday, 08:00 When
composer.lockfile base_path('composer.lock')
composer.include_dev false Dev packages aren't deployed, so they're left out
npm.enabled true Check package-lock.json when there is one
npm.lockfile base_path('package-lock.json')
npm.include_dev true Laravel apps list axios, Alpine and friends as devDependencies because Vite bundles them, so they count
source valtry valtry or public (SECURITY_ALERTS_SOURCE)
valtry_url Valtry's Advisory API
sources.packagist.url, sources.osv.url, sources.kev.url the public feeds For mirrors
sources.kev.enabled true Download CISA's catalogue; Valtry's answers carry the exploited verdict regardless
cache.store null (SECURITY_ALERTS_CACHE_STORE) Your default store when null
cache.advisories_ttl, cache.kev_ttl, cache.osv_details_ttl 1 hour, 6 hours, 1 week In seconds
http.timeout, http.tries 15, 2 Per request
table security_alerts
run_migrations true Set to false after vendor:publish --tag=security-alerts-migrations to run your own copy
mcp.* off See MCP

Customising the look

The email is a standard Laravel Markdown mail, so it uses your app's mail theme. To change its wording or layout:

and edit resources/views/vendor/security-alerts/mail/alerts.blade.php (the Pulse card's view is next to it). To replace the notification altogether, listen to the events and send your own.

For developers

PHP API

Finding Type
package, installed string livewire/livewire, 3.6.2
ecosystem Ecosystem Composer or Npm
advisoryId, title, link, cve string, ?string PKSA-… (Packagist) or GHSA-… (OSV)
severity Severity Critical, High, Medium, Low, NotRated (older advisories have none; 1.0 called it Unknown)
fixedIn ?string 3.6.4, >2.10.1, or null when no fix is known
exploited ?KevEntry cve, name, dateAdded, dueDate, ransomware
isDev bool A dev dependency

These classes now live in ruvelo/security-advisories (Ruvelo\SecurityAdvisories\Finding, Report, Severity, Ecosystem, KevEntry, Threshold); the old Ruvelo\SecurityAlerts\... names still resolve. dateAdded and dueDate are DateTimeImmutable. Report::$source is valtry, public or mixed.

Report and Finding are JsonSerializable; --json prints the report with version added beside installed on each finding:

The Ruvelo\SecurityAlerts\Models\SecurityAlert model is the stored finding (scopes open(), exploited(), worstFirst(); present() gives the same shape plus first_seen_at, last_seen_at, resolved_at). Only SecurityAlerts::check() writes it; writing to it yourself would break "send once".

Events

Event Fires when Has
VulnerabilityFound A check sees a finding for the first time, or again after it was fixed $alert
VulnerabilityExploited A finding's CVE is in CISA's catalogue for the first time, new or not $alert
VulnerabilityResolved A complete check no longer finds it $alert

Exceptions

All extend Ruvelo\SecurityAlerts\Exceptions\SecurityAlertsException: NotInstalled (the migration hasn't run), LockfileUnreadable, SourceUnavailable (with $source) and InvalidThreshold. scan() and check() turn lockfile and feed failures into $report->problems rather than throwing.

Laravel Pulse

With Pulse installed, add the card to resources/views/vendor/pulse/dashboard.blade.php:

It lists open alerts, exploited first, from the table: it never calls a feed.

Health checks

With spatie/laravel-health:

It also warns when no check has run for 48 hours, which usually means the scheduler stopped.

MCP for AI agents

With laravel/mcp installed and SECURITY_ALERTS_MCP=true, agents get a read-only list_security_alerts tool (filters: exploited_only, min_severity) through php artisan mcp:start security-alerts. Set mcp.path to serve it over HTTP too, behind mcp.middleware (auth:sanctum by default).

Laravel Boost

If your app uses Laravel Boost, php artisan boost:install picks up this package's guidelines, so your coding agent runs the check after updating dependencies, fixes exploited findings first, and doesn't write to the alerts table or call the feeds itself.

In your tests

Fake the feeds with Http::fake() (URLs under packagist.org/api/security-advisories/, api.osv.dev/v1/ and www.cisa.gov/), and use the factory for anything that reads alerts:

Contributing

Pull requests are welcome. Clone, composer install, then composer check runs code style (Pint), static analysis (PHPStan level 8) and the tests, exactly as CI does. The tests never touch the network: feeds are answered from recorded responses in tests/fixtures. See changelog.

The demo and screenshots are built from the package itself: composer demo writes the static demo into build/, and demo/screenshots.sh regenerates art/.

Credits

Built by François Bultez at Valtry, the website security scanner, and everyone who contributes.

Advisories come from Packagist (and through it the GitHub Advisory Database and FriendsOfPHP/security-advisories), OSV.dev and CISA. Thanks to everyone who maintains them.

License

MIT. See LICENSE.


All versions of laravel-security-alerts with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^7.8.2
laravel/framework Version ^12.4.1|^13.0
ruvelo/security-advisories Version ^1.1
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 ruvelo/laravel-security-alerts contains the following files

Loading the files please wait ...