Skip to content

fix(dependency-audit): pin pip-audit Python to 3.13 instead of floating 3.x - #1431

Merged
donpetry-bot merged 3 commits into
mainfrom
claude/pin-python-dependency-audit-e7621b
Oct 31, 2026
Merged

donpetry-bot merged 3 commits into
mainfrom
claude/pin-python-dependency-audit-e7621b

Conversation

@don-petry

@don-petry don-petry commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

dependency-audit-reusable.yml set up Python with python-version: "3.x", which now resolves to 3.15. 3.15 removed sre_constants; pip-api==0.0.34 (pinned in this repo's own hash-locked scripts/pip-audit-requirements.txt, and in some consumer repos) ships a vendored pyparsing that imports it, so pip-audit crashes:

ModuleNotFoundError: No module named 'sre_constants'

Seen on main in combsmith/broodminder-data, probably in combsmith/empower-personal-dashboard too (not verified).

Change

  • New workflow_call input python-version, default "3.13". It follows the pattern of agentshield-version in agent-shield-reusable.yml, so a caller can override it. The single setup-python step (audit-pip) now uses it.
  • Header comment records the pin next to the other pinned tool versions.
  • New bats test in test/workflows/dependency-audit/: the input default must be a concrete 3.N, and every setup-python step must use the input. I checked that the test fails against the old "3.x".
  • Checked that all 26 hash-locked wheels in scripts/pip-audit-requirements.txt resolve for cp313 / manylinux x86_64 with --only-binary :all: --require-hashes.

Rollout

This reaches callers only after the dependency-audit channel is promoted (standards/workflows/dependency-audit.yml pins @dependency-audit/v2-stable; latest release is dependency-audit/v2.9.0). No tags were moved here.

Other floating-Python spots (out of scope, not changed)

  • standards/ci-standards.md §"Python" CI example uses python-version: '3.x'. It's a generic per-repo CI template, not audit tooling. It has no consumers right now ("Repos using this pattern: none").
  • standards/workflows/copilot-setup-steps.yml only has a commented-out example that's already pinned ("3.12"). Fine as is.
  • Related: scripts/pip-audit-requirements.txt still pins pip-api==0.0.34. With Python pinned it's harmless, but bumping to 0.0.35 (as fix(deps): bump pip-api to 0.0.35 so pip-audit runs on Python 3.15 broodminder-data#236 does) would remove the 3.15 incompatibility itself. Left for a separate PR to keep this diff small.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

…ng 3.x

setup-python "3.x" now resolves to 3.15, which removed sre_constants. The
hash-locked tooling pins pip-api 0.0.34, whose vendored pyparsing imports it,
so pip-audit crashes for every caller. Pin a concrete minor via a new
`python-version` input (default "3.13", same pattern as agent-shield's
`agentshield-version`) and add a bats test that rejects a floating version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry don-petry added the dev-lead:hands-off Opt an item out of the dev-lead persona automation entirely label Oct 30, 2026
@don-petry
don-petry requested a review from a team as a code owner October 30, 2026 02:40
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-30T02:40:09.147359Z
We couldn’t complete this review. Comment @codex review to try again.
c53b418 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4b9c03ac-2cab-4d68-b8ed-15a0f61789a5
Commits

Reviewing files that changed from the base of the PR and between 9bd9ea7 and f29ab7f.

Files selected for processing: 2
  • .github/workflows/dependency-audit-reusable.yml
  • test/workflows/dependency-audit/dependency-audit.bats
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@don-petry

Copy link
Copy Markdown
Contributor Author

dev-lead is withholding action on this item.

It is labeled dev-lead:hands-off (deliberately kept off-limits to dev-lead (e.g. changes to the dev-lead automation itself)), so dev-lead will not pick it up while that label is present. This notice is posted once so the withhold is visible rather than looking like a stalled run.

To re-enable automated pickup: remove the dev-lead:hands-off label.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-30T03:41:41Z.

@sonarqubecloud

Copy link
Copy Markdown

@donpetry-bot
donpetry-bot merged commit ab78d64 into main Oct 31, 2026
39 checks passed
@donpetry-bot
donpetry-bot deleted the claude/pin-python-dependency-audit-e7621b branch October 31, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-lead:hands-off Opt an item out of the dev-lead persona automation entirely

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants