Never commit to this public repo:
- API keys, bot tokens, real
.envfiles bot_config.jsonwith instance-specific paths- Patient data: labs, genetics, clinical notes,
PATIENT_PROFILE.json,pdf_text/,doc_text/ - Raw PDFs in
sources/orincoming/
Keep health data in a local or private instance directory (see README).
| Control | Purpose |
|---|---|
scripts/check_safe_to_push.py --public --push |
Pre-push hook: scans outgoing commits (not just staged files) |
scripts/check_safe_to_push.py --public --scan-all |
CI: scans all tracked files |
.github/workflows/secret-scan.yml |
Gitleaks + path blocks + dependency audit |
.gitleaks.toml |
Allowlist for mock fixtures only |
deploy/lib/validate-deploy-path.sh |
Blocks shell metacharacter injection in deploy vars |
Install hooks after clone:
git config core.hooksPath .githooks- Store tokens in
~/.config/medbot-openclaw.envwithchmod 600 - Set
TELEGRAM_ALLOWED_USER_IDS— never run the bot open to all Telegram users - Corpus on VPS:
/opt/medbot-corpus— restrict SSH and filesystem permissions - Do not expose corpus directory via HTTP without authentication
Report vulnerabilities via GitHub Security Advisories — without attaching PHI or tokens.