Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions - #8

Merged
kunchenguid merged 1 commit into
mainfrom
alert-autofix-2
Dec 12, 2025
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#8
kunchenguid merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@kunchenguid

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/atlassian-labs/rovo-dev-action/security/code-scanning/2

General approach:
To fix this issue, explicitly declare the permissions key at the workflow root. This will apply to all jobs that do not set their own permissions. According to the shown jobs, only reading repository content is needed (the workflow just checks out code and inspects files — it doesn't interact with PRs/issues or perform any pushes/changes).

Implementation:

  • Add a permissions: block after the name and before or after the on: key in the workflow (.github/workflows/ci.yml).
  • Set at minimum:
    permissions:
      contents: read
  • No import or code modification is needed beyond this YAML file change.

Specific lines to change:

  • Insert the permissions: block at line 2, after name: CI. No other changes are required.

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

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@kunchenguid
kunchenguid marked this pull request as ready for review December 12, 2025 19:03
@kunchenguid
kunchenguid merged commit db07e09 into main Dec 12, 2025
4 checks passed
@kunchenguid
kunchenguid deleted the alert-autofix-2 branch December 12, 2025 19:04
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.

1 participant