Skip to content

Commit 1b338e7

Browse files
authored
Merge pull request #38712 from Akanshu-2u/aaich/BOMS-572
fix: remove annotated models from safelist and annotate openedx models on PII
2 parents 7536eff + 325320f commit 1b338e7

12 files changed

Lines changed: 230 additions & 119 deletions

File tree

.annotation_safe_list.yml

Lines changed: 186 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -105,58 +105,10 @@ enterprise.HistoricalEnterpriseCustomerCatalog:
105105
enterprise.HistoricalEnterpriseCustomerEntitlement:
106106
".. no_pii:": "No PII"
107107

108-
# Via edx-ora2, these can be removed once the models are annotated for real
109-
assessment.Assessment:
110-
".. no_pii:": "No PII"
111-
assessment.AssessmentFeedback:
112-
".. no_pii:": "No PII"
113-
assessment.AssessmentFeedbackOption:
114-
".. no_pii:": "No PII"
115-
assessment.AssessmentPart:
116-
".. no_pii:": "No PII"
117-
assessment.Criterion:
118-
".. no_pii:": "No PII"
119-
assessment.CriterionOption:
120-
".. no_pii:": "No PII"
121-
assessment.PeerWorkflow:
122-
".. no_pii:": "No PII"
123-
assessment.PeerWorkflowItem:
124-
".. no_pii:": "No PII"
125-
assessment.Rubric:
126-
".. no_pii:": "No PII"
127-
assessment.StaffWorkflow:
128-
".. no_pii:": "No PII"
129-
assessment.StudentTrainingWorkflow:
130-
".. no_pii:": "No PII"
131-
assessment.StudentTrainingWorkflowItem:
132-
".. no_pii:": "No PII"
133-
assessment.TrainingExample:
134-
".. no_pii:": "No PII"
135-
workflow.AssessmentWorkflow:
136-
".. no_pii:": "No PII"
137-
workflow.AssessmentWorkflowCancellation:
138-
".. no_pii:": "No PII"
139-
workflow.AssessmentWorkflowStep:
140-
".. no_pii:": "No PII"
141-
142108
# Via edx-celeryutils
143109
celery_utils.ChordData:
144110
".. no_pii:": "No PII"
145111

146-
# Via completion XBlock
147-
completion.BlockCompletion:
148-
".. no_pii:": "No PII"
149-
150-
# Via django_notify (required / installed by wiki)
151-
django_notify.Notification:
152-
".. no_pii:": "No PII"
153-
django_notify.NotificationType:
154-
".. no_pii:": "No PII"
155-
django_notify.Settings:
156-
".. no_pii:": "No PII"
157-
django_notify.Subscription:
158-
".. no_pii:": "No PII"
159-
160112
# Via django-openid-auth https://github.com/edx/django-openid-auth
161113
django_openid_auth.Association:
162114
".. no_pii:": "No PII"
@@ -203,42 +155,12 @@ edx_name_affirmation.HistoricalVerifiedName:
203155
".. pii_types:": "name"
204156
".. pii_retirement:": "local_api"
205157

206-
# Via VAL
207-
edxval.CourseVideo:
208-
".. no_pii:": "No PII"
209-
edxval.EncodedVideo:
210-
".. no_pii:": "No PII"
211-
edxval.Profile:
212-
".. no_pii:": "No PII"
213-
edxval.ThirdPartyTranscriptCredentialsState:
214-
".. no_pii:": "No PII"
215-
edxval.TranscriptPreference:
216-
".. no_pii:": "No PII"
217-
edxval.Video:
218-
".. no_pii:": "No PII"
219-
edxval.VideoImage:
220-
".. no_pii:": "No PII"
221-
edxval.VideoTranscript:
222-
".. no_pii:": "No PII"
223-
224158
# Via PyLTI1p3
225159
lti1p3_tool_config.LtiTool:
226160
".. no_pii:": "No PII"
227161
lti1p3_tool_config.LtiToolKey:
228162
".. no_pii:": "No PII"
229163

