Skip to content

Conversation

@eypsilon
Copy link
Contributor

Potential fix for https://github.com/yaijs/php-ymap/security/code-scanning/1

To fix the problem, explicitly define a permissions block in the workflow that grants the minimal required privilege. In this workflow, none of the job steps require write access; they only read from the repository. Therefore, the most restrictive and appropriate setting is contents: read. This block can be added at the top-level of the workflow (applies to all jobs), or on individual jobs. The simplest and most maintainable fix is to add the following at the top level of .github/workflows/main.yml (just below the name: but before or after on:):

permissions:
  contents: read

This restricts the GITHUB_TOKEN permissions for all jobs by default.


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>
@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
php-ymap Ready Ready Preview Dec 10, 2025 3:49am

@eypsilon eypsilon marked this pull request as ready for review December 10, 2025 03:50
@eypsilon eypsilon closed this Dec 10, 2025
@eypsilon eypsilon deleted the alert-autofix-1 branch December 10, 2025 13:18
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