solidprivacy-nl commited on
Commit
ce070aa
·
1 Parent(s): fb4ccc8

Add WP39 clean DOCX export policy

Browse files
Files changed (1) hide show
  1. CLEAN_DOCX_EXPORT_POLICY.md +249 -0
CLEAN_DOCX_EXPORT_POLICY.md ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WP39 — Clean DOCX export policy
2
+
3
+ Status: completed policy/tests/documentation-only
4
+ Repository: `solidprivacy-nl/scrub`
5
+
6
+ This policy defines when Scrub may warn, report, block or eventually claim a DOCX export is clean. It is policy-only and does not implement cleaning, removal, export blocking, UI changes or export semantic changes.
7
+
8
+ ---
9
+
10
+ ## 1. Current policy position
11
+
12
+ The current DOCX output must not be described as a clean DOCX export.
13
+
14
+ Allowed wording:
15
+
16
+ ```text
17
+ DOCX output with current limitations
18
+ DOCX restored output with hygiene warnings
19
+ DOCX hygiene audit available
20
+ ```
21
+
22
+ Not allowed yet:
23
+
24
+ ```text
25
+ clean DOCX
26
+ safe DOCX
27
+ fully cleaned DOCX
28
+ metadata-free DOCX
29
+ comments removed
30
+ tracked changes removed
31
+ complete hidden-content handling
32
+ ```
33
+
34
+ Reason: WP35-WP38 show that residual placeholders, comments, tracked changes, headers, footers and other hidden content remain high-risk unless explicitly audited and handled.
35
+
36
+ ---
37
+
38
+ ## 2. Current supported evidence
39
+
40
+ Current evidence is limited to detection/reporting:
41
+
42
+ - WP35 documents the risk.
43
+ - WP36A records residual placeholder and comments/kantlijncommentaren triage.
44
+ - WP37 extracts headers, footers, comments/person metadata and tracked-change markers.
45
+ - WP38 builds a report-only DOCX hygiene audit.
46
+
47
+ This evidence is enough for warnings and audit reporting. It is not enough for a clean-export claim.
48
+
49
+ ---
50
+
51
+ ## 3. Current export behavior
52
+
53
+ Current export behavior remains unchanged.
54
+
55
+ For now:
56
+
57
+ - standard DOCX export may continue with limitation warnings;
58
+ - restored DOCX export may continue with limitation warnings;
59
+ - DOCX hygiene audit can be produced as report-only output;
60
+ - no export is blocked by WP39;
61
+ - no content is removed by WP39;
62
+ - no export file bytes are changed by WP39.
63
+
64
+ ---
65
+
66
+ ## 4. Warning/report policy
67
+
68
+ ### 4.1 No WP37/WP38-supported findings
69
+
70
+ If no supported findings are detected by the current audit:
71
+
72
+ Policy:
73
+
74
+ ```text
75
+ warning-only
76
+ ```
77
+
78
+ Required message:
79
+
80
+ ```text
81
+ No supported hidden-content findings were detected, but this is not a clean-DOCX guarantee.
82
+ ```
83
+
84
+ Reason:
85
+
86
+ WP37/WP38 do not yet cover all DOCX parts, such as metadata, footnotes, endnotes, custom XML, text boxes, shapes, charts or embedded objects.
87
+
88
+ ### 4.2 Headers or footers detected
89
+
90
+ Policy:
91
+
92
+ ```text
93
+ high-risk warning + audit finding
94
+ ```
95
+
96
+ Required message:
97
+
98
+ ```text
99
+ Headers or footers can contain confidential names, references or matter context outside normal body text. Review before sharing.
100
+ ```
101
+
102
+ ### 4.3 Comments/kantlijncommentaren detected
103
+
104
+ Policy:
105
+
106
+ ```text
107
+ high-risk warning + audit finding
108
+ ```
109
+
110
+ Required message:
111
+
112
+ ```text
113
+ Comments or margin notes can contain reviewer identities, legal strategy, care notes or sensitive references. Review before sharing.
114
+ ```
115
+
116
+ ### 4.4 Tracked changes detected
117
+
118
+ Policy:
119
+
120
+ ```text
121
+ high-risk warning + audit finding
122
+ ```
123
+
124
+ Required message:
125
+
126
+ ```text
127
+ Tracked changes can preserve deleted or moved sensitive text. Review before sharing.
128
+ ```
129
+
130
+ ### 4.5 Invalid DOCX or audit failed
131
+
132
+ Policy:
133
+
134
+ ```text
135
+ unknown-risk warning
136
+ ```
137
+
138
+ Required message:
139
+
140
+ ```text
141
+ DOCX hygiene risk could not be fully assessed. Do not claim the file is clean.
142
+ ```
143
+
144
+ ---
145
+
146
+ ## 5. Future export blocking policy candidates
147
+
148
+ Export blocking is not implemented in WP39.
149
+
150
+ Future export blocking may be considered only after explicit approval and tests.
151
+
152
+ Possible later blocking candidates:
153
+
154
+ - user selects a future `clean DOCX export` mode while high-risk findings are present;
155
+ - DOCX audit cannot parse the document;
156
+ - comments or tracked changes are detected and no cleaner/removal policy exists;
157
+ - a future cleaner fails to remove a high-risk part;
158
+ - residual placeholders are detected in output that is presented as restored/clean;
159
+ - unsupported high-risk parts are detected but not handled.
160
+
161
+ Blocking must not be silently added to existing standard/restored export behavior without a separate workpackage.
162
+
163
+ ---
164
+
165
+ ## 6. Minimum requirements before a clean-DOCX claim
166
+
167
+ A future clean-DOCX export claim requires all of the following:
168
+
169
+ 1. explicit clean-export mode or policy decision;
170
+ 2. extraction coverage for supported high-risk parts;
171
+ 3. documented handling for comments, tracked changes, headers and footers;
172
+ 4. documented handling or explicit exclusion for metadata;
173
+ 5. documented handling or explicit exclusion for footnotes, endnotes, text boxes, shapes, charts, embedded objects and custom XML;
174
+ 6. tests proving that handled parts are removed, sanitized or reported;
175
+ 7. tests proving residual placeholders are detected or prevented;
176
+ 8. audit output explaining what was handled and what remains unsupported;
177
+ 9. no hidden recovery of removed content;
178
+ 10. user-facing wording that does not overclaim.
179
+
180
+ Until these conditions are met, the product must not claim a DOCX export is clean.
181
+
182
+ ---
183
+
184
+ ## 7. Labels for future export modes
185
+
186
+ Allowed current labels:
187
+
188
+ ```text
189
+ Download DOCX
190
+ Download hersteld DOCX-bestand
191
+ DOCX hygiene audit report
192
+ ```
193
+
194
+ Recommended future labels:
195
+
196
+ ```text
197
+ Download DOCX met beperkingen
198
+ Download hersteld DOCX-bestand met beperkingen
199
+ Bekijk DOCX-hygiënerapport
200
+ ```
201
+
202
+ Potential later label only after approved implementation:
203
+
204
+ ```text
205
+ Download schone DOCX-export
206
+ ```
207
+
208
+ The later label is not allowed until a separate clean-export implementation and policy gate are complete.
209
+
210
+ ---
211
+
212
+ ## 8. Explicit non-changes in WP39
213
+
214
+ WP39 does not:
215
+
216
+ - implement a DOCX cleaner;
217
+ - remove comments;
218
+ - accept or remove tracked changes;
219
+ - remove metadata;
220
+ - block export;
221
+ - change export semantics;
222
+ - change DOCX reinsert behavior;
223
+ - change Streamlit UI;
224
+ - change Scrub Key schema;
225
+ - add dependencies;
226
+ - add real data;
227
+ - add cloud processing.
228
+
229
+ ---
230
+
231
+ ## 9. Recommended next step
232
+
233
+ Recommended next workpackage:
234
+
235
+ ```text
236
+ WP40 — Document-centric review UX specification
237
+ ```
238
+
239
+ Reason:
240
+
241
+ DOCX hygiene findings and audit reports need a document-centered review surface before export blocking or clean-export claims are safe to implement.
242
+
243
+ Alternative DOCX-specific follow-up if the coordinator wants to continue this line first:
244
+
245
+ ```text
246
+ WP39B — DOCX hygiene audit UI planning
247
+ ```
248
+
249
+ WP39B should plan how WP38 audit output is shown to users without yet blocking export or cleaning content.