Skip to content

Borrow the release process from pseudo-service#525

Merged
mmwinther merged 2 commits intomainfrom
chore/dpmeta-1321/improve-release-process
Feb 23, 2026
Merged

Borrow the release process from pseudo-service#525
mmwinther merged 2 commits intomainfrom
chore/dpmeta-1321/improve-release-process

Conversation

@mmwinther
Copy link
Member

No description provided.

@mmwinther mmwinther requested a review from a team as a code owner February 19, 2026 09:31
Comment on lines +10 to +19
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4

# Reads labels from .github/labels.yml
- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5
with:
skip-delete: true No newline at end of file

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 10 days ago

In general, the fix is to add an explicit permissions block that grants only the scopes required for this workflow. The crazy-max/ghaction-github-labeler action manages labels via the GitHub API, which requires write access to repository metadata and read access to repository contents. A minimal, appropriate set is typically contents: read and metadata: read, plus issues: write and pull-requests: write if labels are applied to issues/PRs. However, this particular action updates repository labels configuration, which is controlled via repository administration APIs; GitHub models that as contents: write is sufficient for most repo‑level write operations through GITHUB_TOKEN. To keep the fix conservative and avoid breaking existing behavior while still complying with CodeQL’s requirement, we can safely add at least contents: read and, if we want to keep behavior unchanged for a label‑management workflow, contents: write. Since we are instructed not to change functionality, we should not arbitrarily reduce possible write permissions that may be in use. The cleanest, least invasive fix in the given snippet is to add a permissions block at the job level under labeler: specifying at least contents: read. Given the action’s role (managing labels in the repo), we will set contents: write to avoid any risk of breaking it while still making permissions explicit.

Concretely: edit .github/workflows/labeler.yml and, under labeler: and before runs-on: ubuntu-latest, insert a permissions: section with contents: write. No imports or additional methods are needed; this is purely a YAML configuration change.

Suggested changeset 1
.github/workflows/labeler.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/labeler.yml b/.github/workflows/labeler.yml
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -7,6 +7,8 @@
 
 jobs:
   labeler:
+    permissions:
+      contents: write
     runs-on: ubuntu-latest
     steps:
       - name: Check out the repository
EOF
@@ -7,6 +7,8 @@

jobs:
labeler:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out the repository
Copilot is powered by AI and may make mistakes. Always verify output.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5 Security Hotspots

See analysis details on SonarQube Cloud

Copy link
Contributor

@Jorgen-5 Jorgen-5 left a comment

Choose a reason for hiding this comment

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

Looks good!

@mmwinther mmwinther merged commit 382652d into main Feb 23, 2026
6 of 8 checks passed
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.

2 participants