Skip to content

Conversation

@mykaul
Copy link
Contributor

@mykaul mykaul commented Dec 24, 2025

Potential fix for https://github.com/scylladb/scylla-operator/security/code-scanning/1

In general, the fix is to explicitly declare permissions for the GITHUB_TOKEN in the workflow, rather than relying on repository/organization defaults. This is done by adding a permissions: block either at the top workflow level (so it applies to all jobs without their own permissions) or within the specific job. The least-privilege baseline recommended by the alert is contents: read, which is sufficient for checking out code and many read-only operations.

For this workflow, the simplest and least intrusive change is to add a top-level permissions: block just after the on: section (before env:). This will apply to the single release-notes job and any future jobs unless they override it. We will set:

permissions:
  contents: read

No imports or additional methods are needed—this is purely a YAML configuration change within .github/workflows/releases.yaml. Functionality should remain unchanged for operations that only need read access to repository contents; if the custom release-notes action requires more, those can be added later, but that is outside the scope of the current static-analysis fix.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…t no. 1: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@scylla-operator-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@scylla-operator-bot scylla-operator-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 24, 2025
@scylla-operator-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mykaul
Once this PR has been reviewed and has the lgtm label, please assign rzetelskik for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mykaul mykaul changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions .github/workflows/releases.yaml: Potential fix for code scanning alert no. 1: Workflow does not contain permissions Dec 24, 2025
@scylla-operator-bot
Copy link
Contributor

Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

  • 386c43c .github/workflows/releases.yaml: Potential fix for code scanning alert no. 1: Workflow does not contain permissions
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@mykaul mykaul marked this pull request as ready for review December 24, 2025 12:28
@scylla-operator-bot scylla-operator-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 24, 2025
@scylla-operator-bot
Copy link
Contributor

@mykaul: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-docs 386c43c link true /test verify-docs

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@scylla-operator-bot
Copy link
Contributor

The Scylla Operator project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 30d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out

/lifecycle stale

@scylla-operator-bot scylla-operator-bot bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant