[Do not merge] fix: remove annotated models from safelist and annotate openedx models on PII#38712
Open
Akanshu-2u wants to merge 3 commits into
Open
[Do not merge] fix: remove annotated models from safelist and annotate openedx models on PII#38712Akanshu-2u wants to merge 3 commits into
Akanshu-2u wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds/standardizes PII annotation markers on several Django models and refreshes the repository annotation safelist to reflect current coverage.
Changes:
- Add
.. no_pii:markers to multiple models’ docstrings. - Add explicit
.. pii,.. pii_types, and.. pii_retirementmetadata to models storing Apple identifiers and employee email addresses. - Update
.annotation_safe_list.ymlby removing older entries and adding a larger set of non-local/generated models.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| openedx/core/djangoapps/notifications/models.py | Adds .. no_pii: annotation to NotificationPreference model docstring. |
| openedx/core/djangoapps/embargo/models.py | Adds .. no_pii: annotation to GlobalRestrictedCountry model docstring. |
| openedx/core/djangoapps/discussions/models.py | Fixes .. no_pii: directive formatting to include a space. |
| common/djangoapps/third_party_auth/models.py | Annotates Apple migration identifiers as PII with type/retirement metadata. |
| common/djangoapps/student/models/user.py | Adds .. no_pii: to history model and adds PII metadata docstring to AllowedAuthUser. |
| .annotation_safe_list.yml | Removes older safelist blocks and adds/updates safelist coverage for many models. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+260
to
+264
| # Via django-wiki https://github.com/openedx/django-wiki | ||
| wiki.Article: | ||
|
|
||
| # Additional non-local or generated models requiring safelist coverage | ||
| agreements.HistoricalUserAgreement: | ||
| ".. no_pii:": "No PII" |
| Model to store users' Apple Unique Identifier during migration | ||
| process of Apple team from edx Inc. to edx LLC. | ||
|
|
||
| .. pii: Contains Apple user identifiers (old_apple_id, transfer_id, new_apple_id). |
|
|
||
| class AllowedAuthUser(TimeStampedModel): | ||
| """ | ||
| Tracks which employee email addresses are allowed to log in with password on a given site. |
Comment on lines
+252
to
+260
| # Additional non-local or generated models requiring safelist coverage | ||
| agreements.HistoricalUserAgreement: | ||
| ".. no_pii:": "No PII" | ||
| assessment.HistoricalSharedFileUpload: | ||
| ".. no_pii:": "No PII" | ||
| casbin_adapter.CasbinRule: | ||
| ".. no_pii:": "No PII" | ||
| channel_integration.ApiResponseRecord: | ||
| ".. no_pii:": "No PII" |
Comment on lines
1061
to
+1067
| """ | ||
| Model to store users' Apple Unique Identifier during migration | ||
| process of Apple team from edx Inc. to edx LLC. | ||
|
|
||
| .. pii: Contains Apple user identifiers (old_apple_id, transfer_id, new_apple_id). | ||
| .. pii_types: external_service | ||
| .. pii_retirement: local_api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR fixes pii_check for edx-platform by adding missing model annotations and correcting the safelist so the annotation tool passes cleanly.
Changes:
Validation:
Private JIRA Link:
BOMS-572