Skip to content

fix(security): bump pillow, pypdf, click, setuptools to clear known advisories - #466

Closed
seonghobae wants to merge 2 commits into
developfrom
claude/contextualwisdomlab-audit-governance-btqxja
Closed

fix(security): bump pillow, pypdf, click, setuptools to clear known advisories#466
seonghobae wants to merge 2 commits into
developfrom
claude/contextualwisdomlab-audit-governance-btqxja

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

The central Security Scan trivy-fs gate (severity CRITICAL/HIGH/MEDIUM, ignore-unfixed=true) flagged five advisories in the resolved dependency graph. This PR clears all of them — four by bumping the vulnerable package, one (docs-build-only, blocked from a clean fix) by a documented suppression.

Fixed by dependency bump (uv.lock only, diff scoped to these packages)

Package From → To Advisories cleared
pillow 12.2.0 → 12.3.0 PYSEC-2026-2253/2254/2255/2256, 3451-3454, 3493-3496
pypdf 6.13.3 → 6.14.2 CVE-2026-59935/59936/59937/59938
click 8.3.2 → 8.4.2 PYSEC-2026-2132 (transitive via uvicorn)
setuptools 81.0.0 → 83.0.0 PYSEC-2026-3447

pillow/pypdf are direct deps whose existing ranges already permit the patched releases; click/setuptools are transitive/build deps. No pyproject constraint changes.

Handled by documented .trivyignore entry

CVE-2026-61632 (MEDIUM 5.3) on pymdown-extensions — a docs-build-only dependency never imported by the runtime FastAPI service under src/newsdom_api, so it is not reachable in the shipped API. Its fix (≥ 11.0.0) requires mkdocs-material ≥ 9.7, but that upper bound is intentionally pinned <9.7 and enforced by tests/test_project_metadata.py::test_docs_theme_range_stays_below_warning_release (9.7 emits the mkdocs-2.0 deprecation warning that mkdocs build --strict rejects) — so a clean fix is blocked by a deliberate, tested constraint. Added a single, time-boxed, documented .trivyignore entry per the repo's contract (rule id named, artifact + why-unfixable, revisit condition), reproduced from the trivy-fs job log. The gate is not weakened — every other advisory still fails the build.

