Skip to content

fix: high-priority security issues from repo-health audit (#112, #95, #117, #62, #98) - #122

Merged
Liohtml merged 1 commit into
mainfrom
claude/dependabot-maintenance-u1mdmh
Jul 2, 2026
Merged

fix: high-priority security issues from repo-health audit (#112, #95, #117, #62, #98)#122
Liohtml merged 1 commit into
mainfrom
claude/dependabot-maintenance-u1mdmh

Conversation

@Liohtml

@Liohtml Liohtml commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Fixes the four open High-severity repo-health/security issues plus two related Medium findings:

Tests: 9 new unit tests (auth gate, symlink/traversal/zip-bomb rejection, normal ZIP still accepted, de-identified report, file permissions). Router tests updated to the new no-silent-cloud-fallback contract. 154 unit tests pass, ruff + mypy clean.

Closes #112, closes #95, closes #117, closes #62, closes #98.

🤖 Generated with Claude Code

https://claude.ai/code/session_014ywk8AWq5mgbeERmvuhcJy


Generated by Claude Code

- IngestStep now calls provider.authenticate() before fetch() and fails
  with a clear PermissionError on missing credentials (#112)
- LLMRouter no longer silently falls back to a different cloud provider;
  only the on-device 'local' provider may be substituted, with a warning,
  otherwise selection fails loudly (#95)
- LocalProvider._scan_zip() hardened: is_relative_to() traversal check,
  symlink members rejected, ZIP-bomb guards (member count, total
  uncompressed size, compression ratio) (#117, #62)
- New --deidentify CLI flag replaces patient name/ID/birth date with a
  stable SHA-256 pseudonym in JSON/PDF/HTML reports; report files are
  written with owner-only 0600 permissions; SECURITY.md documents the
  PHI handling of the output directory (#98, #89)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ywk8AWq5mgbeERmvuhcJy
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/medcheck/providers/local.py 80.95% 2 Missing and 2 partials ⚠️
src/medcheck/pipeline/report.py 86.66% 2 Missing ⚠️
src/medcheck/llm/router.py 90.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 83a4e8f3-2868-4217-a2a0-e97436f260f6

📥 Commits

Reviewing files that changed from the base of the PR and between 8426bea and 6de5da1.

📒 Files selected for processing (12)
  • SECURITY.md
  • src/medcheck/core/context.py
  • src/medcheck/llm/local.py
  • src/medcheck/llm/router.py
  • src/medcheck/main.py
  • src/medcheck/pipeline/ingest.py
  • src/medcheck/pipeline/report.py
  • src/medcheck/providers/local.py
  • tests/unit/test_llm/test_router.py
  • tests/unit/test_pipeline/test_ingest.py
  • tests/unit/test_pipeline/test_report.py
  • tests/unit/test_providers/test_local.py
🔥 Files not summarized due to errors (12)
  • src/medcheck/main.py: Server error: no LLM provider could handle the message
  • SECURITY.md: Server error: no LLM provider could handle the message
  • src/medcheck/llm/local.py: Server error: no LLM provider could handle the message
  • src/medcheck/core/context.py: Server error: no LLM provider could handle the message
  • src/medcheck/llm/router.py: Server error: no LLM provider could handle the message
  • tests/unit/test_pipeline/test_ingest.py: Server error: no LLM provider could handle the message
  • src/medcheck/pipeline/ingest.py: Server error: no LLM provider could handle the message
  • tests/unit/test_llm/test_router.py: Server error: no LLM provider could handle the message
  • src/medcheck/pipeline/report.py: Server error: no LLM provider could handle the message
  • src/medcheck/providers/local.py: Server error: no LLM provider could handle the message
  • tests/unit/test_providers/test_local.py: Server error: no LLM provider could handle the message
  • tests/unit/test_pipeline/test_report.py: Server error: no LLM provider could handle the message

📝 Walkthrough

[!WARNING]

Walkthrough skipped

File diffs could not be summarized.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/dependabot-maintenance-u1mdmh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Liohtml
Liohtml merged commit 2167144 into main Jul 2, 2026
13 of 14 checks passed
Liohtml pushed a commit that referenced this pull request Jul 2, 2026
- CHANGELOG: fold Unreleased into 0.3.0 with all changes since v0.2.1
  (security batches #122-#125, dependabot action bumps #79-#83)
- Bump version to 0.3.0 in pyproject.toml and __init__.py
- README: document --deidentify, MEDCHECK_RATE_LIMIT and the
  no-silent-fallback LLM routing guarantee

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ywk8AWq5mgbeERmvuhcJy
Liohtml added a commit that referenced this pull request Jul 2, 2026
- CHANGELOG: fold Unreleased into 0.3.0 with all changes since v0.2.1
  (security batches #122-#125, dependabot action bumps #79-#83)
- Bump version to 0.3.0 in pyproject.toml and __init__.py
- README: document --deidentify, MEDCHECK_RATE_LIMIT and the
  no-silent-fallback LLM routing guarantee


Claude-Session: https://claude.ai/code/session_014ywk8AWq5mgbeERmvuhcJy

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment