jeffersongoncalves / laravel-us-privacy-assessments
Data protection assessments under the US state privacy laws: targeted advertising, sale, profiling and sensitive data, benefits weighed against scored risks, approval and review
Package info
github.com/jeffersongoncalves/laravel-us-privacy-assessments
pkg:composer/jeffersongoncalves/laravel-us-privacy-assessments
Requires
- php: ^8.2
- illuminate/console: ^12.0|^13.0
- illuminate/contracts: ^12.0|^13.0
- illuminate/database: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- jeffersongoncalves/laravel-us-privacy: ^1.0
- jeffersongoncalves/laravel-us-privacy-notices: ^1.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- jeffersongoncalves/pest-plugin-database-migrations: ^1.0
- larastan/larastan: ^3.0
- laravel/pint: ^1.24
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Data protection assessments under the US state privacy laws. Every state except Utah and Iowa requires one before you process personal data for targeted advertising, sell it, use it for profiling with a reasonably foreseeable risk to consumers, or process sensitive data. The assessment weighs the benefits of the processing against the risks to consumers, as mitigated by your safeguards. You keep it and hand it to the attorney general on request.
Built on laravel-us-privacy (the personal data inventory) and laravel-us-privacy-notices (the processing activities).
This package gives you tooling. It does not make you compliant on its own.
Installation
composer require jeffersongoncalves/laravel-us-privacy-assessments php artisan vendor:publish --tag="us-privacy-assessments-migrations" php artisan vendor:publish --tag="us-privacy-assessments-config" php artisan migrate
Assessments
use JeffersonGoncalves\UsPrivacyAssessments\Models\DataProtectionAssessment; $assessment = DataProtectionAssessment::create([ 'title' => 'Ad targeting', 'processing_activity_id' => $activity->id, 'description' => 'Browsing data sent to the ad network to target ads', 'benefits' => 'Relevant offers for consumers; revenue that keeps the service free', 'necessity' => 'Only page categories, never the full URL', 'risks' => [ ['title' => 'Inferences about health', 'threat' => 'linking', 'likelihood' => 2, 'impact' => 3, 'measures' => 'Health pages excluded', 'residual_likelihood' => 1, 'residual_impact' => 3], ], ]); $assessment->scoredRisks(); // level and residual level per risk $assessment->highestRisk(); // RiskLevel::Medium $assessment->approve('Privacy lead'); // next review in 1 year (review_every)
Risks are scored likelihood (1-3) x impact (1-3): low, medium, high, before and after the measures, with optional LINDDUN threats. Editing the content of an approved assessment sends it back to draft. Review it whenever the processing changes; Colorado expects assessments of profiling to be reviewed every year.
What still needs one
php artisan us-privacy:assessments # assessments, and the activities with none php artisan us-privacy:assessments --json # everything, ready to hand over
use JeffersonGoncalves\UsPrivacyAssessments\Facades\UsPrivacyAssessments; UsPrivacyAssessments::candidates(); // activities whose models are flagged targetedAdvertising, sold, profiling or sensitive UsPrivacyAssessments::export($assessment);
Testing
composer test
Changelog
See CHANGELOG.
License
The MIT License (MIT). See License File.
