Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signing things #332

Open
jenstroeger opened this issue Sep 23, 2022 · 2 comments
Open

Signing things #332

jenstroeger opened this issue Sep 23, 2022 · 2 comments
Labels
github_actions Pull requests that update Github_actions code security Security related features or bugs SLSA Relating Supply-chain Levels for Software Artifacts (SLSA)

Comments

@jenstroeger
Copy link
Owner

jenstroeger commented Sep 23, 2022

Git allows for signing commits and tags, see also the Signing Your Work chapter. Furthermore, twine upload allows for signing packages when uploading them to a PyPI server.

Related to PR #306 and issue commitizen-tools/commitizen#575, I wanted to keep the discussion going on signing and verifying signatures in an automated workflow. Signing commits and tags not only generated by a local user (who needs to sign commits locally) but also generated by the release.yaml Action

- name: Create changelog and bump
run: cz bump --changelog --yes
- name: Push the release
run: |
git push
git push --tags

and

# - name: Publish to PyPI server
# run: |
# export TWINE_USERNAME=<USERNAME>
# export TWINE_PASSWORD=<PASSWORD>
# export TWINE_REPOSITORY_URL=<REPOSITORY_URL>
# twine upload --verbose dist/*.tar.gz dist/*.whl

Read the linked issue for more information, and take a look at the How to use GPG key in github actions? Also related is issue actions/runner#667.

@jenstroeger jenstroeger added security Security related features or bugs SLSA Relating Supply-chain Levels for Software Artifacts (SLSA) github_actions Pull requests that update Github_actions code labels Sep 23, 2022
@jenstroeger
Copy link
Owner Author

See also secure-python-package-template.

@jenstroeger
Copy link
Owner Author

There’s also discussion on signing packages, although PyPI doesn’t seem to have great support for that. See also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code security Security related features or bugs SLSA Relating Supply-chain Levels for Software Artifacts (SLSA)
Projects
None yet
Development

No branches or pull requests

1 participant