You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY] Publish to PyPI from a tag with Trusted Publishing instead of manual token uploads #210
Releases are published to PyPI by hand with a long-lived API token (twine upload from a laptop). This has gone wrong repeatedly (TestPyPI vs PyPI tokens, scope errors), and the token is a supply-chain risk: anyone who gets it can publish devops-ai-agent. Nothing checks that the uploaded files match a reviewed commit.
Proposed fix
Add .github/workflows/release.yml, triggered on pushed v* tags:
check that the tag equals project.version in pyproject.toml,
run the test suite,
python -m build + twine check,
publish with PyPI Trusted Publishing (OIDC, pypa/gh-action-pypi-publish, id-token: write, a protected pypi environment that needs maintainer approval). No token is stored anywhere.
create a GitHub Release with generated notes and attach the sdist and wheel, plus build provenance (actions/attest-build-provenance).
Configure the trusted publisher on pypi.org (owner open-devops-agent, repo open-devops-agent, workflow release.yml, environment pypi), then revoke the old API tokens.
Document the release steps in CONTRIBUTING.md: bump the version in a PR, merge, git tag vX.Y.Z && git push --tags.
Files
New .github/workflows/release.yml, CONTRIBUTING.md, docs/BUILD_AND_USAGE.md
Activity