Skip to content

chore(security): upgrade pypdf past 21 advisories, SDK 2.x, Dependabot - #17

Merged
erxxc merged 1 commit into
mainfrom
chore/security-audit-2026-10
Oct 22, 2026
Merged

erxxc merged 1 commit into
mainfrom
chore/security-audit-2026-10

Conversation

@erxxc

@erxxc erxxc commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Security audit 2026-10-22

Fixes

  • pypdf 6.14.2 → 6.21.2: closes 21 open advisories (PYSEC-2026-3655..4160, CVE-2026-113786..113795). pip-audit on the lock is now clean.
  • anthropic 0.117 → 2.1.0, pydantic 2.14.1, typer 0.27.3 (full uv lock --upgrade).
  • Removed httpx and pyyaml from pyproject.toml: declared, never imported in src/ or tests/.
  • Added .github/dependabot.yml (uv lock + GitHub Actions, weekly, grouped).

Fixture change, explained
The new pypdf extracts the TSMC N2 fixture's typographic apostrophe as U+2019 where the old one emitted '. The recorded model quote therefore stopped grounding. The golden was re-recorded live per the README procedure; the only semantic diff in expected.json is that apostrophe. test_validate.py's inlined proposal is updated to match.

Verification

  • uv run pytest -m "not live": 245 passed
  • uv run pytest --run-live: 248 passed, 1 skipped (same pre-existing unconditional skip)
  • pip-audit -r <uv export>: no known vulnerabilities

Repo settings enabled out of band (were all disabled on a public repo): Dependabot alerts, Dependabot security updates, secret scanning, secret-scanning push protection.

Reviewed clean (appsec agent, read-only): only store/ imports sqlite3 and every query is parameterized; no path traversal (paths key on sha256 only); HTTPS enforced at every redirect hop with streamed size cap and timeouts; no pickle/yaml.load/eval/subprocess; API key read only by the SDK from env; all DB-derived display routes through _ansi_safe; CI has contents: read and SHA-pinned actions. gitleaks over all 96 commits: no leaks.

Open (not changed here)

  • LOW: no page-count or text-length cap before PDF text goes to the model (extract/pdf.py, extract/base.py); ingest-file has no local size cap at all. Defense in depth for the next pypdf CVE. Needs a reject-vs-truncate decision at the extraction boundary, so left for a gate.
  • Branch protection requires 0 approving reviews and does not enforce on admins.

🤖 Generated with Claude Code

…dd Dependabot

Security audit 2026-10-22. pip-audit against uv.lock flagged pypdf 6.14.2
with 21 open advisories (PYSEC-2026-3655..4160, CVE-2026-113786..113795),
all fixed by 6.21.1. `uv lock --upgrade` brings every pin current:
pypdf 6.21.2, anthropic 0.117 -> 2.1.0, pydantic 2.14.1, typer 0.27.3.
pip-audit is now clean.

The pypdf bump changes text extraction: the typographic apostrophe in the
TSMC N2 fixture now extracts as U+2019 instead of ASCII "'", so the
recorded model quote no longer grounded. Per the documented procedure the
golden was re-recorded live (`--run-live --record`); the only semantic
change in expected.json is that apostrophe. The inlined copy of the
proposal in test_validate.py is updated to match.

anthropic 2.x: our usage (Anthropic(), messages.create, content blocks,
stop_reason) crosses none of the 1.x/2.x breaking areas; the full live
suite (248 passed, 1 skipped) proves it. httpx and pyyaml were declared
but never imported anywhere in src/ or tests/ — removed to shrink the
supply-chain surface.

.github/dependabot.yml watches the uv lock and pinned actions weekly so
the next advisory does not sit for seven minor versions.

Repo settings changed out of band (not in this diff): Dependabot alerts,
Dependabot security updates, secret scanning, and push protection are
now enabled on the public repo (all were disabled).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@erxxc
erxxc merged commit bc5c76b into main Oct 22, 2026
1 check passed
@erxxc
erxxc deleted the chore/security-audit-2026-10 branch October 22, 2026 12:31
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.

1 participant