Skip to content

Conversation

@thabofletcher
Copy link
Contributor

Summary

Adds a database migration to seed GDPR DPIA (Data Protection Impact Assessment) questions organized by Article 35 requirement groups:

  1. Processing Description - Nature, scope, context, purposes, data categories, data subjects, retention
  2. Necessity and Proportionality - Lawful basis, necessity justification, data minimization
  3. Risk Assessment - Risks to rights/freedoms, likelihood/severity, special categories
  4. Risk Mitigation Measures - Technical measures, organizational measures, risk-to-measure mapping
  5. Data Subject Rights - Information provision (Arts 13/14), rights exercise mechanisms
  6. Third-Party Sharing - Recipients, international transfers
  7. Consultation - Data subject consultation, prior consultation with supervisory authority

Each question includes:

  • fides_sources mapping to Fides data model fields for auto-population
  • expected_coverage indicating how much can be derived from system data
  • Guidance text for manual completion

Test plan

  • Run migration: alembic upgrade head
  • Verify questions are seeded for the gdpr_dpia template
  • Generate a DPIA assessment and confirm questions appear correctly grouped

🤖 Generated with Claude Code

Seeds questions for the GDPR DPIA assessment template organized by
Article 35 requirement groups:
- Processing description (nature, scope, context, purposes)
- Necessity and proportionality
- Risk assessment
- Risk mitigation measures
- Data subject rights
- Third-party sharing and transfers
- Consultation requirements

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vercel
Copy link
Contributor

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Feb 11, 2026 5:07am
fides-privacy-center Ignored Ignored Feb 11, 2026 5:07am

Request Review

@thabofletcher thabofletcher marked this pull request as ready for review February 11, 2026 05:07
@thabofletcher thabofletcher requested a review from a team as a code owner February 11, 2026 05:07
@thabofletcher thabofletcher requested review from erosselli and removed request for a team February 11, 2026 05:07
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR adds a database migration that seeds 23 GDPR DPIA (Data Protection Impact Assessment) questions organized into 7 Article 35 requirement groups:

  • Processing Description - 4 questions covering nature, data categories, data subjects, retention
  • Necessity and Proportionality - 3 questions on lawful basis and data minimization
  • Risk Assessment - 3 questions on rights/freedoms risks and special categories
  • Risk Mitigation Measures - 3 questions on technical and organizational safeguards
  • Data Subject Rights - 2 questions on transparency and rights mechanisms
  • Third-Party Sharing - 2 questions on recipients and international transfers
  • Consultation - 2 questions on data subject and supervisory authority consultation

Each question includes fides_sources mappings to Fides data model fields for auto-population and expected_coverage indicators. The migration includes proper safeguards (checks if template exists, checks if questions already seeded) and a downgrade function to remove the questions.

Confidence Score: 4/5

  • This PR is safe to merge with minor concerns about revision ID consistency
  • The migration is well-structured with proper safeguards (existence checks, idempotency), comprehensive GDPR DPIA question coverage, and a complete downgrade function. However, the down_revision comment in the docstring (b2c3d4e5f6g7) doesn't match the actual value in the code (f85bd4c08401), which could cause confusion but won't affect migration execution
  • The migration file has a minor inconsistency in the revision comment that should be corrected

Important Files Changed

Filename Overview
src/fides/api/alembic/migrations/versions/xx_2026_02_10_1200_c3d4e5f6g7h8_add_gdpr_dpia_questions.py Database migration seeds 23 GDPR DPIA questions across 7 requirement groups with proper safeguards and downgrade support

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

"""add GDPR DPIA questions

Revision ID: c3d4e5f6g7h8
Revises: b2c3d4e5f6g7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring comment says Revises: b2c3d4e5f6g7 but line 17 has down_revision = "f85bd4c08401". Update docstring for consistency.

Suggested change
Revises: b2c3d4e5f6g7
Revises: f85bd4c08401

Copy link
Contributor

@erosselli erosselli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with some comments

@@ -0,0 +1,3 @@
type: Added
description: Add GDPR DPIA assessment questions migration with Article 35 requirement groups
pr: 7356
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pr: 7356
pr: 7356
labels: ["db-migration"]

"""add GDPR DPIA questions

Revision ID: c3d4e5f6g7h8
Revises: b2c3d4e5f6g7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see greptile's comment



# GDPR DPIA Questions organized by requirement group (per Article 35)
GDPR_DPIA_QUESTIONS = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will these ever change? would we want to use them elsewhere in the codebase, or are they truly only going to be used as part of this migration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants