Skip to content

chore(ci): add dependency audit and Dependabot - #176

Open
jeffdupont wants to merge 6 commits into
mainfrom
chore/ci-dependency-audit-dependabot
Open

jeffdupont wants to merge 6 commits into
mainfrom
chore/ci-dependency-audit-dependabot

Conversation

@jeffdupont

@jeffdupont jeffdupont commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Dependency audit in CI: new make audit target that runs pip-audit (pinned 2.9.0) over uv export --frozen of the committed uv.lock, and a Dependency audit CI job that runs it. It audits the lock as committed (no uv lock first), so a vulnerable pin fails the job.
  • Dependabot: .github/dependabot.yml with uv daily at the workspace root and github-actions weekly, both with a 7-day cooldown — same shape as go-ai-sdk (go-ai-sdk#3).
  • Lockfile upgrades so the new job passes. No pyproject.toml ranges changed:
Package Was Now
anyio 4.14.1 4.15.1
langgraph-sdk 0.4.2 0.4.7
mcp 1.28.1 1.30.0
pyjwt 2.13.0 2.15.1
urllib3 2.7.0 2.8.0
virtualenv 21.5.1 21.14.7

These cover all 25 open Dependabot alerts on main (2 critical, 12 high, 11 moderate), plus one mcp advisory (GHSA-84m7-p3x7-pcfv) that pip-audit reports and GitHub doesn't.

Verified locally

  • make audit → No known vulnerabilities found
  • Control: pip-audit on pyjwt==2.13.0 exits 1 with 14 advisories, so the job fails on a vulnerable pin
  • uv lock --check, ruff check, ruff format --check, mypy packages/*/src clean; pytest 2536 passed, 14 skipped

Not verified: the CI run itself (this PR's checks will show it).

🤖 Generated with Claude Code


Note

Overview
Adds automated dependency security: a make audit target runs pinned pip-audit over a frozen uv export of the committed lockfile, and CI runs it in a new Dependency audit job (non-blocking on PRs, failing on push/schedule). CI also gets a weekly Monday cron so advisories against an unchanged uv.lock still surface.

Introduces Dependabot for daily uv lock updates at the repo root and weekly GitHub Actions bumps (7-day cooldown on both).

Lockfile refresh (no pyproject range edits) bumps packages including claude-agent-sdk (0.2.121 → 0.2.173), OpenTelemetry 1.43 → 1.45.x, brotlicffi, and virtualenv, so audit passes.

Follow-on code/test tweaks: Claude Agents handler documents and excludes new ClaudeAgentOptions keys from config forwarding (verbatim_prompts, session resume fields, forward_subagent_text) to stay aligned with the upgraded SDK. The lifecycle test for failed telemetry setup now patches _setup_telemetry to raise instead of using a malformed OTEL_EXPORTER_OTLP_TIMEOUT, because OTel 1.45 no longer fails on that input.

Reviewed by Cursor Bugbot for commit ce4c397. Bugbot is set up for automated code reviews on this repo. Configure here.

- Add `make audit` (pip-audit 2.9.0 over `uv export` of the committed
  uv.lock) and a CI job that runs it.
- Add dependabot.yml: uv daily at the workspace root, github-actions weekly,
  7-day cooldown, matching go-ai-sdk.
- Upgrade the locked versions that pip-audit flagged (26 advisories):
  anyio 4.15.1, langgraph-sdk 0.4.7, mcp 1.30.0, pyjwt 2.15.1,
  urllib3 2.8.0, virtualenv 21.14.7. No pyproject ranges changed.

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

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bcc3de1. Configure here.

Comment thread Makefile Outdated
jeffdupont and others added 2 commits October 20, 2026 15:36
make runs /bin/sh, which has no pipefail, so piping uv export into
pip-audit took pip-audit's exit code: a failed export audited an empty
list and passed. Export to a temp file and chain the steps instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
directory '/' covers .github/workflows only, so astral-sh/setup-uv in the
ci composite action never got update PRs. List .github/actions/* as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont
jeffdupont force-pushed the chore/ci-dependency-audit-dependabot branch from 91c6752 to cac7f68 Compare October 20, 2026 22:36
jeffdupont and others added 3 commits October 23, 2026 12:15
…udit-dependabot

uv.lock is taken from main and regenerated, not hand-merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv lock -P for brotlicffi, claude-agent-sdk, virtualenv and the
OpenTelemetry packages. make audit now reports no known vulnerabilities.

claude-agent-sdk 0.2.173 adds four ClaudeAgentOptions fields. None is a
model or run setting, so all four go on the excluded list:
resume_session_at and resume_drops_turn are session state,
forward_subagent_text is stream shape, and verbatim_prompts decides
whether prompt text can make Claude Code read host files.

OpenTelemetry 1.45 logs a malformed OTEL_EXPORTER_OTLP_TIMEOUT and uses
its default instead of raising, so the lifecycle test that relied on
that now injects the telemetry failure directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A newly published advisory fails every open PR at once, none of which
caused it. On pull_request the audit job now reports without failing
the run; on push to main and on the new weekly schedule it still fails.

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

Copy link
Copy Markdown
Contributor Author

Pushed three commits:

  • a52a220 merges origin/main. uv.lock was taken from main and regenerated, not hand-merged. The Makefile .PHONY line keeps both api-report targets and audit.
  • 2210f7b runs uv lock -P for brotlicffi, claude-agent-sdk, virtualenv and the OpenTelemetry packages. make audit now reports no known vulnerabilities. Two fixes the upgrade needed:
    • claude-agent-sdk 0.2.173 adds four ClaudeAgentOptions fields. All four go on the excluded list: resume_session_at and resume_drops_turn (session state), forward_subagent_text (stream shape), verbatim_prompts (whether prompt text can make Claude Code read host files).
    • OpenTelemetry 1.45 no longer raises on a malformed OTEL_EXPORTER_OTLP_TIMEOUT, so test_a_failed_telemetry_setup_leaves_no_client_behind now injects the failure itself.
  • ce4c397 makes the audit job continue-on-error on pull_request only, and adds a weekly schedule (Mondays 13:00 UTC).

Needs a human reviewer.

🤖 Generated with Claude Code

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