Skip to content

Conversation

@lcian
Copy link
Member

@lcian lcian commented Aug 21, 2025

No description provided.

Copy link
Contributor

@giortzisg giortzisg left a comment

Choose a reason for hiding this comment

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

:shipit:

Comment on lines +13 to +32
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- name: Prepare release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 3 months ago

To fix the problem, we should add a permissions block to the workflow. The best way is to add it at the top level (just below the name: and before on:), so it applies to all jobs unless overridden. The minimal starting point is contents: read, but since the workflow checks out code and prepares releases (which may involve creating tags, releases, or modifying pull requests), we should ensure the permissions are sufficient for these actions. However, unless the workflow specifically needs to write to contents or pull requests, starting with contents: read is safest. If errors occur due to insufficient permissions, the block can be expanded. For now, add:

permissions:
  contents: read

directly after the name: line in .github/workflows/release.yml.

Suggested changeset 1
.github/workflows/release.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: Prepare Release
 on:
   workflow_dispatch:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: Prepare Release
on:
workflow_dispatch:
Copilot is powered by AI and may make mistakes. Always verify output.
- name: registry
type: sdk
config:
canonical: 'github:getsentry/sentry-zig'
Copy link

Choose a reason for hiding this comment

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

Bug: Registry Reference Mismatch Causes Tooling Issues

The canonical registry reference points to sentry-zig, but the github configuration specifies sentry-go. This inconsistency could cause release tooling to interact with or publish to the wrong repository.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants