Skip to content

Conversation

Novaes
Copy link
Collaborator

@Novaes Novaes commented Jul 8, 2025

Potential fix for https://github.com/microsoft/azure-devops-mcp/security/code-scanning/4

To fix the issue, we need to add a permissions block to the workflow. This block should specify the least privileges required for the workflow to function correctly. Based on the operations performed in the workflow, the following permissions are necessary:

  • contents: read for reading repository contents.
  • pull-requests: write for interacting with pull requests.
  • packages: write for updating the package version and pushing tags.

The permissions block can be added at the root level of the workflow to apply to all jobs, or within the specific job (update-version) to limit its scope. In this case, adding it at the root level is more concise and ensures consistency across 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>
Copy link

github-actions bot commented Jul 8, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@Novaes Novaes marked this pull request as ready for review July 8, 2025 17:47
@Novaes Novaes merged commit 94f42b7 into main Jul 8, 2025
8 of 10 checks passed
@danhellem danhellem deleted the users/mnovaes/add-workflow-required-permissions-for-version-update branch August 13, 2025 19:01
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