Skip to content

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

Merged
fedorov merged 1 commit into
mainfrom
alert-autofix-1
Aug 19, 2026
Merged

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

Conversation

@fedorov

@fedorov fedorov commented Aug 19, 2026

Copy link
Copy Markdown
Member

Potential fix for https://github.com/ImagingDataCommons/IDC-REST-MCP/security/code-scanning/1

Add an explicit permissions block in .github/workflows/ci.yml at the workflow root (top level), so it applies to all jobs unless overridden.
For this workflow, the least-privilege baseline is:

  • contents: read

This is sufficient for actions/checkout and typical read-only CI tasks. No functional behavior change is expected.

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>
@fedorov
fedorov marked this pull request as ready for review August 19, 2026 16:02
Copilot AI lite review requested due to automatic review settings August 19, 2026 16:02
@fedorov
fedorov merged commit 6367adb into main Aug 19, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an explicit top-level GitHub Actions permissions block to the CI workflow to satisfy the code scanning alert about missing workflow permissions and to enforce least-privilege defaults across all jobs.

Changes:

  • Define workflow-wide default token permissions.
  • Set contents: read as the baseline permission for CI runs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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