230-
# Via Milestones
231-
milestones.CourseContentMilestone:
232-
".. no_pii:": "No PII"
233-
milestones.CourseMilestone:
234-
".. no_pii:": "No PII"
235-
milestones.Milestone:
236-
".. no_pii:": "No PII"
237-
milestones.MilestoneRelationshipType:
238-
".. no_pii:": "No PII"
239-
milestones.UserMilestone:
240-
".. no_pii:": "No PII"
241-
242164
# Via Django OAuth2 Provider https://github.com/edx/django-oauth2-provider
243165
oauth2.Client:
244166
".. no_pii:": "No PII"
@@ -289,12 +211,6 @@ oauth_provider.Token:
289211
".. pii_types:": external_service, password
290212
".. pii_retirement:": retained
291213

292-
# Via edx-organizations
293-
organizations.Organization:
294-
".. no_pii:": "No PII"
295-
organizations.OrganizationCourse:
296-
".. no_pii:": "No PII"
297-
298214
# Via Problem Builder XBlock
299215
problem_builder.Answer:
300216
".. no_pii:": "No PII"
@@ -321,30 +237,10 @@ social_django.UserSocialAuth:
321237
splash.SplashConfig:
322238
".. no_pii:": "No PII"
323239

324-
# Via edx-submissions
325-
submissions.Score:
326-
".. no_pii:": "No PII"
327-
submissions.ScoreAnnotation:
328-
".. no_pii:": "No PII"
329-
submissions.ScoreSummary:
330-
".. no_pii:": "No PII"
331-
submissions.StudentItem:
332-
".. no_pii:": "No PII"
333-
submissions.Submission:
334-
".. no_pii:": "No PII"
335-
submissions.TeamSubmission:
336-
".. no_pii:": "No PII"
337-
338240
# Via sorl-thumbnail https://github.com/jazzband/sorl-thumbnail
339241
thumbnail.KVStore:
340242
".. no_pii:": "No PII"
341243

342-
# Via django-user-tasks
343-
user_tasks.UserTaskArtifact:
344-
".. no_pii:": "No PII"
345-
user_tasks.UserTaskStatus:
346-
".. no_pii:": "No PII"
347-
348244
# Via waffle
349245
waffle.Flag:
350246
".. no_pii:": "No PII"
@@ -353,22 +249,198 @@ waffle.Sample:
353249
waffle.Switch:
354250
".. no_pii:": "No PII"
355251

