cyphernetsecurity / cypherscan-laravelplus-driver
CypherScan malware scanner driver for LaravelPlus Content Security.
Package info
github.com/cyphernetsecurity/cypherscan-laravelplus-driver
pkg:composer/cyphernetsecurity/cypherscan-laravelplus-driver
Requires
- php: ^8.5
- laravel/framework: ^13.0
- laravelplus/content-security: ^1.0
Requires (Dev)
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Standalone CypherScan malware scanner driver for laravelplus/content-security.
Requirements
- PHP 8.5+
- Laravel 13
laravelplus/content-security1.x- A CypherScan API key
Installation
Once the package is available through Packagist:
composer require cyphernetsecurity/cypherscan-laravelplus-driver
Until then, the source repository can be used as a Composer VCS repository.
Configuration
Create a CypherScan API key and configure the host application:
CYPHERSCAN_API_KEY=cs_your_key CYPHERSCAN_BASE_URL=https://cyphernetsecurity.com CONTENT_SECURITY_MALWARE_DRIVER=cypherscan
Add the driver under content-security.malware.drivers:
'cypherscan' => [ 'driver' => 'cypherscan', ],
Laravel package discovery registers CypherScanServiceProvider automatically.
Security behavior
The integration is fail-closed:
cleanmaps to LaravelPlusCleansuspiciousmaps toSuspiciousmaliciousmaps toInfected- unavailable scanners, invalid responses, unknown verdicts, and unusable upload responses do not pass content as clean
- the SHA-256 returned by CypherScan must match the exact LaravelPlus
FileReference::checksum()before a verdict is accepted
API flow
The driver uses CypherScan's canonical authenticated file workflow:
POST /api/v1/upload/presign- upload the exact file bytes to the returned temporary URL
POST /api/v1/scanwith the returned object key- map the verified CypherScan verdict into a LaravelPlus
CheckResult
Testing
composer test
The package includes contract coverage for clean, suspicious, malicious, fail-closed conditions, health reporting, SHA-256 binding, and LaravelPlus driver registration.
License
MIT