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/3

To fix the issue, add a permissions block to the workflow to explicitly define the minimum required permissions for each job. Since the jobs in this workflow only need to read repository contents and do not perform write operations, the contents: read permission is sufficient. This change ensures that the GITHUB_TOKEN has limited access, reducing the risk of unintended repository modifications.

The permissions block can be added at the root level of the workflow to apply to all jobs or within each job to define permissions specific to that job. In this case, adding it at the root level is more concise and effective.


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:46
@Novaes Novaes merged commit 64480dd into main Jul 8, 2025
8 of 10 checks passed
@danhellem danhellem deleted the users/mnovaes/add-permissions-to-build 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