Git Flow target

  • fix/* targets develop ✔.

Verification

  • PYTHONWARNINGS=error uv run pytest --cov=src/newsdom_api --cov-branch --cov-fail-under=100430 passed, 100% branch coverage, no warnings
  • tests/test_fuzzing_integration.py (.trivyignore contract) → 21 passed
  • uv run mkdocs build --strict → builds clean
  • pip-audit on the uv-exported runtime lock → No known vulnerabilities found

Notes

  • No release/hotfix back-merge follow-up needed — dependency lock bump + one documented trivy suppression.

Summary by CodeRabbit

  • 보안
    • 문서 빌드 전용 의존성에서 확인된 중간 수준 취약점에 대해 보안 검사 예외를 추가했습니다.
    • 해당 예외의 적용 근거와 재검토 조건을 기록했습니다.

`pip-audit` / the central Security Scan trivy-fs gate (severity
CRITICAL/HIGH/MEDIUM, ignore-unfixed=true) flag fixable advisories in the
resolved dependency graph. Bump the four packages whose fixes are
range-compatible and verified, regenerating uv.lock only (no source or
pyproject constraint changes; diff scoped to exactly these packages):

  pillow     12.2.0 -> 12.3.0  (PYSEC-2026-2253/2254/2255/2256,
                                3451-3454, 3493-3496)
  pypdf      6.13.3 -> 6.14.2  (CVE-2026-59935/59936/59937/59938)
  click      8.3.2  -> 8.4.2   (PYSEC-2026-2132; transitive via uvicorn)
  setuptools 81.0.0 -> 83.0.0  (PYSEC-2026-3447)

pillow and pypdf are direct dependencies whose existing pyproject ranges
(`Pillow>=11.0,<13.0`, `pypdf>=6.13.3,<7.0`) already permit the patched
releases; click and setuptools are transitive/build deps.

Verification:
- pip-audit (uv-exported runtime lock) => No known vulnerabilities found
- PYTHONWARNINGS=error uv run pytest --cov=src/newsdom_api --cov-branch
  --cov-fail-under=100 => 430 passed, 100% branch coverage, no warnings
- uv run mkdocs build --strict => builds clean

Not included: pymdown-extensions (CVE-2026-61632, fixed in 11.0.0) is a
docs-build-only dependency whose fix requires mkdocs-material >= 9.7, but
that upper bound is deliberately pinned `<9.7` and enforced by
tests/test_project_metadata.py::test_docs_theme_range_stays_below_warning_release
(9.7 emits the mkdocs-2.0 deprecation warning). It is not runtime-reachable
and needs a separate maintainer decision (coordinated docs-framework bump
or a documented .trivyignore entry), so it is intentionally left out here.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

.trivyignore에 문서 빌드 의존성의 CVE-2026-61632를 억제하는 항목과 적용 근거, 업그레이드 조건 및 2026-10-31 재검토 기한을 추가했습니다.

Changes

보안 검사 억제

Layer / File(s) Summary
취약점 억제 및 재검토 조건
.trivyignore
pymdown-extensionsCVE-2026-61632를 억제하고, 해당 의존성이 문서 빌드 전용이며 런타임 FastAPI 서비스에서 도달 불가하다는 근거와 재검토 조건을 주석으로 기록합니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed 제목이 pillow, pypdf, click, setuptools의 보안 취약점 해소라는 핵심 변경을 정확히 요약합니다.
Description check ✅ Passed Summary, Git Flow target, Verification, Notes 섹션이 모두 있고 변경 내용과 검증 결과도 충분히 구체적입니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/contextualwisdomlab-audit-governance-btqxja

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

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 30, 2026
…ppression

The central Security Scan trivy-fs gate reports one residual finding after
the pillow/pypdf/click/setuptools bumps (run 30518852808):

  [MEDIUM (security-severity=5.3)] CVE-2026-61632 uv.lock:1
    Package: pymdown-extensions

pymdown-extensions is a docs-build-only dependency (renders the MkDocs
manual) and is never imported by the runtime FastAPI service under
src/newsdom_api, so the path-traversal is not reachable in the shipped API.
Its fix (>= 11.0.0) is only pulled by mkdocs-material >= 9.7, but that upper
bound is intentionally pinned "<9.7" and enforced by
tests/test_project_metadata.py::test_docs_theme_range_stays_below_warning_release
(9.7 emits the mkdocs-2.0 deprecation warning that `mkdocs build --strict`
rejects). Fixing here is therefore blocked by a deliberate, tested constraint.

Add a single, documented, time-boxed .trivyignore entry following the repo's
contract (rule id named, artifact + why-unfixable, revisit condition),
reproduced from the trivy-fs job log per the file's own instructions. The
gate is not weakened: every other advisory still fails the build, and this
entry is revisited when the docs theme is bumped or by 2026-10-31.

Verification:
- tests/test_fuzzing_integration.py (.trivyignore contract) => 21 passed
- PYTHONWARNINGS=error uv run pytest => 430 passed (100% branch coverage)

Co-Authored-By: Claude <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.trivyignore:
- Around line 23-36: Limit the CVE-2026-61632 suppression to uv.lock instead of
applying it globally through .trivyignore. Move the entry to .trivyignore.yaml
using its paths configuration and ensure the Trivy scan reads that file, or
remove the suppression after upgrading the affected documentation dependencies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 36ee9a57-1fea-43ad-ac4f-555fbe4dec3a

📥 Commits

Reviewing files that changed from the base of the PR and between 04491c0 and d888326.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • .trivyignore

Comment thread .trivyignore
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