Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ jobs:
terraform: ./**/terraform/**
nix: ./**/nix/**

python-sigstore:
needs: [detect-changes]
if: contains(fromJSON(needs.detect-changes.outputs.features), 'python')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: "Test Python Sigstore verification"
run: bash test/python/sigstore_verification_test.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this require a separate runner and a job to test this? Couldn’t it be part of the test scenarios for python feature?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I had updated just the scenarios only but copilot had specifically asked it was not sufficient.

In case of a tampered or wrong-signer Sigstore bundle. In this case cosign must reject the Python tarball and the install must not treat it as verified.

A scenario test can't check this. It installs from the real python.org files, and those always carry a valid signature from the right signer. The scenario can't swap in a bad .sigstore bundle or a different signer identity. So it only proves verification passes when everything is genuine. It can't prove verification fails when the signature is wrong, and catching a wrong signature is the point of this fix.


test:
needs: [detect-changes]
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions src/python/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ This Feature should work on recent versions of Debian/Ubuntu, RedHat Enterprise
## Additional Python versions

`additionalVersions` accepts a comma-separated list. Comma splitting is scoped to reading this list so package-manager commands keep normal shell word splitting during each installation.

## Source Verification

The feature verifies the authenticity and integrity of downloaded Python source archives. Python 3.14 and later use Sigstore (via Cosign) instead of GPG. For Python 3.14 and later, verification follows a fail-open policy: unsuccessful or unavailable verification is reported as a warning and does not block installation.
2 changes: 1 addition & 1 deletion src/python/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "python",
"version": "1.8.1",
"version": "1.9.0",
Comment thread
V-Subhankar-infy marked this conversation as resolved.
Resolved
"name": "Python",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
Expand Down
Loading
Loading