Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#2

Merged
thorsten merged 1 commit intomainfrom
alert-autofix-1
Oct 11, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#2
thorsten merged 1 commit intomainfrom
alert-autofix-1

Conversation

@thorsten
Copy link
Copy Markdown
Member

Potential fix for https://github.com/phpMyFAQ/www.phpmyfaq.de/security/code-scanning/1

To fix the problem, you should add an explicit permissions block to the workflow. Since none of the workflow steps require write access to the repository (they install dependencies, build, run tests, and upload artifacts), the minimum needed permission is contents: read. This block can be added at the root of the workflow (before jobs:), which will apply to all jobs unless overridden.

Change required:

  • Add the following block between the on: block and the jobs: block in .github/workflows/playwright.yml:
permissions:
  contents: read

No additional methods, imports, or changes elsewhere are necessary.


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>
@thorsten thorsten marked this pull request as ready for review October 10, 2025 16:28
@thorsten thorsten merged commit d365e3c into main Oct 11, 2025
4 of 5 checks passed
@thorsten thorsten deleted the alert-autofix-1 branch October 11, 2025 13:56
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.

1 participant