Skip to content

Potential fix for code scanning alert no. 17593: Workflow does not contain permissions - #620

Merged
totoprayogo1916 merged 1 commit into
4.5.xfrom
alert-autofix-17593
Oct 29, 2025
Merged

totoprayogo1916 merged 1 commit into
4.5.xfrom
alert-autofix-17593

Conversation

@totoprayogo1916

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/ataslangit/sistem-informasi-desa/security/code-scanning/17593

The best way to fix this issue is to add the permissions key to the workflow at either the root (level with name and on) or within the specific job requiring restricted/expanded permissions. Since this workflow only validates PHP code formatting and does not appear to need write access to repository content, the minimal permissions set should be contents: read, which allows jobs to fetch source code but not to push, modify, or create security exposures. Edit the .github/workflows/php-cs-fixer.yml file and insert the following block directly below the workflow name (on line 2, before on:) to apply the permissions to all jobs in this workflow.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ntain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@totoprayogo1916
totoprayogo1916 marked this pull request as ready for review October 29, 2025 12:10
@totoprayogo1916
totoprayogo1916 merged commit 3248712 into 4.5.x Oct 29, 2025
6 checks passed
@totoprayogo1916
totoprayogo1916 deleted the alert-autofix-17593 branch October 29, 2025 12:11
@totoprayogo1916 totoprayogo1916 added abaikan-rilis Abaikan pada rilis info github_actions Pull requests that update GitHub Actions code labels Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abaikan-rilis Abaikan pada rilis info github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant