Secure Uploads - v1.0.0
Secure Uploads Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[1.0.0] - 2026-05-18
Added
- Initial release of the standalone Secure Uploads package, extracted from
artisanpack-ui/security1.x as part of the Security 2.0 package split. FileValidationService(451 lines) covering MIME sniffing against actual file content, magic-byte verification, extension allowlists / blocklists, per-type + absolute size limits, double-extension trick detection, null-byte trick detection, EXIF stripping for images, and awithMediaLibraryDefaults()preset.SafeFilenameandSecureFilevalidation rules, both drop-in for Form Requests.- Pluggable malware scanning via the
MalwareScannerInterface:ClamAvScanner— Unix-socket-first with binary fallback, configurable socket path / binary path / timeoutVirusTotalScanner— full API integration plus by-hash short-circuit (scanByHash) to skip re-uploading known filesNullScanner— no-op for dev and CI
SecureFileStorageService(344 lines) —store,retrieve,delete,generateSecureUrl,exists,getContents,getModel,getPendingScanFiles,quarantine.SecureFileControllerwith bundled routes (/secure-file/{identifier}and/secure-file/{identifier}/download) protected by Laravel'ssignedmiddleware.HasSecureFilesEloquent concern —secureFiles()morphMany,attachSecureFile,attachSecureFiles,detachSecureFile,detachAllSecureFiles,secureFilesOfType,secureImages,secureDocuments,primarySecureFile,hasSecureFiles,secureFilesTotalSize.SecureUploadedFileEloquent model +create_secure_files_tablemigration.FileUploadRateLimiterservice wrapping Laravel'sRateLimiter.- Middleware aliases —
validate.upload,scan.upload. - Events —
FileUploaded,FileUploadRejected,FileServed,MalwareDetected(subscribed to byartisanpack-ui/security-analyticsfor audit trail). - Artisan commands —
security:cleanup-files(purge expired / old files),security:scan-quarantine(process the quarantine queue). - Value objects —
RequestContext,ScanResult,StoredFile,ValidationResultfor typed pipeline returns. - Quarantine workflow: when
malwareScanning.async = true, uploads are quarantined untilsecurity:scan-quarantineruns. - Configurable scanner driver via
SECURE_UPLOADS_MALWARE_DRIVERenv var (null/clamav/virustotal).
Changed
- (none — initial release)
Removed
- This package contains the file upload security content previously bundled in
artisanpack-ui/security1.x. See theartisanpack-ui/securityUPGRADE guide for migration instructions from 1.x. The 1.xSecureFileandPasswordPolicyrules split —SecureFilelives here,PasswordPolicymoved toartisanpack-ui/security-auth.