Looking to hire Laravel developers? Try LaraJobs

snitch-laravel-sdk maintained by snitchy

Description
Snitch SDK
Author
Last update
2026/10/08 19:58 (dev-feat/system-scraper)
License
Links
Downloads
525

Comments
comments powered by Disqus

Snitch Laravel SDK

Requirements

  • You'll need a Snitch account, if you dont already have one you head over to runsnitch.io.
  • PHP 7.1 or newer
  • Laravel 5.8 to 13
  • If you would like to run scheduled scans, you will need to set up your applications scheduling (cron) service.

While not required we do encourage the use of queues (redis), if your queues are syncronous threat analysis will be disabled.

Get Started

Require the latest version of the Snitch SDK in your Laravel application.

$ composer require snitchy/snitch-laravel-sdk

Add your site credentials to your .env file. Site credentials can be generated from your Snitch account.

SNITCH_ID=snitch_id
SNITCH_SECRET=snitch_secret_here
SNITCH_KEY=snitch_site_key_here

Set SNITCH_ENABLED=false to turn Snitch off, for example in tests (phpunit.xml) or local development. No security events are sent and no scans are scheduled while it is off.

Some attribute scrapers run a shell command that the Snitch API sends. They are off by default. Set SNITCH_CONSOLE_SCRAPERS=true to allow them. Config and environment scrapers work without it.

The Search Code scraper looks for calls to PHP functions (for example eval or unserialize) in app, routes, config, database, resources and src. It sends only the function, file, line and whether an argument is dynamic; no source code is uploaded. Set SNITCH_SOURCE_SCAN=false to turn it off.

Installation

Run the installer to configure and connect your scanner.

$ php artisan snitch:install