How to protect your GitHub workflow files and prevent anyone to modify them in any incorrect way?
Here is the solution:
Using CODEOWNERS to monitor changes
You can use the CODEOWNERS feature to control how changes are made to your workflow files. For example, if all your workflow files are stored in .github/workflows, you can add this directory to the code owners list, so that any proposed changes to these files will first require approval from a designated reviewer.
How to protect your GitHub workflow files and prevent anyone to modify them in any incorrect way?
Here is the solution: Using CODEOWNERS to monitor changes You can use the CODEOWNERS feature to control how changes are made to your workflow files. For example, if all your workflow files are stored in .github/workflows, you can add this directory to the code owners list, so that any proposed changes to these files will first require approval from a designated reviewer.
See: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions