release: 4.4.0#2669
Conversation
| runs-on: 'ubuntu-latest' | ||
| name: detect-breaking-changes | ||
| if: github.repository == 'cloudflare/cloudflare-python' | ||
| steps: | ||
| - name: Calculate fetch-depth | ||
| run: | | ||
| echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| # Ensure we can check out the pull request base in the script below. | ||
| fetch-depth: ${{ env.FETCH_DEPTH }} | ||
|
|
||
| - name: Install Rye | ||
| run: | | ||
| curl -sSf https://rye.astral.sh/get | bash | ||
| echo "$HOME/.rye/shims" >> $GITHUB_PATH | ||
| env: | ||
| RYE_VERSION: '0.44.0' | ||
| RYE_INSTALL_OPTION: '--yes' | ||
| - name: Install dependencies | ||
| run: | | ||
| rye sync --all-features | ||
| - name: Detect removed symbols | ||
| run: | | ||
| rye run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}" | ||
|
|
||
| - name: Detect breaking changes | ||
| run: | | ||
| # Try to check out previous versions of the breaking change detection script. This ensures that | ||
| # we still detect breaking changes when entire files and their tests are removed. | ||
| git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true | ||
| ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 months ago
The problem can be fixed by explicitly restricting the GITHUB_TOKEN permissions in the workflow to the minimal necessary for the job. Since the shown steps only check out code, run scripts, and do not push changes or interact with issues/PRs, the least-privilege setting is contents: read. This can be set at the workflow root level (above the jobs: block) so it applies to all jobs within the workflow.
Edit the workflow file .github/workflows/detect-breaking-changes.yml by adding:
permissions:
contents: readdirectly after the name: (and before on:), or after on: (before jobs:), to ensure minimal permissions.
| @@ -5,6 +5,9 @@ | ||
| - main | ||
| - next | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| detect_breaking_changes: | ||
| runs-on: 'ubuntu-latest' |
Automated Release PR
4.4.0 (2025-08-22)
Full Changelog: v4.3.1...v4.4.0
Features
Bug Fixes
Chores
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions