|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +We take the security of CPython Patch PR Action seriously. This document describes how we |
| 4 | +mitigate risk, how the action interacts with GitHub infrastructure, and how to report |
| 5 | +vulnerabilities responsibly. |
| 6 | + |
| 7 | +## Supported versions |
| 8 | + |
| 9 | +Only the latest released version (the `v0` tag during the pre-1.0 cycle) receives |
| 10 | +security updates. Please upgrade to the newest minor release before opening security |
| 11 | +reports. |
| 12 | + |
| 13 | +## Required permissions |
| 14 | + |
| 15 | +The action needs the following GitHub token permissions: |
| 16 | + |
| 17 | +- `contents: write` – push branches with updated CPython versions. |
| 18 | +- `pull-requests: write` – create or update pull requests. |
| 19 | + |
| 20 | +We recommend restricting the workflow token to the minimal scopes above. If you |
| 21 | +run the action in dry-run mode, you can downgrade permissions to `read` until you |
| 22 | +are ready to publish PRs. |
| 23 | + |
| 24 | +## Network endpoints |
| 25 | + |
| 26 | +External network access is limited to: |
| 27 | + |
| 28 | +- `api.github.com` – fetch CPython tags and create/update pull requests. |
| 29 | +- `raw.githubusercontent.com/actions/python-versions` – retrieve runner manifests. |
| 30 | +- `www.python.org` – fallback source to confirm released patch versions. |
| 31 | + |
| 32 | +No telemetry or analytics endpoints are used. If you need to run the action in a |
| 33 | +restricted environment, consider mirroring the above endpoints and pointing the |
| 34 | +workflow to your mirrors. |
| 35 | + |
| 36 | +## Handling secrets |
| 37 | + |
| 38 | +The action uses the workflow token (`GITHUB_TOKEN`) to push branches and open |
| 39 | +pull requests. Do not pass personal access tokens unless you need to target |
| 40 | +private forks or cross-organization repositories. |
| 41 | + |
| 42 | +## Incident response |
| 43 | + |
| 44 | +If we confirm a critical vulnerability, we will: |
| 45 | + |
| 46 | +1. Publish a fixed release and update the `v0` tag. |
| 47 | +2. Document the risk, affected versions, and mitigation steps in the changelog. |
| 48 | +3. Notify followers through the repository Security Advisory system when available. |
| 49 | + |
| 50 | +Thank you for helping keep the CPython ecosystem secure. |
0 commit comments