Skip to content

chore(deps): bump pygments 2.19.2 → 2.20.0 (GHSA-5239-wwwm-4pmq, ReDoS)#82

Merged
cmeans-claude-dev[bot] merged 2 commits into
mainfrom
fix/pygments-2.20.0-redos
May 1, 2026
Merged

chore(deps): bump pygments 2.19.2 → 2.20.0 (GHSA-5239-wwwm-4pmq, ReDoS)#82
cmeans-claude-dev[bot] merged 2 commits into
mainfrom
fix/pygments-2.20.0-redos

Conversation

@cmeans-claude-dev
Copy link
Copy Markdown
Contributor

@cmeans-claude-dev cmeans-claude-dev Bot commented May 1, 2026

Summary

Closes Dependabot alert #3. Pygments < 2.20.0 has an inefficient regex for GUID matching that can be triggered into ReDoS by crafted input — GHSA-5239-wwwm-4pmq (severity Low, patched in 2.20.0).

Scope

  • Transitive dev-dep via pytest 9.0.3 (the test suite uses Pygments for syntax-highlighting traceback output). Runtime is unaffected — production never imports Pygments.
  • Bumped via uv lock --upgrade-package pygments. Only uv.lock changed; pyproject.toml did not need an adjustment because pytest doesn't pin Pygments to an upper bound.

Diff at a glance

```diff
[[package]]
name = "pygments"
-version = "2.19.2"
+version = "2.20.0"
```

Plus the corresponding sdist + wheel hash updates in uv.lock and a one-line CHANGELOG entry.

QA

Manual tests

    • Run uv run pytest — 554 passed at 96.13% coverage.
    • Run uv run ruff check src/ tests/ scripts/ — clean.
    • Run uv run ruff format --check src/ tests/ scripts/ — clean.
    • Run uv run mypy src/ scripts/ — clean (30 files, strict-mode).
    • Spot-check grep -A 2 "name = \"pygments\"" uv.lock — version is now 2.20.0.

Verification I already ran

Check Result
uv run pytest 554 passed, 100 deselected, 96.13% coverage on bumped lockfile
uv run ruff check src/ tests/ scripts/ clean
uv run mypy src/ scripts/ clean
Advisory lookup GHSA-5239-wwwm-4pmq vulnerable_version_range = < 2.20.0, first_patched_version = 2.20.0 (matches the bump)

🤖 Generated with Claude Code

Closes Dependabot alert #3 on cmeans/mcp-synology. Pygments < 2.20.0
has an inefficient regex for GUID matching that can be triggered
into ReDoS by crafted input; severity Low.

Pygments is a transitive dev-dep via pytest 9.0.3 (test suite uses
it for syntax-highlighting traceback output). Runtime is unaffected.

Bumped via `uv lock --upgrade-package pygments`. Only uv.lock
changed; no pyproject.toml constraint adjustment needed because
pytest doesn't pin Pygments to an upper bound.

Verification on the bumped lockfile:
- uv run pytest: 554 passed, 100 deselected, 96.13% coverage
- uv run ruff check src/ tests/ scripts/: clean
- uv run mypy src/ scripts/: clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA label May 1, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Ready for QA Dev work complete — QA can begin review and removed Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA labels May 1, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cmeans cmeans added the QA Active QA is actively reviewing; Dev should not push changes label May 1, 2026
@github-actions github-actions Bot removed the Ready for QA Dev work complete — QA can begin review label May 1, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

QA Round 1 — PASS

Tight, well-scoped Pygments security bump. Closes Dependabot alert #3 / GHSA-5239-wwwm-4pmq.

Independent advisory verification

Field Claim Verified via gh api /advisories/GHSA-5239-wwwm-4pmq
Summary "Inefficient regex for GUID matching → ReDoS" Pygments has Regular Expression Denial of Service (ReDoS) due to Inefficient Regex for GUID Matching
Severity Low low
Vulnerable range < 2.20.0 < 2.20.0
First patched 2.20.0 2.20.0
Ecosystem pip / Python pip

