Skip to content

Replace real PHI in fixtures with John Smith USA mock data - #1

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/redact-phi-john-smith-f469
Jul 8, 2026
Merged

Replace real PHI in fixtures with John Smith USA mock data#1
cursor[bot] merged 2 commits into
mainfrom
cursor/redact-phi-john-smith-f469

Conversation

@apodobe

@apodobe apodobe commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  1. PHI redaction — replace real patient data in fixtures with mock John Smith, USA
  2. Security hardening — fix broken pre-push guard, strengthen CI, harden deploy and zip import

Security fixes (high impact)

Issue Fix
Pre-push hook scanned empty staged diff (useless on git push) --push mode reads stdin commit ranges
CI only grep'd a few PHI strings --scan-all scans entire tracked tree
Deploy ssh "$VPS" "mkdir -p '$DIR'" injection risk validate-deploy-path.sh + ssh --
Apple Health zip: zip-slip / zip-bomb medbots/zip_safety.py
No dependency auditing pip-audit job + Dependabot

Verification

  • python3 -m pytest — 71 passed
  • python3 scripts/check_safe_to_push.py --public --scan-all — clean

Post-merge (manual)

  • git config core.hooksPath .githooks on all dev machines
  • Old PHI still in git history — consider git filter-repo if full purge needed
  • VPS: chmod 600 ~/.config/medbot-openclaw.env, restrict TELEGRAM_ALLOWED_USER_IDS
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 8, 2026 08:54
Redact patient-identifying fields in test and demo pdf_text fixtures
(OMS policy, names, DOB, card numbers, employer, clinic staff).

Update PATIENT_PROFILE, docs, and README examples to use mock patient
John Smith (1985-06-15, USA). Extend secret-scan CI and pre-push
blocklist to catch previously leaked PHI patterns.

Co-authored-by: apodobe <apodobe@users.noreply.github.com>
- check_safe_to_push: scan outgoing commit ranges (--push), full tree
  (--scan-all), added-lines-only diff parsing, broader secret patterns
- Pre-push hook now reads stdin refs instead of empty staged diff
- Deploy scripts: validate paths/hosts, ssh -- separator, no quoted injection
- Apple Health import: zip-slip and zip-bomb validation
- CI: scan-all, global .env block, gitleaks config, pip-audit, dependabot
- SECURITY.md: threat model, hook install, VPS hardening notes
- Tests for guards and zip safety

Co-authored-by: apodobe <apodobe@users.noreply.github.com>
@cursor
cursor Bot merged commit 7df96ef into main Jul 8, 2026
1 of 4 checks passed
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