Skip to content

Add standalone DOCX sanitizer script - #93

Closed
org-event wants to merge 1 commit into
mainfrom
cursor/docx-sanitize-script-28d0
Closed

Add standalone DOCX sanitizer script#93
org-event wants to merge 1 commit into
mainfrom
cursor/docx-sanitize-script-28d0

Conversation

@org-event

Copy link
Copy Markdown
Owner

Summary

  • Adds a standalone utility under docx-sanitize/ to sanitize .docx files while preserving layout/template.
  • Replaces words/numbers with same-length random characters; swaps raster and vector images (PNG/JPEG/EMF/WMF/SVG) for same-size placeholders; wipes embeddings and scrambles metadata/hyperlinks/alt-text.

Test plan

  • pip install -r docx-sanitize/requirements.txt
  • python3 docx-sanitize/sanitize_docx.py path/to/file.docx
  • Open *.sanitized.docx and confirm layout matches the original while text/images are anonymized
Open in Web Open in Cursor 

Replaces text with same-length random characters and images
(including EMF/WMF/SVG) with same-size placeholders while
preserving document layout and template structure.

Co-authored-by: org-event <org-event@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
pip/Pillow >= 10.0.0 UnknownUnknown

Scanned Files

  • docx-sanitize/requirements.txt

@cursor
cursor Bot deleted the cursor/docx-sanitize-script-28d0 branch August 27, 2026 10:09
@org-event org-event closed this Aug 27, 2026
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