Skip to content

ci(python): harden uv supply chain checks#247

Draft
EfeDurmaz16 wants to merge 2 commits into
split/pr216-ci-harness-megafrom
ci/python-supply-chain-audit
Draft

ci(python): harden uv supply chain checks#247
EfeDurmaz16 wants to merge 2 commits into
split/pr216-ci-harness-megafrom
ci/python-supply-chain-audit

Conversation

@EfeDurmaz16

@EfeDurmaz16 EfeDurmaz16 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

This is a small Python CI supply-chain hardening follow-up targeting split/pr216-ci-harness-mega (#219).

  • Enable UV_MALWARE_CHECK=1 with explicit audit-command,malware-check preview opt-in for Python test, harness, and PyPI publish jobs.
  • Pin every astral-sh/setup-uv runtime used by these workflows to 0.11.26.
  • Add blocking uv audit --frozen checks to the Python test, standalone harness, and privileged publish paths.
  • Update the lockfile for the audited Django, pydantic-settings, Starlette, and Black advisories.
  • Pin the publish build backend and release tools in the lockfile, build without isolation, and run Twine from the frozen environment instead of floating uvx twine.
  • Add a structural guard with negative fixtures for runtime pins, job-level malware policy, frozen syncs, and unconditional audits.
  • Route changes to the guard through the Python workflow selector.

The Black override is narrowly required because docspec-python 2.2.1 still declares a stale Black <24 constraint. The docs command is run from the frozen environment to exercise that compatibility path.

Verification

  • uv lock --check
  • uv audit --frozen: no known vulnerabilities or adverse project statuses in 120 audited packages
  • Malware-gated frozen syncs for dev, framework, and release environments
  • Python: 1308 passed, 1 skipped, 91.73% coverage
  • Ruff, Pyright, frozen docs smoke, release build, and strict Twine check
  • Workflow YAML parsing, selector tests, repo hygiene, publish guard, and Python supply-chain guard negative fixtures

CI dependency

The full shared matrix currently inherits the known conformance_runner failure on #219. That runner belongs to the Rust delivery in #227 and is intentionally not duplicated in this Python CI PR. The exact-head matrix should be rerun after that base fix lands.

This PR is intentionally based on #219 and does not change payment protocol behavior.

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