Skip to content

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

Merged
Quim Muntal (qmuntal) merged 1 commit into
mainfrom
alert-autofix-7
Oct 21, 2026
Merged

Quim Muntal (qmuntal) merged 1 commit into
mainfrom
alert-autofix-7

Conversation

@qmuntal

Copy link
Copy Markdown
Member

Potential fix for https://github.com/microsoft/agent-framework-go/security/code-scanning/7

Add an explicit permissions block to the conclusion job in .github/workflows/test.yml.

Best minimal fix without changing behavior:

  • In .github/workflows/test.yml, under jobs.conclusion, add:
    • permissions: {}

Why this is best here:

  • The conclusion job only evaluates prior job results and echoes output; it does not need GitHub token scopes.
  • permissions: {} is the strictest least-privilege setting and matches CodeQL’s minimal starting point for jobs that do not need token access.
  • This limits only the flagged job and avoids unintended impact on other jobs.

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>
@github-actions github-actions Bot added the area:github Changes files in the github area label Oct 20, 2026
@qmuntal
Quim Muntal (qmuntal) marked this pull request as ready for review October 20, 2026 20:04
@qmuntal
Quim Muntal (qmuntal) requested a review from a team as a code owner October 20, 2026 20:04
Copilot AI balanced review requested due to automatic review settings October 20, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrowly scoped change preserves the job’s behavior, with no unresolved findings.

No open issues 🎉

What changed in this PR

Applies least-privilege token permissions to the workflow’s conclusion job without affecting other jobs.

Changes:

  • Adds permissions: {} because the job only checks results and prints output.
File Description
.github/​workflows/​test.yml Removes token permissions from the conclusion job.

Review effort: Balanced

@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit c4d6456 Oct 21, 2026
18 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the alert-autofix-7 branch October 21, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:github Changes files in the github area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants