Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PII tooling #473

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions pii-ner-exclude.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
-O codecov.sh https://codecov.io/bash
.filtered li:not([data-match
" INSERT INTO peoplefinder_teamtree (
" INSERT INTO public.wagtaildocs_document
" INSERT INTO public.wagtailimages_image
" INSERT INTO public.wagtailmedia_media
"Annotate the queryset
"Submit that the given person
"Wordpress GUID
{ item.action|title }
Expand Down Expand Up @@ -58,6 +60,7 @@ American Samoa
Andorra
Antarctica
Antigua and Barbuda"
apply_active_classes=True %}
AQ
Args
aria-controls="navigation
Expand All @@ -70,12 +73,17 @@ ATOMIC_REBUILD
AU
audit log
AuditLog
AUTHBROKER_CLIENT_ID
AuthenticationFailed
AuthenticationFailed
AuthenticationMiddleware
AutoField
AWS
b"Add
B006
b1b4b6
B901
BACKEND
backup_file_dev.backup
backup.sql
Bakery
Expand All @@ -86,9 +94,11 @@ Bhutan
body_no_html
Botswana
Bouvet Island
br><a
British
Brunei Darussalam
BundleTracker
Business & Trade
BZ
Cabo Verde
Cameroon
Expand All @@ -104,6 +114,7 @@ Christmas Island
CI
CK
ClamAV
ClamAVFileUploadHandler
class="cookie
class="govuk-!-margin
class="inner
Expand All @@ -117,24 +128,31 @@ comment_id
comment_id"
comment.replies.all
Comments
CommonMiddleware
Comoros
Configure Sentry
const li
Content-Type'
Convert
Cook Islands
Cookies
core.context_processors.page_problem_form
core/400.html
core/404.html
CountriesConfig
country_fact_sheet
Crispy
Cropper
CROSS
Crown
currentTeamId(team_id
CW
DAMAGES
Data Hub
DatabaseScheduler
DBT
dd {
DefaultClient
Delete
Democratic
Department for Business and Trade
Expand All @@ -145,12 +163,16 @@ Digital
Digital Workspace
Digital Workspace Administration
Digital Workspace</h1
Digital, Data and Technology
DIT
Django 4.1.10
django_chunk_upload_handlers.s3.S3FileUploadHandler
DJANGO_EMAIL_BACKEND
DJANGO_SECRET_KEY
django-environ>=0.4.5
django-environ>=0.4.5,<0.5
django-storages==1.11.1
django.middleware.common
DjangoCelery
DjangoTemplates
DK
Expand All @@ -172,17 +194,26 @@ el = e.target
Elastic
ELASTIC_APM_SECRET_TOKEN
ELLIPSIS
english
EO
errors.push('Photo
EU
Europe
event.preventDefault
F Y
f"/people/{person.slug}/
f"/teams/{team.slug}/
f"Error
F401
F405
Falkland Islands
Fast Track"
FCO
FEEDBACK_FORMS
FEEDBACK_NOTIFICATION_EMAIL_TEMPLATE_ID
FIELD_COMMENT_LEGEND
FIELD_SATISFACTION_LEGEND
FileHandler
FileReader
found</p
FR
Expand All @@ -197,6 +228,7 @@ GI
Gibraltar
GM
gov_comms
GOV.UK Notify
GOV.UK Publishing Components
govuk_news_item
GP
Expand Down Expand Up @@ -228,26 +260,30 @@ HEO/C4
history_change_reason
history_id"
homepage_govuk_news
hover svg
HowDoIPreview
HREF
href="?page=
href="{%
href="https://people.trade.gov.uk
href="https://workspace.trade.gov.uk/networks/">network</a>.</p>
href="https://www.nationalarchives.gov.uk
href="https://www.nationalarchives.gov.uk/information-management
html {
htmllaundry
HTTP
http://purl.org/dc/elements/1.1/
http://wordpress.org/export/1.2/
http://www.test.com/test/img-1.jpg
https
https://docs.djangoproject.com/en/3.2/topics/http/sessions/#using-sessions-out-of-views
https://pypi.org/project/django-settings-export/
https://stackoverflow.com/a/417184
https://www.googletagmanager.com/gtm.js?id='+i+dl+ '
HU
IDE
IGNORE_ANTI_VIRUS
img {
img aria
IMPLIED
Import Wordpress
Expand All @@ -258,7 +294,9 @@ Insert
IntegerField
International Trade
is_superuser
item {
item_id
j F Y
Jan Mayen
JE
JM
Expand All @@ -276,6 +314,7 @@ KN
Lao People's Democratic Republic
LearningInterest
leaving{%
Level Navigation
li {
li class="quick-links
li class="ws-whats
Expand All @@ -295,9 +334,13 @@ manager_id
markdown==3.3.4
Marshall
Math.round((cropperData.x
max
max_length=-1
max-height
max-width
McDonald Islands
Mentor
MessageMiddleware
method="GET
Micronesia (Federated States
Microsoft
Expand All @@ -320,6 +363,7 @@ MZ
NA
NAME
ner_output_file.txt
Network
NetworksHome
NEW_ASSET_PATH
NewsPageNewsCategory
Expand All @@ -339,6 +383,8 @@ Old Admiralty Building
OPENSEARCH_JAVA_OPTS
OPENSEARCH_JAVA_OPTS=-Xms512
OPTIONS
Order
page_tools_phrase_title_explicit
Paraguay
parent_id
Parse Wordpress
Expand All @@ -352,18 +398,21 @@ PERM_SEC_NAME
person.roles.first
PFM
PFM_AWS_SECRET_ACCESS_KEY
Photo
PHP
PingdomConfig
PM"
PNG
PoliciesHome
Polish
Polynesia
Privacy Policy
PrivacyPolicy
Private Office
Profile
Profile Editors"
profile_completion__avg
PROFILE_DELETED_EMAIL_TEMPLATE_ID
profile.contact_email
ProfilePhoto
Property / Estates
Expand All @@ -379,21 +428,27 @@ RE
re.match("documents_[0-9]+_title
rect(1px
RedirectMiddleware
RedisCache
Relevanssi
Replicate
request</h1
result{%
Revert
revert update
rgb(255,255,255),rgb(255,255,255
Role
role_pk>/
role="alert
role="navigation
roles__team__name
ROOT_LOG_LEVEL
rotate(90deg
RS512
RU
Russian
S101
s3chunkuploader.fields
S3FileUploadHandler
S703
SA
Saint Helena
Expand All @@ -412,6 +467,7 @@ self.seo_title
SerializerMethodField
Server-Authorization'
SERVICE_NAME
SessionMiddleware
Settings
SG
sha256
Expand All @@ -424,17 +480,24 @@ SN
Software
South Sudan
SQL
SSO
ST
Stakeholder
StreamHandler
SV
svg {
Syrian Arab Republic
taggit
Tajikistan
target="_blank
Team
Team Admin
Team Editors
Team.short_name
team</button
TeamAuditLogSerializer.serialize
TeamMember
teams {
TeamSelect
TeamTree"
the South Sandwich Islands
Expand All @@ -459,6 +522,9 @@ United Arab Emirates
updated_at
uploaded_by_user__last_name
urllib3>=1.26.5
URLS
Use Markdown
UserConfig
UUID
v2
VA
Expand All @@ -468,6 +534,7 @@ Video
Video Card
Video or Audio
view_howdoipreview
vimeo
VU
W
W503
Expand Down
35 changes: 18 additions & 17 deletions pii-secret-exclude.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
.env.ci
.env.example
.pre-commit-config.yaml
Procfile
README.md
config/stop-words.txt
config/synonyms.txt
core/templates/404.html
core/test/test_views.py
docs/contributing/testing.md
docs/features/search.excalidraw
import_wordpress/test/wordpress_test.xml
Makefile
package-lock.json
peoplefinder/test/conftest.py
peoplefinder/test/services/test_audit_log.py
poetry.lock
Procfile
README.md
requirements.txt
requirements/base.txt
requirements/dev.txt
requirements/prod.txt
runtime.txt
setup/init.sql
user/management/commands/create_test_users.py
user/migrations/0001_initial.py
user/migrations/0002_auto_20210216_0650.py
user/migrations/0004_historicaluser.py
user/test/factories.py
user/test/test_user.py
src/config/stop-words.txt
src/config/synonyms.txt
src/core/templates/404.html
src/core/test/test_views.py
src/peoplefinder/test/conftest.py
src/peoplefinder/test/services/test_audit_log.py
src/user/management/commands/create_test_users.py
src/user/migrations/0001_initial.py
src/user/migrations/0002_auto_20210216_0650.py
src/user/migrations/0004_historicaluser.py
src/user/test/factories.py
src/user/test/test_user.py
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "digital-workspace-v2"
version = "1.0.0"
description = ""
authors = ["Live Services <live.services@digital.trade.gov.uk>"]
authors = ["Live Services <live.services@digital.trade.gov.uk>"] # /PS-IGNORE
license = "MIT"
readme = "README.md"
# package-mode = false - Paketo buildpack breaks since it's at v1.7.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/truncate_anonymise.py.cli
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ for person in Person.objects.all().reverse():
f"{person.first_name.lower()}.{person.last_name.lower()}@{email_parts[1]}"
)
person.user.username = (
f"{person.first_name.lower()}.{person.last_name.lower()}-123456@id.trade.gov.uk"
f"{person.first_name.lower()}.{person.last_name.lower()}-123456@id.trade.gov.uk" # /PS-IGNORE
)
person.user.email = person.email
if person.user.sso_contact_email is not None:
Expand Down
2 changes: 1 addition & 1 deletion src/core/templates/core/deactivated.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<h1 class="govuk-heading-m">Your user ({{ user }}) has been deactivated</h1>
<p class="govuk-body">
If this is incorrect, or you wish to be reactivated, please email
<a href="mailto:datahubsupport@uktrade.zendesk.com">datahubsupport@uktrade.zendesk.com</a>.
<a href="mailto:datahubsupport@uktrade.zendesk.com">datahubsupport@uktrade.zendesk.com</a>. {# /PS-IGNORE #}
</p>
{% endblock %}
Loading