Skip to content

security: Restrict release workflow to upstream repository#219

Merged
williajm merged 3 commits into
mainfrom
security/release-repo-guard
Apr 14, 2026
Merged

security: Restrict release workflow to upstream repository#219
williajm merged 3 commits into
mainfrom
security/release-repo-guard

Conversation

@williajm
Copy link
Copy Markdown
Owner

Summary

  • Adds if: github.repository == 'williajm/mcp_docker' to both jobs in release.yml
  • Prevents forks from accidentally triggering the release workflow

Context

Per Matthias Kestenholz's PyPI trusted publishing writeup, the repository guard is a belt-and-suspenders complement to the trusted-publisher binding and the pypi environment's branch/tag deployment policy (already in place).

Applying the same change to mcp_kafka and forgery in separate PRs for consistency.

Test plan

  • CI passes (release workflow only runs on tag push / release published, so no CI smoke test here)
  • Next release (when it happens) still deploys successfully via the existing pypi environment review

🤖 Generated with Claude Code

Add `if: github.repository == 'williajm/mcp_docker'` guards to the
build-and-sign and publish-pypi jobs. Prevents forks from accidentally
executing the release workflow (belt-and-suspenders with the PyPI
trusted-publisher binding and the environment's branch/tag policy).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2026

🧪 Test Results for 70bb70f

Summary

All tests passed!

Test Suite Status Passed Failed Skipped Duration
Unit Tests - Python 3.13 966 0 0 14s
Unit Tests - Python 3.12 966 0 0 12s
Unit Tests - Python 3.11 966 0 0 13s
Unit Tests - Python 3.14 966 0 0 14s
E2E 29 0 0 39s
Integration 5 0 0 0s

| Total | ✅ | 3898 | 0 | 0 | - |

📊 Coverage

Coverage reports are available in the workflow artifacts.

📦 Download Reports

📊 View Full Report |
📝 All Checks

Fixes CVE-2026-39892 (cryptography buffer overflow in Hash.update on
non-contiguous Python buffers) and CVE-2025-71176 (pytest /tmp dir
permissions allow local DoS / privilege escalation).

Lockfile regenerated with `uv lock --exclude-newer` (3-day buffer).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@williajm
Copy link
Copy Markdown
Owner Author

Bundled dep bumps: cryptography 46.0.6 → 46.0.7 (CVE-2026-39892) and pytest 9.0.2 → 9.0.3 (CVE-2025-71176). These were failing pip-audit in CI — fix included here so the PR is mergeable.

The previous commit locked with `--exclude-newer` which baked an
[options] exclude-newer entry into uv.lock. CI does not set
UV_EXCLUDE_NEWER, so it re-resolved and `--locked` failed consistency
checks. Regenerate without the flag to match main's lockfile style;
hash-pinned lockfile still provides supply-chain integrity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@williajm williajm merged commit 04a4b30 into main Apr 14, 2026
28 checks passed
@williajm williajm deleted the security/release-repo-guard branch April 14, 2026 20:17
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