local-redactor 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,887 @@
1
+ Metadata-Version: 2.4
2
+ Name: local-redactor
3
+ Version: 0.3.0
4
+ Summary: Local command-line tool to redact PII and DevOps secrets from text files and images, built on Microsoft Presidio.
5
+ Author: Munish Mehta
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/mumehta/local-redact
8
+ Project-URL: Repository, https://github.com/mumehta/local-redact
9
+ Keywords: presidio,redaction,pii,secrets,devops,ocr
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Security
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: presidio-analyzer==2.2.364
18
+ Requires-Dist: presidio-anonymizer==2.2.364
19
+ Requires-Dist: presidio-image-redactor==0.0.60
20
+ Requires-Dist: pillow
21
+ Requires-Dist: pytesseract
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest==8.4.2; extra == "dev"
24
+ Requires-Dist: build>=1.2; extra == "dev"
25
+ Requires-Dist: twine>=5.0; extra == "dev"
26
+
27
+ # Local Redact
28
+
29
+ [![CI](https://github.com/mumehta/local-redact/actions/workflows/ci.yml/badge.svg)](https://github.com/mumehta/local-redact/actions/workflows/ci.yml)
30
+
31
+ A local command-line redaction tool that removes personally identifiable information (PII), DevOps secrets, API keys, tokens, credentials, and other sensitive values from text files and images. It is built on top of [Microsoft Presidio](https://github.com/microsoft/presidio).
32
+
33
+ The Python distribution is named `local-redactor` (on PyPI); the installed command is `redact`.
34
+
35
+ The goal of this project is to provide a simple command such as:
36
+
37
+ ```bash
38
+ redact sensitive-file.txt
39
+ redact screenshot.png
40
+ ```
41
+
42
+ which creates sanitized copies that are safer to share in public forums, GitHub issues, support tickets, AI tools, documentation, and other external systems.
43
+
44
+ The project is designed to run locally so that the original sensitive data does not need to be uploaded to a third-party redaction service.
45
+
46
+ It runs on **Windows, macOS, and Linux**. The tool installs as a proper Python package with a `redact` console command, so the same command works identically on every operating system. Only the system prerequisites (Tesseract OCR, the spaCy model) differ per OS.
47
+
48
+ ## Image Redaction Example
49
+
50
+ | Before | After |
51
+ | --- | --- |
52
+ | ![Unredacted DevOps secrets screenshot](tests/fixtures/devops-secrets.png) | ![Redacted DevOps secrets screenshot](tests/fixtures/devops-secrets.redacted.png) |
53
+
54
+ ## Related Posts
55
+
56
+ - [LinkedIn post about Local Redactor](https://lnkd.in/p/ghje9qJn)
57
+ - [Redact Sensitive Data Locally Before Sharing With AI](https://www.munish-mehta.com/post/redact-sensitive-data-locally-before-sharing-with-ai/)
58
+ - [Before You Paste Logs Into AI, Redact Them Locally](https://medium.com/cyber-threat-diaries/before-you-paste-logs-into-ai-redact-them-locally-9aa56c023b1a)
59
+
60
+ ---
61
+
62
+ ## Why This Project Exists
63
+
64
+ Engineers regularly need to share:
65
+
66
+ - Application logs
67
+ - Terminal output
68
+ - Configuration files
69
+ - JSON/YAML
70
+ - Error messages
71
+ - Screenshots
72
+ - Debugging information
73
+ - Infrastructure configuration
74
+ - Support diagnostics
75
+
76
+ These files can unintentionally contain sensitive information such as:
77
+
78
+ - Names
79
+ - Email addresses
80
+ - Phone numbers
81
+ - IP addresses
82
+ - URLs
83
+ - Account identifiers
84
+ - Authentication tokens
85
+ - API keys
86
+ - Cloud credentials
87
+ - Private keys
88
+ - Connection strings
89
+
90
+ Manually finding and redacting every sensitive value is slow and error-prone.
91
+
92
+ This project provides a local automated redaction layer before information is shared externally.
93
+
94
+ ---
95
+
96
+ # Current Status
97
+
98
+ The current version supports text-based files using:
99
+
100
+ - Presidio Analyzer
101
+ - Presidio Anonymizer
102
+ - spaCy
103
+ - `en_core_web_lg`
104
+
105
+ It also supports PNG/JPG/JPEG image redaction using:
106
+
107
+ - Presidio Image Redactor
108
+ - Tesseract OCR
109
+ - pytesseract
110
+
111
+ DevOps-specific secret detection is implemented with custom recognizers for common infrastructure credentials, API keys, tokens, private keys, and connection strings.
112
+
113
+ The project ships as an installable Python package (`local-redactor`) with a `redact` console entry point.
114
+
115
+ ---
116
+
117
+ # Architecture
118
+
119
+ ## Text Redaction
120
+
121
+ ```text
122
+ Input file
123
+ |
124
+ v
125
+ Presidio Analyzer
126
+ |
127
+ +-- Pattern recognizers
128
+ |
129
+ +-- spaCy NLP model
130
+ |
131
+ v
132
+ Detected entities
133
+ |
134
+ v
135
+ Presidio Anonymizer
136
+ |
137
+ v
138
+ Redacted output file
139
+ ```
140
+
141
+ Example:
142
+
143
+ ```text
144
+ user-pii.txt
145
+ |
146
+ v
147
+ Presidio Analyzer
148
+ |
149
+ v
150
+ PERSON
151
+ EMAIL_ADDRESS
152
+ PHONE_NUMBER
153
+ |
154
+ v
155
+ Presidio Anonymizer
156
+ |
157
+ v
158
+ user-pii.redacted.txt
159
+ ```
160
+
161
+ ## Image Redaction
162
+
163
+ ```text
164
+ Screenshot
165
+ |
166
+ v
167
+ Tesseract OCR
168
+ |
169
+ v
170
+ Extracted text + coordinates
171
+ |
172
+ v
173
+ Presidio Analyzer
174
+ |
175
+ v
176
+ Sensitive entities
177
+ |
178
+ v
179
+ Presidio Image Redactor
180
+ |
181
+ v
182
+ Opaque redaction boxes
183
+ |
184
+ v
185
+ screenshot.redacted.png
186
+ ```
187
+
188
+ ---
189
+
190
+ # Prerequisites
191
+
192
+ Two things are required on every operating system and **cannot** be installed by
193
+ `pip`, so they are installed per-OS below:
194
+
195
+ 1. **Python 3.9 or newer**
196
+ 2. **Tesseract OCR** (only needed for image redaction)
197
+
198
+ A third requirement, the spaCy language model, is installed with the same
199
+ command on every OS after the Python package is installed (see
200
+ [Installation](#installation)).
201
+
202
+ Pick your operating system:
203
+
204
+ - [Windows prerequisites](#windows-prerequisites)
205
+ - [macOS prerequisites](#macos-prerequisites)
206
+ - [Linux (Ubuntu/Debian) prerequisites](#linux-ubuntudebian-prerequisites)
207
+
208
+ ---
209
+
210
+ ## Windows prerequisites
211
+
212
+ ### Python
213
+
214
+ Install from [python.org](https://www.python.org/downloads/) or with winget:
215
+
216
+ ```powershell
217
+ winget install -e --id Python.Python.3.12
218
+ python --version
219
+ ```
220
+
221
+ ### Tesseract OCR
222
+
223
+ Tesseract is a native system dependency and is **not installed by pip**.
224
+
225
+ ```powershell
226
+ winget install -e --id tesseract-ocr.tesseract
227
+ ```
228
+
229
+ A typical installation location is:
230
+
231
+ ```text
232
+ C:\Program Files\Tesseract-OCR
233
+ ```
234
+
235
+ Verify:
236
+
237
+ ```powershell
238
+ tesseract --version
239
+ tesseract --list-langs
240
+ ```
241
+
242
+ At minimum, the English language model (`eng`) should be listed.
243
+
244
+ If Windows cannot find `tesseract` after installation, either add
245
+ `C:\Program Files\Tesseract-OCR` to your `PATH`, or point the redactor at the
246
+ binary directly with the `TESSERACT_CMD` environment variable:
247
+
248
+ ```powershell
249
+ $env:TESSERACT_CMD = "C:\Program Files\Tesseract-OCR\tesseract.exe"
250
+ ```
251
+
252
+ ---
253
+
254
+ ## macOS prerequisites
255
+
256
+ ### Python
257
+
258
+ macOS ships with Python 3, but a dedicated install via
259
+ [Homebrew](https://brew.sh/) is recommended:
260
+
261
+ ```bash
262
+ brew install python
263
+ python3 --version
264
+ ```
265
+
266
+ ### Tesseract OCR
267
+
268
+ ```bash
269
+ brew install tesseract
270
+ tesseract --version
271
+ tesseract --list-langs
272
+ ```
273
+
274
+ Homebrew places `tesseract` on your `PATH` automatically. If you installed it
275
+ somewhere non-standard, point the redactor at it explicitly:
276
+
277
+ ```bash
278
+ export TESSERACT_CMD="/opt/homebrew/bin/tesseract"
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Linux (Ubuntu/Debian) prerequisites
284
+
285
+ ### Python
286
+
287
+ ```bash
288
+ sudo apt update
289
+ sudo apt install -y python3 python3-venv python3-pip
290
+ python3 --version
291
+ ```
292
+
293
+ ### Tesseract OCR
294
+
295
+ ```bash
296
+ sudo apt install -y tesseract-ocr
297
+ tesseract --version
298
+ tesseract --list-langs
299
+ ```
300
+
301
+ For other distributions, use the equivalent package
302
+ (for example `sudo dnf install tesseract` on Fedora). If `tesseract` is not on
303
+ your `PATH`, set `TESSERACT_CMD` to its full path:
304
+
305
+ ```bash
306
+ export TESSERACT_CMD="/usr/bin/tesseract"
307
+ ```
308
+
309
+ ---
310
+
311
+ # Installation
312
+
313
+ The steps below are the same on every OS once the
314
+ [prerequisites](#prerequisites) are in place. Windows users can run the same
315
+ commands in PowerShell (adjusting only the virtual-environment activation line,
316
+ noted below).
317
+
318
+ ## 1. Clone the repository
319
+
320
+ ```bash
321
+ git clone https://github.com/mumehta/local-redact.git
322
+ cd local-redact
323
+ ```
324
+
325
+ ## 2. Create and activate a virtual environment
326
+
327
+ A dedicated virtual environment keeps Presidio, spaCy, OpenCV, OCR libraries,
328
+ and their dependencies isolated from system-wide Python packages.
329
+
330
+ Create it:
331
+
332
+ ```bash
333
+ python3 -m venv .venv
334
+ ```
335
+
336
+ Activate it:
337
+
338
+ **macOS / Linux**
339
+
340
+ ```bash
341
+ source .venv/bin/activate
342
+ ```
343
+
344
+ **Windows (PowerShell)**
345
+
346
+ ```powershell
347
+ .\.venv\Scripts\Activate.ps1
348
+ ```
349
+
350
+ Your prompt should now be prefixed with `(.venv)`.
351
+
352
+ ## 3. Upgrade pip
353
+
354
+ ```bash
355
+ python -m pip install --upgrade pip
356
+ ```
357
+
358
+ ## 4. Install the package
359
+
360
+ Install the project (and its pinned dependencies) into the virtual environment.
361
+ This also creates the `redact` command.
362
+
363
+ ```bash
364
+ python -m pip install .
365
+ ```
366
+
367
+ For development (editable install plus test dependencies):
368
+
369
+ ```bash
370
+ python -m pip install -e ".[dev]"
371
+ ```
372
+
373
+ ## 5. Install the spaCy English model
374
+
375
+ This command is identical on every OS:
376
+
377
+ ```bash
378
+ python -m spacy download en_core_web_lg
379
+ ```
380
+
381
+ Verify:
382
+
383
+ ```bash
384
+ python -m spacy validate
385
+ ```
386
+
387
+ `en_core_web_lg` should be listed as compatible.
388
+
389
+ ## 6. Verify the installation
390
+
391
+ ```bash
392
+ redact --help
393
+ ```
394
+
395
+ You should see the CLI usage. Optionally verify the underlying engines:
396
+
397
+ ```bash
398
+ python -c "from presidio_analyzer import AnalyzerEngine; a=AnalyzerEngine(); print([r.entity_type for r in a.analyze(text='My name is John Smith and my email is john@example.com', language='en')])"
399
+ python -c "import pytesseract; print(pytesseract.get_tesseract_version())"
400
+ ```
401
+
402
+ ---
403
+
404
+ # The `redact` Command
405
+
406
+ Installing the package with `pip install .` (or `pip install -e .`) creates a
407
+ real `redact` executable on every operating system:
408
+
409
+ - On **Windows**, pip generates `redact.exe` in the environment's `Scripts`
410
+ directory.
411
+ - On **macOS/Linux**, pip generates a `redact` executable in the environment's
412
+ `bin` directory.
413
+
414
+ No hand-written wrapper script is required. This replaces the older Windows-only
415
+ `redact.cmd` approach (see [Legacy Windows wrapper](#legacy-windows-wrapper) if
416
+ you still want a global command that does not require activating the virtual
417
+ environment).
418
+
419
+ ## Install globally with pipx (recommended for everyday use)
420
+
421
+ [pipx](https://pipx.pypa.io/) installs the command into an isolated environment
422
+ and puts `redact` on your `PATH`, so you never have to activate a virtual
423
+ environment to use it. This works the same on Windows, macOS, and Linux.
424
+
425
+ Install the published release from PyPI:
426
+
427
+ ```bash
428
+ pipx install local-redactor
429
+ ```
430
+
431
+ Or install from a local clone (for unreleased changes):
432
+
433
+ ```bash
434
+ pipx install .
435
+ ```
436
+
437
+ Then, from anywhere:
438
+
439
+ ```bash
440
+ redact application.log
441
+ redact screenshot.png
442
+ ```
443
+
444
+ You still need Tesseract and the spaCy model installed as described in
445
+ [Prerequisites](#prerequisites) and [Installation](#installation). When using
446
+ pipx, the spaCy model must be downloaded into the pipx-managed environment for
447
+ `local-redactor` (pipx isolates each app, so a model installed elsewhere is not
448
+ visible to it):
449
+
450
+ ```bash
451
+ pipx runpip local-redactor -- python -m spacy download en_core_web_lg
452
+ ```
453
+
454
+ ---
455
+
456
+ # Using the Redactor
457
+
458
+ With the virtual environment activated (or after `pipx install`), run:
459
+
460
+ ```bash
461
+ redact ./example.txt
462
+ ```
463
+
464
+ The tool creates:
465
+
466
+ ```text
467
+ example.redacted.txt
468
+ ```
469
+
470
+ The original file is left unchanged.
471
+
472
+ ## Display detected entities
473
+
474
+ ```bash
475
+ redact ./example.txt --show-detections
476
+ ```
477
+
478
+ Example:
479
+
480
+ ```text
481
+ Detections:
482
+
483
+ PERSON score=0.85 position=11:21
484
+ EMAIL_ADDRESS score=1.00 position=38:54
485
+ PHONE_NUMBER score=0.75 position=71:86
486
+ ```
487
+
488
+ This is useful when testing detection accuracy.
489
+
490
+ ## Specify an output file
491
+
492
+ ```bash
493
+ redact ./example.txt -o ./safe-to-share.txt
494
+ ```
495
+
496
+ ## Overwrite an existing redacted file
497
+
498
+ By default, the tool will not overwrite an existing output file. Use `--force`
499
+ when intentional overwriting is required:
500
+
501
+ ```bash
502
+ redact ./example.txt --force
503
+ ```
504
+
505
+ ## Image redaction
506
+
507
+ ```bash
508
+ redact screenshot.png
509
+ ```
510
+
511
+ produces:
512
+
513
+ ```text
514
+ screenshot.redacted.png
515
+ ```
516
+
517
+ Supported image formats: `.png`, `.jpg`, `.jpeg`.
518
+
519
+ If Tesseract is not installed or not on your `PATH`, the tool prints a clear
520
+ error with the correct install command for your OS. You can also point it at a
521
+ specific Tesseract binary with the `TESSERACT_CMD` environment variable.
522
+
523
+ ---
524
+
525
+ # Supported Text Files
526
+
527
+ The current implementation supports text-based formats including:
528
+
529
+ ```text
530
+ .txt
531
+ .log
532
+ .json
533
+ .yaml
534
+ .yml
535
+ .env
536
+ .conf
537
+ .config
538
+ .ini
539
+ .xml
540
+ .csv
541
+ .md
542
+ ```
543
+
544
+ Files are expected to contain UTF-8 text.
545
+
546
+ Structured formats such as JSON, YAML, XML, `.env`, and `.ini` are redacted
547
+ as text. The tool preserves useful structure in many common cases, but it
548
+ does not parse and reserialize these formats yet, so review generated output
549
+ before using it as machine-readable configuration.
550
+
551
+ ---
552
+
553
+ # Example
554
+
555
+ Input:
556
+
557
+ ```text
558
+ My name is John Smith.
559
+ My email address is john@example.com.
560
+ My phone number is +61 412 345 678.
561
+ ```
562
+
563
+ Run:
564
+
565
+ ```bash
566
+ redact example.txt
567
+ ```
568
+
569
+ Output (`example.redacted.txt`):
570
+
571
+ ```text
572
+ My name is <PERSON>.
573
+ My email address is <EMAIL_ADDRESS>.
574
+ My phone number is <PHONE_NUMBER>.
575
+ ```
576
+
577
+ ---
578
+
579
+ # Dependency Management
580
+
581
+ Dependencies are declared in `pyproject.toml`:
582
+
583
+ - Runtime dependencies live under `[project].dependencies`.
584
+ - Development/test dependencies live under
585
+ `[project.optional-dependencies].dev` and are installed with
586
+ `pip install -e ".[dev]"`.
587
+
588
+ Two supporting files remain for convenience:
589
+
590
+ ## `requirements.txt`
591
+
592
+ The direct runtime dependencies, mirroring `pyproject.toml`, for environments
593
+ that prefer a plain requirements file:
594
+
595
+ ```text
596
+ presidio-analyzer==2.2.364
597
+ presidio-anonymizer==2.2.364
598
+ presidio-image-redactor==0.0.60
599
+ ```
600
+
601
+ ## `requirements-lock.txt`
602
+
603
+ Captures the complete known-working Python environment, including transitive
604
+ dependencies. Regenerate it with:
605
+
606
+ ```bash
607
+ python -m pip freeze > requirements-lock.txt
608
+ ```
609
+
610
+ Use it when an exact environment needs to be reproduced:
611
+
612
+ ```bash
613
+ python -m pip install -r requirements-lock.txt
614
+ ```
615
+
616
+ ---
617
+
618
+ # Development And Tests
619
+
620
+ Install the project with development dependencies:
621
+
622
+ ```bash
623
+ python -m pip install -e ".[dev]"
624
+ ```
625
+
626
+ Run the automated tests:
627
+
628
+ ```bash
629
+ python -m pytest
630
+ ```
631
+
632
+ The tests use synthetic PII and credential-shaped fixtures only. Image tests use
633
+ fakes/mocks and do not require Tesseract to be installed.
634
+
635
+ ---
636
+
637
+ # System Dependencies
638
+
639
+ Some dependencies cannot be represented in `pyproject.toml` and are installed
640
+ per-OS (see [Prerequisites](#prerequisites)):
641
+
642
+ ```text
643
+ Tesseract OCR 5.x
644
+ ```
645
+
646
+ The spaCy language model is also installed separately (same command on all
647
+ operating systems):
648
+
649
+ ```bash
650
+ python -m spacy download en_core_web_lg
651
+ ```
652
+
653
+ ---
654
+
655
+ # Security Considerations
656
+
657
+ ## Automated redaction is not a security guarantee
658
+
659
+ The output of this tool should **not automatically be assumed safe for public disclosure**.
660
+
661
+ PII and secret detection systems can produce:
662
+
663
+ - False positives
664
+ - False negatives
665
+ - Incorrect entity boundaries
666
+ - OCR errors
667
+ - Unrecognized credential formats
668
+
669
+ Review highly sensitive output before publishing it.
670
+
671
+ ## DevOps Secrets
672
+
673
+ Standard Presidio recognizers are primarily designed for PII.
674
+
675
+ Infrastructure and DevOps material may contain secrets that are not detected by default, including:
676
+
677
+ ```text
678
+ AWS_ACCESS_KEY_ID
679
+ AWS_SECRET_ACCESS_KEY
680
+
681
+ ghp_...
682
+ github_pat_...
683
+
684
+ Authorization: Bearer ...
685
+
686
+ JWT tokens
687
+
688
+ client_secret=...
689
+
690
+ password=...
691
+
692
+ N8N_ENCRYPTION_KEY=...
693
+
694
+ privkey:...
695
+
696
+ nlpriv:...
697
+
698
+ Kubernetes secrets
699
+
700
+ database connection strings
701
+
702
+ SSH/private keys
703
+
704
+ OAuth credentials
705
+
706
+ cloud provider credentials
707
+ ```
708
+
709
+ Custom recognizers cover many of these patterns, but manually inspect infrastructure-related output before sharing it publicly.
710
+
711
+ ## Current Limitations
712
+
713
+ - Files are processed one at a time; directory/batch redaction is not implemented yet.
714
+ - Text files must be UTF-8 encoded.
715
+ - JSON, YAML, XML, `.env`, `.ini`, and similar files are processed as text, not parsed as structured data.
716
+ - OCR accuracy depends on screenshot quality, font size, contrast, and layout.
717
+ - Detection is best-effort and can miss unfamiliar token formats or redact too much context.
718
+
719
+ ---
720
+
721
+ # Legacy Windows wrapper
722
+
723
+ Before the project was packaged with a console entry point, Windows users
724
+ exposed a global `redact` command with a small `.cmd` wrapper that called the
725
+ virtual environment's Python directly. This is **no longer necessary** — use
726
+ `pip install .` or `pipx install .` instead, which produce a `redact` command
727
+ on every OS.
728
+
729
+ The wrapper is documented here only for historical reference. If you still want
730
+ a wrapper that invokes the project without activating the virtual environment,
731
+ create `C:\Users\<username>\bin\redact.cmd`:
732
+
733
+ ```bat
734
+ @echo off
735
+ "C:\path\to\local-redact\.venv\Scripts\python.exe" -m presidio_redactor.cli %*
736
+ ```
737
+
738
+ and add `C:\Users\<username>\bin` to your user `PATH`.
739
+
740
+ ---
741
+
742
+ # Repository Structure
743
+
744
+ ```text
745
+ local-redact/
746
+ |
747
+ +-- .gitignore
748
+ +-- README.md
749
+ +-- pyproject.toml # packaging, deps, `redact` entry point
750
+ +-- requirements.txt
751
+ +-- requirements-lock.txt
752
+ +-- requirements-dev.txt
753
+ |
754
+ +-- src/
755
+ | +-- presidio_redactor/
756
+ | +-- __init__.py
757
+ | +-- cli.py # argparse + main(); the `redact` command
758
+ | +-- text.py # text redaction pipeline
759
+ | +-- image.py # image redaction + Tesseract resolution
760
+ | +-- recognizers/
761
+ | +-- __init__.py
762
+ | +-- devops.py # custom DevOps/secret recognizers
763
+ |
764
+ +-- tests/
765
+ | +-- fixtures/
766
+ | +-- test_devops_recognizers.py
767
+ | +-- test_image_redaction.py
768
+ | +-- test_text_redaction.py
769
+ | +-- test_tesseract_resolution.py
770
+ |
771
+ +-- user-pii.txt # synthetic local example
772
+ +-- user-pii.redacted.txt # synthetic redacted example
773
+ |
774
+ +-- .venv/ # ignored by Git
775
+ ```
776
+
777
+ ---
778
+
779
+ # Planned Features
780
+
781
+ Future development includes:
782
+
783
+ - Content-based file type detection
784
+ - Broader OAuth token detection
785
+ - Broader GCP/Azure credential detection
786
+ - GitLab token detection
787
+ - Format-aware Kubernetes Secret parsing
788
+ - Batch directory redaction
789
+ - Dry-run mode
790
+ - Configurable entity selection
791
+ - Confidence thresholds
792
+ - Windows Explorer "Redact before sharing" integration
793
+ - Publishing to PyPI
794
+
795
+ ---
796
+
797
+ # Development Roadmap
798
+
799
+ The recommended implementation order is:
800
+
801
+ ```text
802
+ 1. Text PII redaction DONE
803
+ |
804
+ 2. Global redact command DONE
805
+ |
806
+ 3. Tesseract installation DONE
807
+ |
808
+ 4. Image redaction DONE
809
+ |
810
+ 5. DevOps secret recognizers DONE
811
+ |
812
+ 6. Automated synthetic tests DONE
813
+ |
814
+ 7. Cross-platform support DONE
815
+ |
816
+ 8. Python CLI packaging DONE
817
+ |
818
+ 9. Batch redaction
819
+ |
820
+ 10. Windows Explorer integration
821
+ ```
822
+
823
+ ---
824
+
825
+ # Git Safety
826
+
827
+ > **Test-data notice:** All names, email addresses, phone numbers, passwords,
828
+ > tokens, credentials, connection strings, and other sensitive-looking values
829
+ > committed in `tests/fixtures/`, `user-pii.txt`, and
830
+ > `user-pii.redacted.txt` are synthetic dummy data. They are deliberately
831
+ > shaped like real PII and secrets to exercise the redaction pipeline. They
832
+ > are not valid credentials and are not associated with real accounts.
833
+ > Automated secret scanners may still flag these fixtures because their
834
+ > formats intentionally resemble real credentials.
835
+
836
+ Never commit real sensitive data simply to test the redactor.
837
+
838
+ Avoid committing:
839
+
840
+ ```text
841
+ .env
842
+ real application logs
843
+ credentials
844
+ private keys
845
+ access tokens
846
+ unredacted screenshots
847
+ production configuration
848
+ customer information
849
+ personal information
850
+ ```
851
+
852
+ Use synthetic test data instead.
853
+
854
+ Do not rely on `.gitignore` as a security boundary. A file that has already been committed remains in Git history even if it is subsequently added to `.gitignore`.
855
+
856
+ ---
857
+
858
+ # Privacy Model
859
+
860
+ The primary design principle of this project is:
861
+
862
+ > Sensitive source material should remain local wherever possible.
863
+
864
+ Unlike an online redaction service, the local pipeline processes source files on the user's machine.
865
+
866
+ However, users remain responsible for validating that redaction was successful before publishing or transmitting the resulting files.
867
+
868
+ ---
869
+
870
+ # License
871
+
872
+ Choose and add an appropriate open-source license before distributing the project publicly.
873
+
874
+ For a small open-source utility of this type, the MIT License is one possible option.
875
+
876
+ ---
877
+
878
+ # Acknowledgements
879
+
880
+ This project builds on:
881
+
882
+ - Microsoft Presidio
883
+ - spaCy
884
+ - Tesseract OCR
885
+ - pytesseract
886
+
887
+ These projects provide the underlying PII detection, natural-language processing, and optical character recognition capabilities.