Skip to content

Conversation

@leMaur
Copy link
Owner

@leMaur leMaur commented Jul 18, 2025

Potential fix for https://github.com/leMaur/php-url-checker/security/code-scanning/2

To fix the issue, we need to add a permissions block to the workflow for limiting the permissions of the GITHUB_TOKEN. The minimal permissions required for this workflow are contents: read, as the workflow only needs to access repository files for the tasks like code checkout and running PHPStan.

The fix involves:

  1. Adding a permissions block at the root of the workflow configuration file (.github/workflows/phpstan.yml) to apply consistent permissions across all jobs in the workflow. This ensures the principle of least privilege is adhered to.

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>
@leMaur leMaur marked this pull request as ready for review July 18, 2025 06:13
@leMaur leMaur merged commit be496b7 into main Jul 18, 2025
3 checks passed
@leMaur leMaur deleted the alert-autofix-2 branch July 18, 2025 06:14
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