356-
# Via django-wiki https://github.com/openedx/django-wiki
357-
wiki.Article:
252+
# Additional non-local or generated models requiring safelist coverage
253+
agreements.HistoricalUserAgreement:
254+
".. no_pii:": "No PII"
255+
assessment.HistoricalSharedFileUpload:
256+
".. no_pii:": "No PII"
257+
casbin_adapter.CasbinRule:
258+
".. no_pii:": "No PII"
259+
channel_integration.ApiResponseRecord:
260+
".. no_pii:": "No PII"
261+
channel_integration.GenericEnterpriseCustomerPluginConfiguration:
262+
".. no_pii:": "No PII"
263+
channel_integration.IntegratedChannelAPIRequestLogs:
264+
".. no_pii:": "No PII"
265+
channel_integration.OrphanedContentTransmissions:
266+
".. no_pii:": "No PII"
267+
edx_proctoring.HistoricalProctoredExam:
268+
".. no_pii:": "No PII"
269+
edx_proctoring.HistoricalProctoredExamStudentAttempt:
270+
".. no_pii:": "No PII"
271+
enterprise.HistoricalDefaultEnterpriseEnrollmentIntention:
272+
".. no_pii:": "No PII"
273+
enterprise.HistoricalDefaultEnterpriseEnrollmentRealization:
274+
".. no_pii:": "No PII"
275+
enterprise.HistoricalEnterpriseCourseEntitlement:
276+
".. no_pii:": "No PII"
277+
enterprise.HistoricalEnterpriseCustomerInviteKey:
358278
".. no_pii:": "No PII"
359-
wiki.ArticleForObject:
279+
enterprise.HistoricalEnterpriseCustomerSsoConfiguration:
360280
".. no_pii:": "No PII"
361-
wiki.ArticlePlugin:
281+
enterprise.HistoricalEnterpriseCustomerUser:
362282
".. no_pii:": "No PII"
363-
wiki.ArticleRevision:
283+
enterprise.HistoricalEnterpriseGroup:
364284
".. no_pii:": "No PII"
365-
wiki.ReusablePlugin:
285+
enterprise.HistoricalEnterpriseGroupMembership:
366286
".. no_pii:": "No PII"
367-
wiki.RevisionPlugin:
287+
enterprise.HistoricalLearnerCreditEnterpriseCourseEnrollment:
368288
".. no_pii:": "No PII"
369-
wiki.RevisionPluginRevision:
289+
enterprise.HistoricalLicensedEnterpriseCourseEnrollment:
370290
".. no_pii:": "No PII"
371-
wiki.SimplePlugin:
291+
enterprise.HistoricalPendingEnrollment:
372292
".. no_pii:": "No PII"
373-
wiki.URLPath:
293+
enterprise.HistoricalPendingEnterpriseCustomerAdminUser:
294+
".. pii:": "Contains pending enterprise admin email address."
295+
".. pii_types:": "email_address"
296+
".. pii_retirement:": "consumer_api"
297+
enterprise.HistoricalPendingEnterpriseCustomerUser:
298+
".. pii:": "Contains pending enterprise learner email address."
299+
".. pii_types:": "email_address"
300+
".. pii_retirement:": "consumer_api"
301+
enterprise.HistoricalSystemWideEnterpriseUserRoleAssignment:
302+
".. no_pii:": "No PII"
303+
forum.AbuseFlagger:
304+
".. no_pii:": "No PII"
305+
forum.Comment:
306+
".. pii:": "Forum comments may contain user-generated content and usernames."
307+
".. pii_types:": "username, biography"
308+
".. pii_retirement:": "local_api"
309+
forum.CommentThread:
310+
".. pii:": "Forum thread content may include user-generated text and usernames."
311+
".. pii_types:": "username, biography"
312+
".. pii_retirement:": "local_api"
313+
forum.CourseStat:
314+
".. no_pii:": "No PII"
315+
forum.EditHistory:
316+
".. pii:": "Forum edit history stores user-generated text and author identifiers."
317+
".. pii_types:": "username, biography"
318+
".. pii_retirement:": "local_api"
319+
forum.ForumUser:
320+
".. pii:": "Forum profile links and username data."
321+
".. pii_types:": "username"
322+
".. pii_retirement:": "local_api"
323+
forum.HistoricalAbuseFlagger:
324+
".. no_pii:": "No PII"
325+
forum.LastReadTime:
326+
".. no_pii:": "No PII"
327+
forum.MongoContent:
328+
".. no_pii:": "No PII"
329+
forum.ReadState:
330+
".. no_pii:": "No PII"
331+
forum.Subscription:
332+
".. no_pii:": "No PII"
333+
forum.UserVote:
334+
".. no_pii:": "No PII"
335+
lti_consumer.Lti1p3Passport:
336+
".. pii:": "Stores third-party LTI service credentials and identifiers."
337+
".. pii_types:": "password, external_service"
338+
".. pii_retirement:": "retained"
339+
oel_collections.Collection:
340+
".. no_pii:": "No PII"
341+
oel_components.Component:
342+
".. no_pii:": "No PII"
343+
oel_publishing.Container:
344+
".. no_pii:": "No PII"
345+
oel_publishing.DraftChangeLog:
346+
".. no_pii:": "No PII"
347+
oel_publishing.DraftChangeLogRecord:
348+
".. no_pii:": "No PII"
349+
oel_publishing.LearningPackage:
350+
".. no_pii:": "No PII"
351+
oel_publishing.PublishableEntity:
352+
".. no_pii:": "No PII"
353+
oel_tagging.ObjectTag:
354+
".. no_pii:": "No PII"
355+
oel_tagging.Tag:
356+
".. no_pii:": "No PII"
357+
oel_tagging.TagImportTask:
358+
".. no_pii:": "No PII"
359+
oel_tagging.Taxonomy:
360+
".. no_pii:": "No PII"
361+
openedx_catalog.CatalogCourse:
362+
".. no_pii:": "No PII"
363+
openedx_catalog.CourseRun:
364+
".. no_pii:": "No PII"
365+
openedx_content.Collection:
366+
".. no_pii:": "No PII"
367+
openedx_content.CollectionPublishableEntity:
368+
".. no_pii:": "No PII"
369+
openedx_content.Component:
370+
".. no_pii:": "No PII"
371+
openedx_content.ComponentType:
374372
".. no_pii:": "No PII"
373+
openedx_content.ComponentVersion:
374+
".. no_pii:": "No PII"
375+
openedx_content.ComponentVersionMedia:
376+
".. no_pii:": "No PII"
377+
openedx_content.Container:
378+
".. no_pii:": "No PII"
379+
openedx_content.ContainerType:
380+
".. no_pii:": "No PII"
381+
openedx_content.ContainerVersion:
382+
".. no_pii:": "No PII"
383+
openedx_content.Draft:
384+
".. no_pii:": "No PII"
385+
openedx_content.EntityList:
386+
".. no_pii:": "No PII"
387+
openedx_content.EntityListRow:
388+
".. no_pii:": "No PII"
389+
openedx_content.LearningPackage:
390+
".. no_pii:": "No PII"
391+
openedx_content.Media:
392+
".. no_pii:": "No PII"
393+
openedx_content.MediaType:
394+
".. no_pii:": "No PII"
395+
openedx_content.PublishLog:
396+
".. no_pii:": "No PII"
397+
openedx_content.PublishLogRecord:
398+
".. no_pii:": "No PII"
399+
openedx_content.PublishableEntity:
400+
".. no_pii:": "No PII"
401+
openedx_content.PublishableEntityVersion:
402+
".. no_pii:": "No PII"
403+
openedx_content.PublishableEntityVersionDependency:
404+
".. no_pii:": "No PII"
405+
openedx_content.Published:
406+
".. no_pii:": "No PII"
407+
openedx_content.Section:
408+
".. no_pii:": "No PII"
409+
openedx_content.SectionVersion:
410+
".. no_pii:": "No PII"
411+
openedx_content.Subsection:
412+
".. no_pii:": "No PII"
413+
openedx_content.SubsectionVersion:
414+
".. no_pii:": "No PII"
415+
openedx_content.Unit:
416+
".. no_pii:": "No PII"
417+
openedx_content.UnitVersion:
418+
".. no_pii:": "No PII"
419+
organizations.HistoricalOrganization:
420+
".. no_pii:": "No PII"
421+
organizations.HistoricalOrganizationCourse:
422+
".. no_pii:": "No PII"
423+
push_notifications.APNSDevice:
424+
".. pii:": "Contains mobile push tokens tied to users/devices."
425+
".. pii_types:": "external_service"
426+
".. pii_retirement:": "local_api"
427+
push_notifications.GCMDevice:
428+
".. pii:": "Contains mobile push tokens tied to users/devices."
429+
".. pii_types:": "external_service"
430+
".. pii_retirement:": "local_api"
431+
push_notifications.WNSDevice:
432+
".. pii:": "Contains mobile push tokens tied to users/devices."
433+
".. pii_types:": "external_service"
434+
".. pii_retirement:": "local_api"
435+
push_notifications.WebPushDevice:
436+
".. pii:": "Contains web push endpoint/subscription data tied to users/devices."
437+
".. pii_types:": "external_service"
438+
".. pii_retirement:": "local_api"
439+
submissions.ExternalGraderDetail:
440+
".. no_pii:": "No PII"
441+
submissions.SubmissionFile:
442+
".. no_pii:": "No PII"
443+
support.HistoricalUserSocialAuth:
444+
".. pii:": "Historical social auth linkage to third-party identity providers."
445+
".. pii_types:": "external_service"
446+
".. pii_retirement:": "local_api"

.pii_annotations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source_path: ./
22
report_path: pii_report
33
safelist_path: .annotation_safe_list.yml
4-
coverage_target: 85.3
4+
coverage_target: 100.0
55
# See OEP-30 for more information on these values and what they mean:
66
# https://open-edx-proposals.readthedocs.io/en/latest/oep-0030-arch-pii-markup-and-auditing.html#docstring-annotations
77
annotations:

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,12 @@ pii_check: ## check django models for pii annotations
179179
DJANGO_SETTINGS_MODULE=cms.envs.test \
180180
code_annotations django_find_annotations \
181181
--config_file .pii_annotations.yml \
182-
--app_name cms \
183182
--coverage \
184183
--lint
185184

186185
DJANGO_SETTINGS_MODULE=lms.envs.test \
187186
code_annotations django_find_annotations \
188187
--config_file .pii_annotations.yml \
189-
--app_name lms \
190188
--coverage \
191189
--lint
192190

0 commit comments

Comments
 (0)