Scope check

  • grep -rn pygments src/ scripts/ pyproject.toml returned zero hits — confirms Pygments is NOT used by any production or release-tooling code. The PR's "runtime is unaffected — production never imports Pygments" claim is accurate.
  • uv.lock shows the package landing as a transitive dep under pytest (the { name = "pygments" } line appears in pytest's dependency block). PR's "transitive dev-dep via pytest 9.0.3" claim verified.
  • pyproject.toml doesn't reference Pygments — no constraint adjustment needed, matching the PR's claim.

Diff sanity

File Change
uv.lock Pygments 2.19.2 → 2.20.0; sdist + wheel hashes updated; upload-time on new wheel 2026-03-29T13:29:30Z (published before this scan window). No collateral entries touched.
CHANGELOG.md One new line under ## Unreleased### Fixed. References the advisory, the dependabot alert, the dev-only scope.

Verification

Check Result
uv run pytest 554 passed, 100 deselected, 96.13% coverage on the bumped lockfile
uv run ruff check src/ tests/ scripts/ clean
uv run ruff format --check src/ tests/ scripts/ 72 files already formatted
uv run mypy src/ scripts/ clean (30 files, strict-mode)
Required CI on 84402b59 13/13 green (vdsm completed SUCCESS)

PR-body manual tests 1–6 all checked. (#6 is post-merge — Dependabot alert auto-close monitors uv.lock and matches < 2.20.0, so it should close on merge.)

Verdict

Ready for QA Signoff. Final maintainer call.

@cmeans
Copy link
Copy Markdown
Owner

cmeans commented May 1, 2026

Applying Ready for QA Signoff as the final act of round 1. Pygments 2.19.2 → 2.20.0 to clear GHSA-5239-wwwm-4pmq (Low-severity ReDoS); advisory verified via gh api (vulnerable_version_range < 2.20.0, first_patched_version 2.20.0 — both match). Confirmed pygments is not imported anywhere in src/ or scripts/, and pyproject.toml has no upper bound that needed adjustment. 554/554 pass on bumped lockfile, 96.13% coverage, ruff/mypy clean, 13/13 required CI green. Final maintainer call.

@cmeans cmeans added Ready for QA Signoff QA passed — ready for maintainer final review and merge QA Approved Manual QA testing completed and passed and removed QA Active QA is actively reviewing; Dev should not push changes Ready for QA Signoff QA passed — ready for maintainer final review and merge labels May 1, 2026
@cmeans-claude-dev cmeans-claude-dev Bot merged commit fc0c3e9 into main May 1, 2026
34 checks passed
@cmeans-claude-dev cmeans-claude-dev Bot deleted the fix/pygments-2.20.0-redos branch May 1, 2026 16:39
@cmeans-claude-dev cmeans-claude-dev Bot mentioned this pull request May 1, 2026
5 tasks
cmeans-claude-dev Bot added a commit that referenced this pull request May 2, 2026
## Summary

Cuts v0.5.2, shipping six PRs that landed since v0.5.1 (2026-05-01):

- **#79** mcp-publisher v1.5.0 → v1.7.6 (registry OIDC audience fix)
- **#80** keyring exception handler narrowing (closes #38)
- **#81** bg update-check executor timeout + log (closes #39)
- **#82** pygments 2.19.2 → 2.20.0 (GHSA-5239-wwwm-4pmq, ReDoS)
- **#83** `--revert` version-string validation (closes #40)
- **#85** per-path serial for `move_files` + `copy_files` (closes #84)

## Why now

Two recent bug fixes (#83, #85) are user-visible enough to warrant
shipping, and #84 in particular is a confusing silent-no-op regression
on multi-file moves — getting that to PyPI promptly matters. The four
post-0.5.1 quality fixes (#79#82) are stacked behind it.

This release also exercises **#79's mcp-publisher v1.7.6 pin
end-to-end** so the registry can catch up to current. v0.5.1's registry
entry is missing because #79 landed AFTER the v0.5.1 tag-push, and
`actions/checkout@v6` resolved to the tag's commit on re-runs of the
failed `publish-registry` job — the fix wasn't picked up. The v0.5.2 tag
will pull the correct pin from main.

## State after merge

Bug-labeled issue queue is empty. The structural multi-path-serial fix
family (delete + getinfo + move + copy + restore) is now complete on
real DSM 7.x — every File Station write tool that takes a `paths:
list[str]` issues one DSM task per path, sidestepping the
comma-joined-multipath quirk that #68 and #84 each surfaced.

## Files changed

- `pyproject.toml` — version 0.5.1 → 0.5.2
- `server.json` — auto-synced via `python scripts/sync-server-json.py`
- `uv.lock` — refreshed via `uv lock`
- `CHANGELOG.md` — `## Unreleased` (with the six entries above) renamed
to `## 0.5.2 (2026-05-01)`, fresh empty `## Unreleased` inserted above
it for the next cycle

## Test plan

- [x] CI green on this branch (lint, typecheck, test 3.11/3.12/3.13,
vdsm integration tests, version-sync, validate-server-json)
- [ ] After merge: tag `v0.5.2` push fires `publish.yml`; PyPI publish
succeeds
- [ ] After merge: `publish-registry` job succeeds end-to-end (this is
the validation point for #79's fix — the failure mode in v0.5.1 was
`invalid audience: expected https://registry.modelcontextprotocol.io,
got [mcp-registry]`)
- [ ] After tag: `mcp-synology --check-update` from a v0.5.1 install
reports v0.5.2 available; `uv tool install mcp-synology@latest` upgrades
cleanly
- [ ] Smoke (post-install): two-file `move_files` actually moves both
files (the #84 regression scenario)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: cmeans-claude-dev[bot] <272174644+cmeans-claude-dev[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Approved Manual QA testing completed and passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants