Skip to content

Add permissions to workflow files to resolve security warnings#118

Merged
mazong1123 merged 1 commit intomainfrom
fix/workflow-permissions
Mar 15, 2026
Merged

Add permissions to workflow files to resolve security warnings#118
mazong1123 merged 1 commit intomainfrom
fix/workflow-permissions

Conversation

@mazong1123
Copy link
Collaborator

Summary

Adds explicit \permissions: contents: read\ to 4 workflow files that were flagged by code scanning (alerts #1, #3, #4, #9).

This follows the principle of least privilege — workflows only get the permissions they need, preventing potential token misuse if a dependency is compromised.

Files changed

  • .github/workflows/ci.yml\
  • .github/workflows/doc.yml\
  • .github/workflows/coverage.yml\
  • .github/workflows/ci-coverage.yml\

Resolves code scanning alerts: #1, #3, #4, #9

Add explicit 'permissions: contents: read' to ci.yml, doc.yml,
coverage.yml, and ci-coverage.yml to follow the principle of least
privilege and resolve code scanning alerts.
@mazong1123 mazong1123 merged commit bfb4b69 into main Mar 15, 2026
17 checks passed
@mazong1123 mazong1123 deleted the fix/workflow-permissions branch March 15, 2026 22:16
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